Ejemplo n.º 1
0
        private void commandExecution(int command, int id)
        {
            if (command == 1)
            {
                navigationListView.SelectedIndex = 1;
                DetailUserControl detailUserControl = new DetailUserControl(id);
                mainGrid.Children.Clear();
                mainGrid.Children.Add(detailUserControl);

                detailUserControl.commandExecutionHandler += commandExecution;
            }

            else if (command == 2)
            {
                navigationListView.SelectedIndex = 2;
                AddingUserControl addingUserControl = new AddingUserControl(1, id);
                mainGrid.Children.Clear();
                mainGrid.Children.Add(addingUserControl);

                addingUserControl.commandExecutionHandler += commandExecution;
            }

            else if (command == 3)
            {
                navigationListView.SelectedIndex = 0;
                ListUserControl listUserControl = new ListUserControl();
                mainGrid.Children.Clear();
                mainGrid.Children.Add(listUserControl);

                listUserControl.commandExecutionHandler += commandExecution;
            }

            else if (command == 4)
            {
                navigationListView.SelectedIndex = 1;
                DetailUserControl detailUserControl = new DetailUserControl(id);
                mainGrid.Children.Clear();
                mainGrid.Children.Add(detailUserControl);

                detailUserControl.commandExecutionHandler += commandExecution;
            }

            else if (command == 5)
            {
                if (id != -1)
                {
                    navigationListView.SelectedIndex = 1;
                    DetailUserControl detailUserControl = new DetailUserControl(id);
                    mainGrid.Children.Clear();
                    mainGrid.Children.Add(detailUserControl);

                    detailUserControl.commandExecutionHandler += commandExecution;
                }

                else
                {
                    navigationListView.SelectedIndex = 0;
                    ListUserControl listUserControl = new ListUserControl();
                    mainGrid.Children.Clear();
                    mainGrid.Children.Add(listUserControl);

                    listUserControl.commandExecutionHandler += commandExecution;
                }
            }
        }
Ejemplo n.º 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.detailUserControl = ((WeSplit.DetailUserControl)(target));

            #line 12 "..\..\DetailUserControl.xaml"
                this.detailUserControl.Loaded += new System.Windows.RoutedEventHandler(this.detailUserControl_Loaded);

            #line default
            #line hidden
                return;

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

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

            case 4:
                this.updateButton = ((System.Windows.Controls.Button)(target));

            #line 128 "..\..\DetailUserControl.xaml"
                this.updateButton.Click += new System.Windows.RoutedEventHandler(this.updateButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.deleteButton = ((System.Windows.Controls.Button)(target));

            #line 131 "..\..\DetailUserControl.xaml"
                this.deleteButton.Click += new System.Windows.RoutedEventHandler(this.deleteButton_Click);

            #line default
            #line hidden
                return;

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

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

            case 8:
                this.pieChart = ((LiveCharts.Wpf.PieChart)(target));
                return;

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

            case 10:
                this.imageListView = ((System.Windows.Controls.ListView)(target));
                return;

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

            case 12:
                this.cartesianChart = ((LiveCharts.Wpf.CartesianChart)(target));
                return;

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

            case 14:
                this.summaryBackgoundBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 15:
                this.summaryListView = ((System.Windows.Controls.ListView)(target));
                return;
            }
            this._contentLoaded = true;
        }