Esempio n. 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);
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 3
0
 private void GeneratePanels()
 {
     ContentGrid.InitPanels(this);
 }