public override void Start() { this._dicomPrinterConfigurationEditorComponent = new DicomPrinterConfigurationEditorComponent(); this._childComponentHost = new ChildComponentHost(base.Host, this._dicomPrinterConfigurationEditorComponent); this._dicomPrinterConfigurationEditorComponent.PropertyChanged += new PropertyChangedEventHandler(this.LocalPropertyChanged); this._dicomPrinterConfigurationEditorComponent.Validation.Add(new ValidationRule("HaveModalityPixelSpacing", new ValidationRule.ValidationDelegate(this.GetValidtionResult))); ItemCollection <Checkable <DicomPrinter> > items = this._dicomPrinterTable.Items; if (Convert == null) { Convert = new Converter <DicomPrinter, Checkable <DicomPrinter> >(DciomPrintApplicationComponent.WrapperDicomPrinterToCheckable); } items.AddRange(CollectionUtils.Map <DicomPrinter, Checkable <DicomPrinter> >(DicomPrintSettings.LocalDicomPrinterCollection, Convert)); this._dicomPrinterTable.SelectDicomPrinter(DicomPrintSettings.LocalDefaultPrinterName); if (items.Count > 0) { if (this._dicomPrinterTable.SelectFirstCheckedCheckableDicomPrinter == null) { this.SelectedItem = new Selection(items[0]); } } if (this._dicomPrinter == null) { this._dicomPrinterConfigurationEditorComponent.Configuration = new DicomPrinter.Configuration(); } else { this._dicomPrinterConfigurationEditorComponent.Configuration = this._dicomPrinter.Item.Config; } base.Start(); this._childComponentHost.StartComponent(); }
public override void Start() { if (_dicomPrinterConfigurationEditorComponent == null) { _dicomPrinterConfigurationEditorComponent = new DicomPrinterConfigurationEditorComponent(); } _dicomPrinterConfigurationEditorComponent.Configuration = _dicomPrinter.Config; this._childComponentHost = new ChildComponentHost(base.Host, this._dicomPrinterConfigurationEditorComponent); this._dicomPrinterConfigurationEditorComponent.ModifiedChanged += new EventHandler(this.LocalPropertyChanged); base.Start(); this._childComponentHost.StartComponent(); }
private void Dispose(bool flag) { if (flag) { _dicomPrinter = null; _selectPresentations = null; _dicomPrinterConfigurationEditorComponent = null; if (_dicomPrintSession != null) { _dicomPrintSession.Dispose(); } } }