Beispiel #1
0
 private void wndw_Closed(object sender, EventArgs args)
 {
     if (SelControl != null)
     {
         Settings.ResetSettings();
         ShowPreviewContent();
         LaunchPreviewWindow((HVCC.Prototype2.ControlBase)cmb_windows.Items[0]);
         SelControl = null;
     }
 }
Beispiel #2
0
        private void LaunchPreviewWindow(Prototype2.ControlBase fe)
        {
            if (IsNoWindows())
            {
                App.BuildDevicesList();
                ClearPreviewPane();
                SelControl = fe;
                ShowPreviewContent();
                App.RenderStaticWindowContent(fe);
                txt_description.Text = fe.Description;
                txt_name.Text        = fe.WindowName;

                Ghost.Wrapper.Control ghstWrapper = new Ghost.Wrapper.Control(App.MasterStaticWindowTemplate, HVCCPages.AllPages);
                PreviewPanel.Children.Add(ghstWrapper);
            }
        }
        public static void RenderWindowContent(HVCC.Prototype2.ControlBase ctl)
        {
            if (ctl.IsMenusVisible)
            {
                if (App.Devices.NumberOfDevicesInstalled() > 0)
                {
                    MasterWindowTemplate.IsDevicesMenusShown = true;
                }
                else
                {
                    MasterWindowTemplate.IsDevicesMenusShown = false;
                }
            }
            else
            {
                MasterWindowTemplate.IsDevicesMenusShown = false;
            }

            MasterWindowTemplate.IsDialog             = ctl.IsDialog;
            MasterWindowTemplate.WindowContentControl = ctl;
        }
Beispiel #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (IsNoWindows())
            {
                HVCC.Settings.ResetSettings();

                SelControl = App.MasterStaticWindowTemplate.WindowContentControl;

                App.MasterWindowTemplate = new HVCC.Prototype2.WindowMaster();
                App.MasterDialogTemplate = new HVCC.Prototype2.WindowMaster();

                CloseAllWindows();
                ClearPreviewPane();
                HidePreviewContent();
                SetSettingsFromScenarioComboBoxes();
                CheckForDevicesInstalled();
                Settings.IsStaticPresentation = false;

                //App.Devices[3].IsInstalled = true;
                //App.Devices[3].IsHasData = true;

                //App.DevicePluggInTimer.Start();

                if (!(bool)cb_isInstall.IsChecked)
                {
                    HVCC.Setup.SetupWindow sw = new HVCC.Setup.SetupWindow();
                    sw.Closed += new EventHandler(SetupWindow_Closed);
                    sw.Show();
                }
                else
                {
                    App.RenderWindowContent(new HVCC.Prototype2.Upload());
                    Window wndw = App.OpenWindow();
                    wndw.Closed += new EventHandler(wndw_Closed);
                    wndw.Show();
                }
            }
        }
 public static void RenderDialogContent(HVCC.Prototype2.ControlBase ctl)
 {
     MasterDialogTemplate.IsDialog             = ctl.IsDialog;
     MasterDialogTemplate.IsDevicesMenusShown  = ctl.IsMenusVisible;
     MasterDialogTemplate.WindowContentControl = ctl;
 }