void view_BurnMedia(object sender, EventArgs e) { if (null != __MediaObject) { BurnMedia burnMediaForm = new BurnMedia( ); MediaObjectsStateService state = new MediaObjectsStateService(new MediaCreationQueue( )); __MediaObject.ExecutionStatus.ExecutionStatus = ExecutionStatus.Creating; state.MediaQueue.Add(__MediaObject); state.ActiveMediaItem = __MediaObject; BurnMediaPresenter burnPresenter = new BurnMediaPresenter(burnMediaForm.BurnMediaControl, state, System.Windows.Forms.WindowsFormsSynchronizationContext.Current); burnMediaForm.Tag = burnPresenter; burnMediaForm.FormClosing += new FormClosingEventHandler(burnMediaForm_FormClosing); burnMediaForm.StartPosition = FormStartPosition.CenterParent; if (DialogResult.OK == burnMediaForm.ShowDialog(ViewerContainer.State.ActiveWorkstation)) { } } }
void statusController_BurnActiveMedia(object sender, EventArgs e) { if (null != __State.ActiveMediaItem) { BurnMedia burnMediaForm = new BurnMedia( ); BurnMediaPresenter burnPresenter = new BurnMediaPresenter(burnMediaForm.BurnMediaControl, __State, System.Windows.Forms.WindowsFormsSynchronizationContext.Current); burnMediaForm.Tag = burnPresenter; burnMediaForm.FormClosing += new FormClosingEventHandler(burnMediaForm_FormClosing); burnMediaForm.StartPosition = FormStartPosition.CenterParent; if (DialogResult.OK == burnMediaForm.ShowDialog(_mainForm)) { } } }
void view_BurnMedia(object sender, EventArgs e) { if (null != __MediaObject) { BurnMedia burnMediaForm = new BurnMedia( ); MediaObjectsStateService state = new MediaObjectsStateService(new MediaCreationQueue( )); __MediaObject.ExecutionStatus.ExecutionStatus = ExecutionStatus.Creating; state.MediaQueue.Add(__MediaObject); state.ActiveMediaItem = __MediaObject; BurnMediaPresenter burnPresenter = new BurnMediaPresenter(burnMediaForm.BurnMediaControl, state, System.Windows.Forms.WindowsFormsSynchronizationContext.Current); burnMediaForm.Tag = burnPresenter; burnMediaForm.FormClosing += new FormClosingEventHandler(burnMediaForm_FormClosing); burnMediaForm.StartPosition = FormStartPosition.CenterParent; if (DialogResult.OK == burnMediaForm.ShowDialog(ViewerContainer.State.ActiveWorkstation)) { //currently always cleared after a successful burn if (__View.ClearInstancesAfterRequest) { try { if (burnPresenter.Status == BurnStatus.BurnCompleted) { OnClearInstances(); } } catch { } } } } }