Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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();
            }
        }
Beispiel #3
0
 private void GeneratePanels()
 {
     ContentGrid.InitPanels(this);
 }