private void SaveAs_Executed(object sender, ExecutedRoutedEventArgs e) { var dlg = new FileSelector("\\configuration\\screens", ConfigManager.Settings.Contents.screenFilePath, "scr.json") { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner, ExcludeLockedFiles = true, AllowNewFiles = true, NewFilesExtension = ".scr.json", AllowImports = false, }; if ((bool)dlg.ShowDialog()) { ConfigManager.Screen.SaveConfigurationAs(dlg.ResultFilePath); ConfigManager.Settings.Contents.screenFilePath = dlg.ResultFilePath; ContentGrid.InitPanels(this); } }
private void Layouts_Executed(object sender, ExecutedRoutedEventArgs e) { var dlg = new FileSelector("\\configuration\\screens", ConfigManager.Settings.Contents.screenFilePath, "scr.json") { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner, ExcludeLockedFiles = true, AllowNewFiles = true, NewFilesExtension = ".scr.json", AllowImports = true, ImportFilter = "JSON Screen Files (*.scr.json)|*.vms" }; if ((bool)dlg.ShowDialog()) { ConfigManager.Settings.Contents.screenFilePath = dlg.ResultFilePath; //ConfigManager.Screen.SaveConfiguration(); ConfigManager.Screen.Reload(dlg.ResultFilePath); ContentGrid.InitPanels(this); //Common.Helpers.ApplicationControl.Restart(); } }
private void GeneratePanels() { ContentGrid.InitPanels(this); }