void save(object obj) { ChooseCourseWindow window = obj as ChooseCourseWindow; window.Courses = this.Courses.Where(c => !c.IsEnable && c.IsChecked)?.ToList(); window.DialogResult = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.win = ((OSKernel.Presentation.Arranging.Dialog.ChooseCourseWindow)(target)); return; case 2: this.btn_save = ((System.Windows.Controls.Button)(target)); return; case 3: this.btn_cancel = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
void cancel(object obj) { ChooseCourseWindow window = obj as ChooseCourseWindow; window.DialogResult = false; }