예제 #1
0
        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;
            }
        }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ObjectRequest = ((AccessSystem.Forms.FormRequest.Object)(target));

            #line 11 "..\..\..\..\Forms\FormRequest\Object.xaml"
                this.ObjectRequest.Loaded += new System.Windows.RoutedEventHandler(this.ObjectRequest_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.MenuItemSaveClose = ((System.Windows.Controls.MenuItem)(target));

            #line 17 "..\..\..\..\Forms\FormRequest\Object.xaml"
                this.MenuItemSaveClose.Click += new System.Windows.RoutedEventHandler(this.MenuItemSaveClose_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.MenuItemSave = ((System.Windows.Controls.MenuItem)(target));

            #line 20 "..\..\..\..\Forms\FormRequest\Object.xaml"
                this.MenuItemSave.Click += new System.Windows.RoutedEventHandler(this.MenuItemSave_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.Grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.TextBoxCode = ((System.Windows.Controls.TextBox)(target));

            #line 31 "..\..\..\..\Forms\FormRequest\Object.xaml"
                this.TextBoxCode.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.TextBoxCode_PreviewTextInput);

            #line default
            #line hidden

            #line 31 "..\..\..\..\Forms\FormRequest\Object.xaml"
                this.TextBoxCode.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.TextBoxCode_PreviewKeyDown);

            #line default
            #line hidden

            #line 31 "..\..\..\..\Forms\FormRequest\Object.xaml"
                this.TextBoxCode.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBoxCode_TextChanged);

            #line default
            #line hidden
                return;

            case 6:
                this.DatePickerDate = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 7:
                this.ComboBoxStatus = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 8:
                this.TextBoxUser = ((System.Windows.Controls.TextBox)(target));
                return;

            case 9:
                this.DataGridRole = ((System.Windows.Controls.DataGrid)(target));

            #line 56 "..\..\..\..\Forms\FormRequest\Object.xaml"
                this.DataGridRole.AutoGeneratedColumns += new System.EventHandler(this.DataGridRole_AutoGeneratedColumns);

            #line default
            #line hidden

            #line 57 "..\..\..\..\Forms\FormRequest\Object.xaml"
                this.DataGridRole.AutoGeneratingColumn += new System.EventHandler <System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs>(this.DataGridRole_AutoGeneratingColumn);

            #line default
            #line hidden
                return;

            case 10:
                this.TextBoxComment = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }