private void Menu_Set(object sender, RoutedEventArgs e) { var sw = new SettingWindow(); sw.ShowDialog(); if (sw.IsChange) { settings = sw.set; AddOtherBtn(); } }
void SetWindowBounds() { set = MainWindow.settings; //Kotono系 _viewModel.SyncPath = set.SyncPath; _viewModel.AssistPath = set.AssistPath; _viewModel.TonePath = set.TonePath; _viewModel.FaderPath = set.FaderPath; //ボイロ系 //あとで直す。 _viewModel.AppPath = set.AppPath; }
public MainWindow() { InitializeComponent(); RecoverWindowBounds(); settings = new HomeSettings(); try { using (FileStream fs = new FileStream(Directory.GetCurrentDirectory() + "\\" + "Kotono_Home_settings.xml", FileMode.Open)) { XmlSerializer serializer = new XmlSerializer(typeof(HomeSettings)); settings = (HomeSettings)serializer.Deserialize(fs); } AddOtherBtn(); } catch (FileNotFoundException e) { System.Diagnostics.Process.Start(@".\readme.txt"); } }