void save(object obj) { CreateNoOverlap window = obj as CreateNoOverlap; if (!this.Validate()) { return; } if (this.OpratorEnum == OperatorEnum.Add) { window.Add = new UIClassHourRule { UID = this.UID, Weight = this.Weight, ClassHours = this.TargetHours?.ToList(), IsActive = this.IsActive, }; } else { window.Modify = new UIClassHourRule { UID = this.UID, Weight = this.Weight, ClassHours = this.TargetHours?.ToList(), IsActive = this.IsActive, }; } window.DialogResult = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.win = ((OSKernel.Presentation.Arranging.Administrative.Modify.Algo.ClassHour.Dialog.CreateNoOverlap)(target)); return; case 2: this.source_list = ((System.Windows.Controls.ListBox)(target)); return; case 3: this.target_list = ((System.Windows.Controls.ListBox)(target)); return; } this._contentLoaded = true; }
void cancel(object obj) { CreateNoOverlap window = obj as CreateNoOverlap; window.Close(); }