Library

Video Player is loading.
 
Current Time 9:26
Duration 16:09
Loaded: 0%
 
x1.00


Back

Games & Quizzes

Training Mode - Typing
Fill the gaps to the Lyric - Best method
Training Mode - Picking
Pick the correct word to fill in the gap
Fill In The Blank
Find the missing words in a sentence Requires 5 vocabulary annotations
Vocabulary Match
Match the words to the definitions Requires 10 vocabulary annotations

You may need to watch a part of the video to unlock quizzes

Don't forget to Sign In to save your points

Challenge Accomplished

PERFECT HITS +NaN
HITS +NaN
LONGEST STREAK +NaN
TOTAL +
- //

We couldn't find definitions for the word you were looking for.
Or maybe the current language is not supported

  • 00:01

    To demonstrate the use of the FileSystemWatcher class, I’m going to create a WPF application

  • 00:07

    that shows you any new pictures the user adds to their Pictures folder. First, I’m going

  • 00:14

    to resize the window a bit so that it is more the shape of a normal picture, and I’ll

  • 00:22

    give the window a name. Let’s call it MainWindow. Next, I’m going to go into the toolbox and

  • 00:30

    drag over an Image control. I just want it to take up the entire MainWindow, so I’ll

  • 00:43

    just remove the margins. Let’s call it updatedImage.

  • 00:53

    We want to create an event handler using the FileSystemWatcher class, which allows us to

  • 01:01

    monitor a particular folder for changes. The FileSystemWatcher class is contained in the

  • 01:08

    System.IO namespace, so I’ll add that now. First, I’ll need to identify the user’s

  • 01:18

    Pictures folder. I’ll add it to a string called watchedFolder. I’ll use the Path.Combine

  • 01:31

    method to concatenate the user profile folder, which is an environment variable, and the

  • 01:39

    Pictures sub-folder. To get an environment variable, you call Environment.GetEnvironmentVariable.

  • 01:47

    Then, I’ll specify the environment variable USERPROFILE. You can identify all environment

  • 01:58

    variables at a command prompt by running the command SET.

  • 02:03

    Now I’m going to combine the user’s profile with the sub-folder Pictures, which in Vista

  • 02:09

    is the subfolder for anyone’s pictures. Now I just need to create a FileSystemWatcher

  • 02:18

    instance for that path. I’ll call it fsw, and I’ll provide the path as part of the

  • 02:26

    constructor. To demonstrate how to interact with WPF controls, I’ll set the window’s

  • 02:37

    title to the path that we’re monitoring. That way, the user will be able to see that

  • 02:49

    we’re monitoring the correct folder.

  • 02:54

    FileSystemWatcher has a couple of properties that we want to specify. Often, if you’re

  • 02:59

    unloading pictures from a camera, it will load it into sub-folders of the Pictures folder,

  • 03:04

    so I want to make sure we monitor subfolders as well. I’ll set the IncludeSubdirectories

  • 03:10

    property to true. I also want to set the NotifyFilters property so that updates are provided for

  • 03:25

    a couple of different types of edits. You can see here that I can have it notify me

  • 03:30

    about a couple of different properties of a file:

  • 03:33

    · Attributes filters are triggered when a file’s attributes are edited.

  • 03:39

    · CreationTime changes if someone manually went in and edited the creation time or if

  • 03:47

    a new file were created.

  • 03:48

    · DirectoryName would occur if a file was moved.

  • 03:55

    · FileName would occur if a file were renamed.

  • 03:59

    · LastAccess and LastWrite would trigger the filter if a file were updated.

  • 04:07

    · If a file were appended or shortened, the Size property would change.

  • 04:12

    · If a security descriptor were changed, the Security property would be used.

  • 04:19

    For me, I’m going to trigger on FileName and Last Write. That should be sufficient

  • 04:25

    to notify me if a file is added.

  • 04:30

    Now that I’ve configured the FileSystemWatcher, I’m going to create a handler for the Changed

  • 04:43

    event. You can see that in C# I specify it with the += operator. It provides me with

  • 04:52

    a default handler—I just need to press Tab to insert it and it generates it for me. Again,

  • 04:57

    it prompts me to press Tab to generate the event handler. I press Tab again, and I have

  • 05:04

    an event handler.

  • 05:06

    Now I need to write the event handler; I can remove the default exception because I’m

  • 05:11

    going to implement it now.

  • 05:13

    There’s a trick I need to explain. I’m need to display the updated picture in this

  • 05:20

    control, however, when you’re handling events in a WPF application, the event handler is

  • 05:28

    in a different thread. That means that I don’t have direct access to the controls in the

  • 05:37

    window. So, I could write this command and specify the path of the updated file,

  • 05:48

    but it won’t work—I would get an exception because I don’t have access to the controls

  • 05:56

    in the WPF window. What I need to do instead is to use the dispatcher.

  • 06:00

    You can see that I have access to the updatedImage control. I call the Dispatcher.Invoke command

  • 06:10

    which takes two parameters—a Priority, and then an Action. I use the System.Windows.Threading.DispatcherPriority

  • 06:21

    to specify the priority of the dispatcher—Normal is fine. Then, I specify an Action by typing

  • 06:35

    New Action.

  • 06:46

    Within this delegate I’m going to specify the changes that I want to make. First, I’m

  • 06:50

    going to create an ImageSourceConverter instance, which is required to specify the source of

  • 06:59

    the updated Image control. You can’t simply provide a Source of a file path, so the ImageSourceConverter

  • 07:09

    converts from the file path to the Source in the format that it’s required.

  • 07:15

    Now that I’m within the delegate in the dispatcher, I can access updatedImage.Source,

  • 07:22

    cast it to ImageSource, and call the ImageSourceConverter.ConvertFromString method.

  • 07:39

    This is almost ready to go—I have one more change I need to make. I need to set the FileSystemWatcher.EnableRaisingEvents

  • 07:45

    to true, otherwise events won’t fire. This is ready to run now.

  • 07:58

    There’s my picture window. I’ll expand that a little bit. Now, let me pull up my

  • 08:04

    Pictures folder. You can see I have some vacation photos. I will simply copy one of these folders

  • 08:11

    to the same folder, and you can see that the WPF application detects the change, finds

  • 08:20

    the full path to the file, and displays it in the image folder. I can do this repeated

  • 08:27

    times with the same result.

  • 08:34

    Now, I want to demonstrate within the event handler how it found the folder path. Notice

  • 08:40

    that the event handler, which was automatically generated by C#, takes two parameters: the

  • 08:46

    sender object, which I don’t access (and I don’t need to access, typically) and the

  • 08:53

    FileSystemEventArgs instance. Almost all event handlers have some derivative of EventArgs,

  • 09:01

    and the default code generated by Visual Studio always calls it e. So, e has a variety of

  • 09:09

    useful parameters here, and they’re specific to the event that’s being thrown. In this

  • 09:14

    case, the FileSystemWatcher event wants to let me know the file that was changed and

  • 09:20

    what type of change happened to it. You can see that it has three properties here: ChangeType,

  • 09:26

    which specifies whether the file was changed or renamed, FullPath, which is the full path

  • 09:34

    to the file, and Name, which is just the filename. When I specified the path to the picture,

  • 09:40

    I used the FileSystemEventArgs.FullPath property, sent it to the ImageSourceConverter, and then

  • 09:47

    cast that to ImageSource.

