private void addButton_Click(object sender, RoutedEventArgs e)
        {
            AddScreen addScreen = new AddScreen();

            addScreen.Owner      = this;
            coverGrid.Visibility = Visibility.Visible;
            mainGrid.IsEnabled   = false;
            addScreen.ShowDialog();

            if (addScreen.DialogResult == true)
            {
                mainGrid.IsEnabled   = true;
                coverGrid.Visibility = Visibility.Collapsed;
                searchBox.Clear();
                showFavoriteCheckBox.IsChecked = false;
                filterButton.IsChecked         = false;

                PageInfomation.currentPage = 1;
                PageInfomation.pageSize    = 10;
                PageInfomation.itemCount   = Global.data.recipes.Count;
                updatePageInfomation();
                dataListView.ItemsSource = Global.data.recipes.Skip((PageInfomation.currentPage - 1) * PageInfomation.pageSize).Take(PageInfomation.pageSize);

                foodTypes = Global.data.recipesClassify();
                classificationListView.ItemsSource = foodTypes;
            }

            else
            {
                mainGrid.IsEnabled   = true;
                coverGrid.Visibility = Visibility.Collapsed;
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.addScreen = ((FoodRecipes.AddScreen)(target));
                return;

            case 2:
                this.addScreenBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 3:
                this.addScreenScrollBar = ((System.Windows.Controls.ScrollViewer)(target));
                return;

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

            case 5:
                this.line1 = ((System.Windows.Shapes.Line)(target));
                return;

            case 6:
                this.basicInformation = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.foodNameStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 8:
                this.foodNameLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.foodNameBox = ((System.Windows.Controls.TextBox)(target));

            #line 69 "..\..\AddScreen.xaml"
                this.foodNameBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 10:
                this.descriptionStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 11:
                this.descriptionLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 12:
                this.descriptionBox = ((System.Windows.Controls.TextBox)(target));

            #line 93 "..\..\AddScreen.xaml"
                this.descriptionBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 13:
                this.typeAndTimeStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 14:
                this.foodTypeLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.foodTypeBox = ((System.Windows.Controls.TextBox)(target));

            #line 116 "..\..\AddScreen.xaml"
                this.foodTypeBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 16:
                this.timeLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 17:
                this.timeBox = ((System.Windows.Controls.TextBox)(target));

            #line 132 "..\..\AddScreen.xaml"
                this.timeBox.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.timeBox_PreviewTextInput);

            #line default
            #line hidden

            #line 133 "..\..\AddScreen.xaml"
                this.timeBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 18:
                this.imageStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 19:
                this.imageLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 20:
                this.imageBox = ((System.Windows.Controls.TextBox)(target));

            #line 158 "..\..\AddScreen.xaml"
                this.imageBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 21:
                this.browseButton = ((System.Windows.Controls.Button)(target));

            #line 162 "..\..\AddScreen.xaml"
                this.browseButton.Click += new System.Windows.RoutedEventHandler(this.browseButton_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.imageBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 23:
                this.imageNotification = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 24:
                this.videoStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 25:
                this.videoLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 26:
                this.videoBox = ((System.Windows.Controls.TextBox)(target));

            #line 199 "..\..\AddScreen.xaml"
                this.videoBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 27:
                this.line2 = ((System.Windows.Shapes.Line)(target));
                return;

            case 28:
                this.stageInformation = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 29:
                this.firstStepLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 30:
                this.firstStepContentStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 31:
                this.firstStepContentLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 32:
                this.firstStepContentBox = ((System.Windows.Controls.TextBox)(target));

            #line 249 "..\..\AddScreen.xaml"
                this.firstStepContentBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 33:
                this.firstStepImageStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 34:
                this.firstStepImageLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 35:
                this.firstStepImageBox = ((System.Windows.Controls.TextBox)(target));

            #line 274 "..\..\AddScreen.xaml"
                this.firstStepImageBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 36:
                this.firstStepBrowseButton = ((System.Windows.Controls.Button)(target));

            #line 278 "..\..\AddScreen.xaml"
                this.firstStepBrowseButton.Click += new System.Windows.RoutedEventHandler(this.firstStepBrowseButton_Click);

            #line default
            #line hidden
                return;

            case 37:
                this.firstStepImageBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 38:
                this.firstStepImageNotification = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 39:
                this.stepsStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 40:
                this.addStepButton = ((System.Windows.Controls.Button)(target));

            #line 299 "..\..\AddScreen.xaml"
                this.addStepButton.Click += new System.Windows.RoutedEventHandler(this.addStepButton_Click);

            #line default
            #line hidden
                return;

            case 41:
                this.lastStepLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 42:
                this.lastStepContentStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 43:
                this.lastStepContentLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 44:
                this.lastStepContentBox = ((System.Windows.Controls.TextBox)(target));

            #line 331 "..\..\AddScreen.xaml"
                this.lastStepContentBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 45:
                this.lastStepImageStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 46:
                this.lastStepImageLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 47:
                this.lastStepImageBox = ((System.Windows.Controls.TextBox)(target));

            #line 356 "..\..\AddScreen.xaml"
                this.lastStepImageBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fillBox_TextChanged);

            #line default
            #line hidden
                return;

            case 48:
                this.lastStepBrowseButton = ((System.Windows.Controls.Button)(target));

            #line 360 "..\..\AddScreen.xaml"
                this.lastStepBrowseButton.Click += new System.Windows.RoutedEventHandler(this.lastStepBrowseButton_Click);

            #line default
            #line hidden
                return;

            case 49:
                this.lastStepImageBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 50:
                this.lastStepImageNotification = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 51:
                this.addScreenTitle = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 52:
                this.addButton = ((System.Windows.Controls.Button)(target));

            #line 402 "..\..\AddScreen.xaml"
                this.addButton.Click += new System.Windows.RoutedEventHandler(this.addButton_Click);

            #line default
            #line hidden
                return;

            case 53:
                this.backButton = ((System.Windows.Controls.Button)(target));

            #line 406 "..\..\AddScreen.xaml"
                this.backButton.Click += new System.Windows.RoutedEventHandler(this.backButton_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }