public DelGlossButton(GlossMV modelView) { if (modelView == null) { throw new ArgumentNullException("Model widoku jest null"); } _modelView = modelView; }
public LabBookForm() { InitializeComponent(); WindowEditMV mainModelView = new WindowEditMV(); ViscosityMV _viscosityMV = Resources["viscosity"] as ViscosityMV; GlossMV _glossMV = Resources["gloss"] as GlossMV; OpacityMV _opacityMV = Resources["opacity"] as OpacityMV; SpectroMV _spectroMV = Resources["spectro"] as SpectroMV; CommonMV _commonMV = Resources["common"] as CommonMV; AshBurnMV _ashBurnMV = Resources["burn"] as AshBurnMV; NavigationMV _navigationMV = Resources["navi"] as NavigationMV; DataContext = mainModelView; _viscosityMV.SetWindowEditMV = mainModelView; _glossMV.SetWindowEditMV = mainModelView; _opacityMV.SetWindowEditMV = mainModelView; _spectroMV.SetWindowEditMV = mainModelView; _commonMV.SetWindowEditMV = mainModelView; _ashBurnMV.SetWindowEditMV = mainModelView; _navigationMV.ModelView = mainModelView; mainModelView.SetViscosityMV = _viscosityMV; mainModelView.SetGlossMV = _glossMV; mainModelView.SetOpacityMV = _opacityMV; mainModelView.SetSpectroMV = _spectroMV; mainModelView.SetCommonMV = _commonMV; mainModelView.SetAshBurnMV = _ashBurnMV; mainModelView.SetNavigationMV = _navigationMV; FilterMV _filterMV = this.Resources["filter"] as FilterMV; _filterMV.SetWindowEdit(mainModelView); _ = DgLabBook.Focus(); }