All

The example sentences of SPECIFIES in videos (15 in total of 41)

which wh-determiner specifies verb, 3rd person singular present whether preposition or subordinating conjunction the determiner file noun, singular or mass was verb, past tense changed verb, past participle or coordinating conjunction renamed verb, past tense , fullpath proper noun, singular , which wh-determiner is verb, 3rd person singular present the determiner full adjective path noun, singular or mass
specifies verb, 3rd person singular present a determiner single adjective test noun, singular or mass point noun, singular or mass less adjective, comparative than preposition or subordinating conjunction two cardinal number inches noun, plural so preposition or subordinating conjunction we personal pronoun 'll modal use verb, base form this determiner one cardinal number inch noun, singular or mass
the determiner background noun, singular or mass code noun, singular or mass only adverb specifies verb, 3rd person singular present what wh-pronoun needs verb, 3rd person singular present to to be verb, base form done verb, past participle , while preposition or subordinating conjunction the determiner bsp proper noun, singular code noun, singular or mass specifies verb, 3rd person singular present how wh-adverb
and coordinating conjunction 1 cardinal number once adverb it personal pronoun is verb, 3rd person singular present done verb, past participle it personal pronoun here adverb you personal pronoun can modal see verb, base form they personal pronoun are verb, non-3rd person singular present forwarding verb, gerund or present participle here adverb specifies verb, 3rd person singular present
the determiner fastq proper noun, singular file noun, singular or mass , but coordinating conjunction more adverb, comparative detailed verb, past participle as preposition or subordinating conjunction it personal pronoun specifies verb, 3rd person singular present information noun, singular or mass about preposition or subordinating conjunction the determiner location noun, singular or mass in preposition or subordinating conjunction the determiner genome noun, singular or mass
the determiner width noun, singular or mass attribute verb, non-3rd person singular present can modal be verb, base form applied verb, past participle to to all determiner table noun, singular or mass elements noun, plural except preposition or subordinating conjunction for preposition or subordinating conjunction table noun, singular or mass row noun, singular or mass and coordinating conjunction specifies verb, 3rd person singular present
here adverb , we personal pronoun see verb, non-3rd person singular present that determiner god proper noun, singular specifies verb, 3rd person singular present the determiner wrongs noun, plural committed verb, past participle by preposition or subordinating conjunction the determiner watchers proper noun, singular , in preposition or subordinating conjunction that determiner they personal pronoun
god proper noun, singular specifies verb, 3rd person singular present astrologers noun, plural as preposition or subordinating conjunction among preposition or subordinating conjunction those determiner who wh-pronoun will modal be verb, base form burned verb, past participle as preposition or subordinating conjunction stubble adjective in preposition or subordinating conjunction god proper noun, singular s proper noun, singular judgment noun, singular or mass
of preposition or subordinating conjunction the determiner idea noun, singular or mass that preposition or subordinating conjunction the determiner wave noun, singular or mass function verb, base form itself personal pronoun fully adverb specifies verb, 3rd person singular present the determiner state noun, singular or mass of preposition or subordinating conjunction a determiner system noun, singular or mass .
law noun, singular or mass specifies verb, 3rd person singular present some determiner minimum adjective requirements noun, plural for preposition or subordinating conjunction you personal pronoun to to be verb, base form eligible adjective - one cardinal number of preposition or subordinating conjunction which wh-determiner is verb, 3rd person singular present that preposition or subordinating conjunction
specifies verb, 3rd person singular present the determiner product noun, singular or mass because preposition or subordinating conjunction , when wh-adverb i personal pronoun drag verb, non-3rd person singular present this determiner down adverb , i personal pronoun 'm verb, non-3rd person singular present going verb, gerund or present participle to to want verb, base form g proper noun, singular 10 cardinal number to to
the determiner compact proper noun, singular specifies verb, 3rd person singular present that preposition or subordinating conjunction the determiner upper proper noun, singular basin proper noun, singular states noun, plural are verb, non-3rd person singular present to to provide verb, base form a determiner minimum adjective annual adjective flow noun, singular or mass
moving verb, gerund or present participle the determiner slider noun, singular or mass to to the determiner left verb, past participle specifies verb, 3rd person singular present a determiner smaller adjective, comparative area noun, singular or mass and coordinating conjunction moving verb, gerund or present participle it personal pronoun to to the determiner right noun, singular or mass specifies verb, 3rd person singular present
offset verb, base form specifies verb, 3rd person singular present the determiner lcoation proper noun, singular of preposition or subordinating conjunction the determiner section noun, singular or mass data noun, plural in preposition or subordinating conjunction the determiner elf proper noun, singular file noun, singular or mass , and coordinating conjunction size noun, singular or mass specifies verb, 3rd person singular present how wh-adverb
and coordinating conjunction clearly adverb specifies verb, 3rd person singular present that determiner nebuchadnezzar proper noun, singular s proper noun, singular men noun, plural had verb, past tense removed verb, past participle the determiner doors noun, plural to to the determiner holy proper noun, singular of preposition or subordinating conjunction holies proper noun, singular .

Use "specifies" in a sentence | "specifies" example sentences

How to use "specifies" in a sentence?

  • Hate generalizes; love specifies. Or: The movements of hatred are toward generalization; love's movements are toward specification.
    -Robin Morgan-

Definition and meaning of SPECIFIES

What does "specifies mean?"

/ˈspesəˌfī/

verb
To state, name or mention exactly and clearly.

What are synonyms of "specifies"?
Some common synonyms of "specifies" are:
  • state,
  • name,
  • identify,
  • define,
  • describe,
  • frame,
  • itemize,
  • designate,
  • detail,
  • list,
  • enumerate,

You can find detailed definitions of them on this page.