private async Task OnClearClick() { Value = ""; Argument = ""; await ValueChanged.InvokeAsync(""); await ArgumentChanged.InvokeAsync(""); IsSelected = false; }
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(); }
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); }