/// <summary> /// Loading MainForm /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormMain_Load(object sender, EventArgs e) { log.Debug("Application started"); // Set window size if (Properties.Settings.Default.WindowSize != null) { //Check if window has a minimum size (Default 863; 523) if ((Properties.Settings.Default.WindowSize.Height > 480) && (Properties.Settings.Default.WindowSize.Width > 640)) { this.Size = Properties.Settings.Default.WindowSize; } } // Set window location if (Properties.Settings.Default.WindowLocation != null) { //Check if Window is visible if ((SystemInformation.VirtualScreen.Right > Properties.Settings.Default.WindowLocation.X + 50) && (SystemInformation.VirtualScreen.Bottom > Properties.Settings.Default.WindowLocation.Y + 50)) { this.Location = Properties.Settings.Default.WindowLocation; } } //Debug Window initial not visible splitContainerDebug.Panel2Collapsed = true; splitContainerDebug.SplitterDistance = Properties.Settings.Default.splitContainerDebugPosition; //You have to select the tab with the splitter first. Otherwise it will not work tabControl1.SelectedIndex = 1; splitContainerPictureview.SplitterDistance = Properties.Settings.Default.splitContainerPictureviewPosition; tabControl1.SelectedIndex = 0; if (Properties.Settings.Default.SimulateCamera) { ks2 = new PtxK_S2.K_S2(""); } else { ks2 = new PtxK_S2.K_S2(Properties.Settings.Default.IPAdressCamera); } tsslMessage.Text = ""; btnGetParameter_Click(this, null); //Get parameter at program start }
/// <summary> /// Loading MainForm /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormMain_Load(object sender, EventArgs e) { log.Debug("Application started"); // Set window size if (Properties.Settings.Default.WindowSize != null) { //Check if window has a minimum size (Default 863; 523) if ((Properties.Settings.Default.WindowSize.Height > 480) && (Properties.Settings.Default.WindowSize.Width > 640)) { this.Size = Properties.Settings.Default.WindowSize; } } // Set window location if (Properties.Settings.Default.WindowLocation != null) { //Check if Window is visible if ((SystemInformation.VirtualScreen.Right > Properties.Settings.Default.WindowLocation.X + 50) && (SystemInformation.VirtualScreen.Bottom > Properties.Settings.Default.WindowLocation.Y + 50)) { this.Location = Properties.Settings.Default.WindowLocation; } } //Debug Window initial not visible splitContainerDebug.Panel2Collapsed = true; splitContainerDebug.SplitterDistance = Properties.Settings.Default.splitContainerDebugPosition; //You have to select the tab with the splitter first. Otherwise it will not work tabControl1.SelectedIndex = 1; splitContainerPictureview.SplitterDistance = Properties.Settings.Default.splitContainerPictureviewPosition; tabControl1.SelectedIndex = 0; if(Properties.Settings.Default.SimulateCamera) ks2 = new PtxK_S2.K_S2(""); else ks2 = new PtxK_S2.K_S2(Properties.Settings.Default.IPAdressCamera); tsslMessage.Text = ""; btnGetParameter_Click(this, null); //Get parameter at program start }