public ConfigController(IConfigView view, ICurrentConfig config,IOpenConfigView openView) { this._config = config; this._view = view; this._openView = openView; this._reader = new ConfigReader(this._config); }
public FrmTnSaveParams() { InitializeComponent(); this._currentConfig = CurrentConfig.CallMe(); _openView = new FrmTnOpenParams(); //spnNam.EditValue = int.Parse(_currentYear); //this.txtPath.Text = TnSystemFileName.PARAMS; }
void IConfigView.SetOpenAndSaveView(IOpenConfigView openView, ISaveConfigView saveView) { this._openConfigView = openView; this._saveConfigView = saveView; }
private void initParams() { //_curConfig = CurrentConfig.CallMe(); this._openConfigView = new FrmTnOpenParams(); this._openConfigView.SetConfigView(this); this._saveConfigView = new FrmTnSaveParams(); this._saveConfigView.SetConfigView(this); ((IConfigView)this).SetOpenAndSaveView(this._openConfigView, this._saveConfigView); _datNnConfigView = FrmQdNongNghiep.CallMe(); _datPnnDtConfigView = FrmQdPnnDt.CallMe(); _datPnnntConfigView = FrmQdPnnNt.CallMe(); _allConfigView = FrmThongSoQuyDinh.CallMe; List<IConfigView> lst4Nn=new List<IConfigView>(); List<IConfigView> lst4PnnNt = new List<IConfigView>(); List<IConfigView> lst4PnnDt = new List<IConfigView>(); List<IConfigView> lst4This = new List<IConfigView>(); List<IConfigView> lst4All = new List<IConfigView>(); IConfigView _this = this as IConfigView; lst4Nn.Add(_this); lst4Nn.Add(_datPnnDtConfigView); lst4Nn.Add(_datPnnntConfigView); lst4Nn.Add(_allConfigView); _datNnConfigView.SetBuddy(lst4Nn); lst4PnnNt.Add(_this); lst4PnnNt.Add(_datNnConfigView); lst4PnnNt.Add(_datPnnDtConfigView); lst4PnnNt.Add(_allConfigView); _datPnnntConfigView.SetBuddy(lst4PnnNt); lst4PnnDt.Add(_this); lst4PnnDt.Add(_datNnConfigView); lst4PnnDt.Add(_datPnnntConfigView); lst4PnnDt.Add(_allConfigView); _datPnnDtConfigView.SetBuddy(lst4PnnDt); lst4All.Add(_this); lst4All.Add(_datNnConfigView); lst4All.Add(_datPnnntConfigView); lst4All.Add(_datPnnDtConfigView); _allConfigView.SetBuddy(lst4All); lst4This.Add(_datPnnntConfigView); lst4This.Add(_datPnnDtConfigView); lst4This.Add(_datNnConfigView); lst4This.Add(_allConfigView); ((IConfigView)this).SetBuddy(lst4This); }
void IConfigController.SetOpenView(IOpenConfigView openView) { this._openView = openView; }