private void OnMoreInfoImageMouseDown(object sender, MouseButtonEventArgs e) { System.Windows.Controls.Image img = e.OriginalSource as System.Windows.Controls.Image; if (img == null) { return; } StartupManagerTask.ShowDetail(img); e.Handled = true; }
private void OnToggleButtonChecked(object sender, RoutedEventArgs e) { ToggleSwitch toggleSwitch = e.Source as ToggleSwitch; if (toggleSwitch == null) { return; } FileItem fileItem = toggleSwitch.Tag as FileItem; if (fileItem == null) { return; } StartupManagerTask.Toggle(fileItem, true); }
private void OnDoWork(object sender, DoWorkEventArgs e) { Dictionary <string, Models.Tuple <string, bool> > startupItemDictionary = StartupManagerTask.LoadStartupItems(); if (backgroundWorker.CancellationPending) { e.Cancel = true; return; } if (startupItemDictionary.Any()) { FileReader fileReader = new FileReader(startupItemDictionary); if (backgroundWorker.CancellationPending) { e.Cancel = true; return; } ObservableCollection <FileItem> fileItemList = fileReader.GetAsFileItemCollectionWithUserTitle(); e.Result = fileItemList; } else { e.Result = this.FindResource("EmptyData") as string; } }