private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Settings.SaveSettings(); SettingsEventArgs sea = new SettingsEventArgs { NewSettings = Settings }; OnSettingsUpdated(sea); }
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(); }
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(); } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { App.Log.WriteDebug("Saving data..."); Saver.SaveFile(DiceData); Settings.SaveSettings(); }