public void closeWindow(object param = null) { if (this._formWindow.IsLoaded) { this._formWindow.Hide(); } this._formWindow = null; this.load(this._entityName); }
private void openWindow(object param) { this._formWindow = new MainFormWindow(); this._formWindow.MainFormViewModel.setViewModel(this._entityName); // TODO add checking if param is not null for update if (param != null) { BaseEntity entity = (BaseEntity)param; this._formWindow.MainFormViewModel.SelectedViewModel.loadData(entity); } this._formWindow.MainFormViewModel.addMediator( WindowObserver.getObserver(this) ); this._formWindow.Show(); }