Exemplo n.º 1
0
 /// <summary>
 /// Starts a recreation of the index
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public async void RebuildIndexButton_Click(object sender, RoutedEventArgs e)
 {
     (await MetroDialogHelper.ShowDialog(this, "Rebuilding file index", "Do you really want to rebuild your index, this may take a few minutes?"))
     .OnSuccess(() =>
     {
         BuildIndexInTheBg();
     });
 }
 /// <summary>
 /// Deletes a workflow
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private async void DeleteWorkflowButton_Click(object sender, RoutedEventArgs e)
 {
     (await MetroDialogHelper.ShowDialog(this, "Delete Workflow", "Are you sure?"))
     .OnSuccess(() =>
     {
         WorkflowManager.Instance.Remove((Workflow)WorkflowListBox.SelectedItem);
     });
 }
Exemplo n.º 3
0
 /// <summary>
 /// Resets the config
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private async void ResetConfig(object sender, RoutedEventArgs e)
 {
     (await MetroDialogHelper.ShowDialog(this, "Reset config", "Are you sure that you want to reset your config? All edits in the config will be permanently removed!"))
     .OnSuccess(() =>
     {
         Config.Instance.ResetConfig();
         DataContext = Config.Instance;
     });
 }
Exemplo n.º 4
0
 /// <summary>
 /// Removes a folder of the user specifc config
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private async void RemoveFolderButton_Click(object sender, RoutedEventArgs e)
 {
     (await MetroDialogHelper.ShowDialog(this, "Delete Path", "Are you sure?"))
     .OnSuccess(() =>
     {
         var oldPath = (Path)PathListBox.SelectedItem;
         Config.Instance.Paths.Remove(oldPath);
         Config.Instance.Persist();
         MyFileWatcher.Instance.RemovePath(oldPath);
     });
 }