void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.win = ((OSKernel.Presentation.Arranging.Administrative.Modify.Algo.ClassHour.Dialog.CreateClassHourRequiredTimes)(target)); return; case 2: this.cb_checked = ((System.Windows.Controls.CheckBox)(target)); return; } this._contentLoaded = true; }
void save(object obj) { CreateClassHourRequiredTimes window = obj as CreateClassHourRequiredTimes; if (!this.Validate()) { return; } if (this.OpratorEnum == OperatorEnum.Add) { if (this.SelectClassHour == null) { return; } window.Add = new UIClassHourRule { UID = this.UID, Weight = this.Weight, FirstID = this.SelectClassHour.ID, IsActive = this.IsActive, Periods = this.getTimes() }; } else { window.Modify = new UIClassHourRule { UID = this.UID, Weight = this.Weight, FirstID = this.SelectClassHour.ID, IsActive = this.IsActive, Periods = this.getTimes() }; } window.DialogResult = true; }
void cancel(object obj) { CreateClassHourRequiredTimes window = obj as CreateClassHourRequiredTimes; window.Close(); }