//
        //
        //  CARLO - START
        //
        //

        public Content_Tables()
        {
            InitializeComponent();

            tableOrderCollection = new Collection<TableOrder>();
            for (int i = 1; i <= 31; i++)
            {
                TableOrder to = new TableOrder(i);
                tableOrderCollection.Add(to);
            }

            fTableOrder = new Form_TableOrder();
            Parent_Grid.Children.Add(fTableOrder);

            fTableOrder.Visibility = Visibility.Hidden;

            fTableOrder.itemFormButtonClicked += InflateForm_AddItem;
            fTableOrder.paymentFormButtonClicked += InflateForm_Payment;
            fTableOrder.closeFormButtonClicked += CloseForm;
            fTableOrder.deleteItem += DeleteItemFromTableOrder;
            fTableOrder.disableAddItemForm += DisableFormAddItem;
            fTableOrder.enableAddItemForm += EnableFormAddItem;


            fAddItem = new Form_AddItem();
            Parent_Grid.Children.Add(fAddItem);

            fAddItem.Visibility = Visibility.Hidden;

            fAddItem.addItemButtonClicked += AddItemToTableOrder;
            fAddItem.closeFormButtonClicked += CloseForm;


            fPayment = new Form_Payment();
            Parent_Grid.Children.Add(fPayment);

            fPayment.Visibility = Visibility.Hidden;
            fPayment.confrimButtonClicked += ProcessTransaction;
            fPayment.closeFormButtonClicked += CloseForm;

        }
        //
        //
        //  CARLO - START
        //
        //

        public Content_Tables()
        {
            InitializeComponent();

            tableOrderCollection = new Collection <TableOrder>();
            for (int i = 1; i <= 31; i++)
            {
                TableOrder to = new TableOrder(i);
                tableOrderCollection.Add(to);
            }

            fTableOrder = new Form_TableOrder();
            Parent_Grid.Children.Add(fTableOrder);

            fTableOrder.Visibility = Visibility.Hidden;

            fTableOrder.itemFormButtonClicked    += InflateForm_AddItem;
            fTableOrder.paymentFormButtonClicked += InflateForm_Payment;
            fTableOrder.closeFormButtonClicked   += CloseForm;
            fTableOrder.deleteItem         += DeleteItemFromTableOrder;
            fTableOrder.disableAddItemForm += DisableFormAddItem;
            fTableOrder.enableAddItemForm  += EnableFormAddItem;


            fAddItem = new Form_AddItem();
            Parent_Grid.Children.Add(fAddItem);

            fAddItem.Visibility = Visibility.Hidden;

            fAddItem.addItemButtonClicked   += AddItemToTableOrder;
            fAddItem.closeFormButtonClicked += CloseForm;


            fPayment = new Form_Payment();
            Parent_Grid.Children.Add(fPayment);

            fPayment.Visibility              = Visibility.Hidden;
            fPayment.confrimButtonClicked   += ProcessTransaction;
            fPayment.closeFormButtonClicked += CloseForm;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.FormAddItem = ((ICTProjectPOS.Form_AddItem)(target));
                return;

            case 2:
                this.Rectangle1 = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 3:
                this.Rectangle2 = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 4:
                this.Rectangle3 = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 5:
                this.TextBlock_AddItemHeader = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.Button_Close = ((System.Windows.Controls.Button)(target));

            #line 41 "..\..\Form_AddItem.xaml"
                this.Button_Close.Click += new System.Windows.RoutedEventHandler(this.Button_Close_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.TextBlock_FoodHeader = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.Button_FoodCategory1 = ((System.Windows.Controls.Button)(target));

            #line 56 "..\..\Form_AddItem.xaml"
                this.Button_FoodCategory1.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.Button_FoodCategory2 = ((System.Windows.Controls.Button)(target));

            #line 62 "..\..\Form_AddItem.xaml"
                this.Button_FoodCategory2.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.Button_FoodCategory3 = ((System.Windows.Controls.Button)(target));

            #line 68 "..\..\Form_AddItem.xaml"
                this.Button_FoodCategory3.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.Button_FoodCategory4 = ((System.Windows.Controls.Button)(target));

            #line 74 "..\..\Form_AddItem.xaml"
                this.Button_FoodCategory4.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.Button_FoodCategory5 = ((System.Windows.Controls.Button)(target));

            #line 80 "..\..\Form_AddItem.xaml"
                this.Button_FoodCategory5.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.Button_FoodCategory6 = ((System.Windows.Controls.Button)(target));

            #line 86 "..\..\Form_AddItem.xaml"
                this.Button_FoodCategory6.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

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

            case 15:
                this.Button_BeverageCategory1 = ((System.Windows.Controls.Button)(target));

            #line 102 "..\..\Form_AddItem.xaml"
                this.Button_BeverageCategory1.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.Button_BeverageCategory2 = ((System.Windows.Controls.Button)(target));

            #line 108 "..\..\Form_AddItem.xaml"
                this.Button_BeverageCategory2.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.Button_BeverageCategory3 = ((System.Windows.Controls.Button)(target));

            #line 114 "..\..\Form_AddItem.xaml"
                this.Button_BeverageCategory3.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.Button_BeverageCategory4 = ((System.Windows.Controls.Button)(target));

            #line 120 "..\..\Form_AddItem.xaml"
                this.Button_BeverageCategory4.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);

            #line default
            #line hidden
                return;

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

            case 20:
                this.TableAddItem = ((ICTProjectPOS.Table_AddItem)(target));
                return;

            case 21:
                this.TextBlock_ItemName = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 22:
                this.Button_DecreaseQty = ((System.Windows.Controls.Button)(target));

            #line 152 "..\..\Form_AddItem.xaml"
                this.Button_DecreaseQty.Click += new System.Windows.RoutedEventHandler(this.Button_Quantity_Click);

            #line default
            #line hidden
                return;

            case 23:
                this.Button_IncreaseQty = ((System.Windows.Controls.Button)(target));

            #line 158 "..\..\Form_AddItem.xaml"
                this.Button_IncreaseQty.Click += new System.Windows.RoutedEventHandler(this.Button_Quantity_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.TextBlock_ItemQuantity = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 25:
                this.Button_AddItem = ((System.Windows.Controls.Button)(target));

            #line 186 "..\..\Form_AddItem.xaml"
                this.Button_AddItem.Click += new System.Windows.RoutedEventHandler(this.Button_AddItem_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #4
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.FormAddItem = ((ICTProjectPOS.Form_AddItem)(target));
     return;
     case 2:
     this.Rectangle1 = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 3:
     this.Rectangle2 = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 4:
     this.Rectangle3 = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 5:
     this.TextBlock_AddItemHeader = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 6:
     this.Button_Close = ((System.Windows.Controls.Button)(target));
     
     #line 41 "..\..\Form_AddItem.xaml"
     this.Button_Close.Click += new System.Windows.RoutedEventHandler(this.Button_Close_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.TextBlock_FoodHeader = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 8:
     this.Button_FoodCategory1 = ((System.Windows.Controls.Button)(target));
     
     #line 56 "..\..\Form_AddItem.xaml"
     this.Button_FoodCategory1.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.Button_FoodCategory2 = ((System.Windows.Controls.Button)(target));
     
     #line 62 "..\..\Form_AddItem.xaml"
     this.Button_FoodCategory2.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 10:
     this.Button_FoodCategory3 = ((System.Windows.Controls.Button)(target));
     
     #line 68 "..\..\Form_AddItem.xaml"
     this.Button_FoodCategory3.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 11:
     this.Button_FoodCategory4 = ((System.Windows.Controls.Button)(target));
     
     #line 74 "..\..\Form_AddItem.xaml"
     this.Button_FoodCategory4.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 12:
     this.Button_FoodCategory5 = ((System.Windows.Controls.Button)(target));
     
     #line 80 "..\..\Form_AddItem.xaml"
     this.Button_FoodCategory5.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     this.Button_FoodCategory6 = ((System.Windows.Controls.Button)(target));
     
     #line 86 "..\..\Form_AddItem.xaml"
     this.Button_FoodCategory6.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.TextBlock_BeverageHeader = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 15:
     this.Button_BeverageCategory1 = ((System.Windows.Controls.Button)(target));
     
     #line 102 "..\..\Form_AddItem.xaml"
     this.Button_BeverageCategory1.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.Button_BeverageCategory2 = ((System.Windows.Controls.Button)(target));
     
     #line 108 "..\..\Form_AddItem.xaml"
     this.Button_BeverageCategory2.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     this.Button_BeverageCategory3 = ((System.Windows.Controls.Button)(target));
     
     #line 114 "..\..\Form_AddItem.xaml"
     this.Button_BeverageCategory3.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 18:
     this.Button_BeverageCategory4 = ((System.Windows.Controls.Button)(target));
     
     #line 120 "..\..\Form_AddItem.xaml"
     this.Button_BeverageCategory4.Click += new System.Windows.RoutedEventHandler(this.ButtonCategory_Click);
     
     #line default
     #line hidden
     return;
     case 19:
     this.TextBlock_ItemListHeader = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 20:
     this.TableAddItem = ((ICTProjectPOS.Table_AddItem)(target));
     return;
     case 21:
     this.TextBlock_ItemName = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 22:
     this.Button_DecreaseQty = ((System.Windows.Controls.Button)(target));
     
     #line 152 "..\..\Form_AddItem.xaml"
     this.Button_DecreaseQty.Click += new System.Windows.RoutedEventHandler(this.Button_Quantity_Click);
     
     #line default
     #line hidden
     return;
     case 23:
     this.Button_IncreaseQty = ((System.Windows.Controls.Button)(target));
     
     #line 158 "..\..\Form_AddItem.xaml"
     this.Button_IncreaseQty.Click += new System.Windows.RoutedEventHandler(this.Button_Quantity_Click);
     
     #line default
     #line hidden
     return;
     case 24:
     this.TextBlock_ItemQuantity = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 25:
     this.Button_AddItem = ((System.Windows.Controls.Button)(target));
     
     #line 186 "..\..\Form_AddItem.xaml"
     this.Button_AddItem.Click += new System.Windows.RoutedEventHandler(this.Button_AddItem_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }