예제 #1
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Settings.SaveSettings();
            SettingsEventArgs sea = new SettingsEventArgs
            {
                NewSettings = Settings
            };

            OnSettingsUpdated(sea);
        }
예제 #2
0
        private void okBtn_Click(object sender, RoutedEventArgs e)
        {
            Dice      tDice  = new Dice();
            DiceSaver tSaver = new DiceSaver(profTxt.Text);

            tSaver.LoadFile(ref tDice);
            tSaver.SaveFile(tDice);
            DicerSettings set = new DicerSettings();

            set.LoadSettings();
            set.Data.ProfileName = profTxt.Text;
            set.SaveSettings();
            this.Close();
        }
예제 #3
0
 private void profTxt_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         Dice      tDice  = new Dice();
         DiceSaver tSaver = new DiceSaver(profTxt.Text);
         tSaver.LoadFile(ref tDice);
         tSaver.SaveFile(tDice);
         DicerSettings set = new DicerSettings();
         set.LoadSettings();
         set.Data.ProfileName = profTxt.Text;
         set.SaveSettings();
         this.Close();
     }
 }
예제 #4
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     App.Log.WriteDebug("Saving data...");
     Saver.SaveFile(DiceData);
     Settings.SaveSettings();
 }