/// <summary> /// Handle Save Settings Menu Item /// </summary> /// <param name="sender">The parameter is not used.</param> /// <param name="e">The parameter is not used.</param> private void SaveSettingsMenuItemClick(object sender, EventArgs e) { OnOptionSettings opt = new OnOptionSettings(this, this.options); opt.Options.WindowStartX = this.Location.X; opt.Options.WindowStartY = this.Location.Y; this.eventsPort.Post(opt); }
/// <summary> /// Handle saving the Option Settings /// </summary> /// <param name="opt">An Option Settings object populated by the Options Form</param> /// <returns>An Iterator</returns> private IEnumerator <ITask> OnOptionSettingsHandler(OnOptionSettings opt) { this.state.Options = opt.Options; if (this.cameraForm != null) { this.state.Options.WebcamWindowStartX = this.cameraForm.Location.X; this.state.Options.WebcamWindowStartY = this.cameraForm.Location.Y; this.state.Options.WebcamWindowWidth = this.cameraForm.Width; this.state.Options.WebcamWindowHeight = this.cameraForm.Height; } if (this.depthCameraForm != null) { this.state.Options.DepthcamWindowStartX = this.depthCameraForm.Location.X; this.state.Options.DepthcamWindowStartY = this.depthCameraForm.Location.Y; this.state.Options.DepthcamWindowWidth = this.depthCameraForm.Width; this.state.Options.DepthcamWindowHeight = this.depthCameraForm.Height; } SaveState(this.state); yield break; }