コード例 #1
0
        private async Task OnClearClick()
        {
            Value    = "";
            Argument = "";
            await ValueChanged.InvokeAsync("");

            await ArgumentChanged.InvokeAsync("");

            IsSelected = false;
        }
コード例 #2
0
        private async Task ItemSelected(string key, string value)
        {
            // Apply selected values
            Value    = key;
            Argument = value;
            await ValueChanged.InvokeAsync(key);

            await ArgumentChanged.InvokeAsync(value);

            // Is selected
            IsSelected = true;

            // Close list div
            CloseList();
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: alvonellos/ChangeWatcher
 private void Form1_Load(object sender, EventArgs e)
 {
     watcher = new FileSystemWatcher();
     watcher.Path = System.IO.Path.GetPathRoot(System.Environment.CurrentDirectory);
     watcher.Filter = "*";
     watcher.IncludeSubdirectories = true;
     watcher.NotifyFilter = (NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size);
     watcher.Changed += new FileSystemEventHandler(OnChanged);
     watcher.Created += new FileSystemEventHandler(OnCreated);
     watcher.Deleted += new FileSystemEventHandler(OnDeleted);
     watcher.Renamed += new RenamedEventHandler(OnRenamed);
     Changed = new ArgumentChanged(Ch);
     Created = new ArgumentCreated(Cr);
     Deleted = new ArgumentDeleted(Dl);
     Renamed = new ArgumentRenamed(Rn);
 }