private void OpenForm(string formName) { if (FindPageName(formName) == null) { openFormEvents.OpenForm += OpenOtherForm; } Page form = FindPageName(formName); if (form == null) { if (formName.EndsWith("Request")) { switch (formName) { case "ListRequest": form = new Forms.FormRequest.List(openFormEvents); break; case "ObjectRequest": form = new Forms.FormRequest.Object(openFormEvents); break; } } else if (formName.EndsWith("Base")) { switch (formName) { case "ListBase": form = new Forms.FormBase.List(openFormEvents); break; case "ObjectBase": form = new Forms.FormBase.Object(openFormEvents); break; } } else { return; } form.Loaded += OpenForm_Loaded; AddPageInListPages(formName, form); } //else // form.Loaded -= OpenForm_Loaded; if (form != null) { FrameMain.Content = form; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ListRequest = ((AccessSystem.Forms.FormRequest.List)(target)); return; case 2: this.ButtonCreate = ((System.Windows.Controls.MenuItem)(target)); #line 16 "..\..\..\..\Forms\FormRequest\List.xaml" this.ButtonCreate.Click += new System.Windows.RoutedEventHandler(this.ButtonCreate_Click); #line default #line hidden return; case 3: this.ButtonEdit = ((System.Windows.Controls.MenuItem)(target)); #line 19 "..\..\..\..\Forms\FormRequest\List.xaml" this.ButtonEdit.Click += new System.Windows.RoutedEventHandler(this.ButtonEdit_Click); #line default #line hidden return; case 4: this.Grid = ((System.Windows.Controls.Grid)(target)); return; case 5: this.DataGridList = ((System.Windows.Controls.DataGrid)(target)); #line 23 "..\..\..\..\Forms\FormRequest\List.xaml" this.DataGridList.AutoGeneratedColumns += new System.EventHandler(this.DataGridList_AutoGeneratedColumns); #line default #line hidden #line 24 "..\..\..\..\Forms\FormRequest\List.xaml" this.DataGridList.AutoGeneratingColumn += new System.EventHandler <System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs>(this.DataGridList_AutoGeneratingColumn); #line default #line hidden return; } this._contentLoaded = true; }