private void highS_ValueChanged(object sender, EventArgs e) { VCamLib.SaveSettings(highS.Value, -1, -1); TrackBar tb = (TrackBar)sender; string text = string.Format("{0} .value = {1}", tb.Name, tb.Value); Label lbl = (Label)tb.Tag; lbl.Text = text; toolTip1.SetToolTip(tb, text); }
protected override void OnLoad(EventArgs e) { int _highS = 0; int _minWidth = 0; int _minHeight = 0; VCamLib.ReadSettings(ref _highS, ref _minWidth, ref _minHeight); highS.Value = _highS; minWidth.Value = _minWidth; minHeight.Value = _minHeight; base.OnLoad(e); }
protected override void OnClosing(CancelEventArgs e) { int highS = 0; int minWidth = 0; int minHeigth = 0; VCamLib.ReadSettings(ref highS, ref minWidth, ref minHeigth); StateSaver.Default.Set("CPrint2.MainForm.Location", this.Location); StateSaver.Default.Set("CPrint2.MainForm.Size", this.Size); StateSaver.Default.Set("highS", highS); StateSaver.Default.Set("minWidth", minWidth); StateSaver.Default.Set("minHeigth", minHeigth); StateSaver.Default.Set("CameraControl.Mode", CameraControl.Mode); e.Cancel = true; this.Hide(); base.OnClosing(e); }
protected override void OnLoad(EventArgs e) { this.Location = StateSaver.Default.Get <Point>("CPrint2.MainForm.Location", this.Location); this.Size = StateSaver.Default.Get <Size>("CPrint2.MainForm.Size", this.Size); int highS = 0; int minWidth = 0; int minHeigth = 0; VCamLib.ReadSettings(ref highS, ref minWidth, ref minHeigth); highS = StateSaver.Default.Get <int>("highS", highS); minWidth = StateSaver.Default.Get <int>("minWidth", minWidth); minHeigth = StateSaver.Default.Get <int>("minHeigth", minHeigth); CameraControl.Mode = StateSaver.Default.Get <CameraControl.ShowMode>("CameraControl.Mode", CameraControl.ShowMode.Normal); VCamLib.SaveSettings(highS, minWidth, minHeigth); this.highS.Value = highS; base.OnLoad(e); }