private static void Close_Click(object sender, RoutedEventArgs e)
 {
     if (Wind.Settings.YesNoDialogsEnabled)
     {
         YesNoDialog.SetMessage("Are you sure you want to quit?", "You will loose any changes.", "Yes", "No", CloseComplete);
         DialogManager.Show(Structures.DialogTypes.YesNoDialog);
     }
     else
     {
         CloseComplete(true);
     }
 }
Exemplo n.º 2
0
 public static void ResetButtonPressed(object sender, RoutedEventArgs args)
 {
     if (Wind.Settings.YesNoDialogsEnabled)
     {
         YesNoDialog.SetMessage("Are you sure?", "You will loose any changes.", "Yes", "No", ResetJson);
         DialogManager.Show(Structures.DialogTypes.YesNoDialog);
     }
     else
     {
         ResetJson(true);
     }
 }
Exemplo n.º 3
0
        public static void Run(Config config)
        {
            WindowRef.Wind.Settings.NumberOfUsesUntilMessage--;
            if (WindowRef.Wind.Settings.NumberOfUsesUntilMessage == 0)
            {
                WindowRef.Wind.Settings.NumberOfUsesUntilMessage = 4;

                YesNoDialog.SetMessage("Please Consider Donating.", "It took a lot of time to make this software available for free. If you like it, please consider making a donation to show your appreciation.", "Donate", "Ignore", (b) => ContinueRun(config, b));
                DialogManager.Show(Structures.DialogTypes.YesNoDialog);
                Serialization.JsonSerializer.SaveSettings(WindowRef.Wind.Settings);
                return;
            }

            Serialization.JsonSerializer.SaveSettings(WindowRef.Wind.Settings);
            ContinueRun(config, false);
        }