Example #1
0
        private void Printbtn_Click(object sender, RoutedEventArgs e)
        {
            BillPage billPage = new BillPage();

            billPage.Show();
        }
        public App()
        {
            InitializeComponent();

            MainPage = new BillPage();
        }
Example #3
0
        void BtnRedirectEvent(int thisIndex, int lastIndex)
        {
            if (optionBtn[thisIndex].Normalcolor != Color.FromArgb(65, 62, 83))
            {
                List <string> pageName = new List <string>
                {
                    "DashboardPg",
                    "productTypePg",
                    "BillMngPg",
                    "StatisticPg"
                };

                optionBtn[thisIndex].Active      = true;
                optionBtn[thisIndex].Normalcolor = Color.FromArgb(65, 62, 83);

                optionBtn[lastIndex].Active      = false;
                optionBtn[lastIndex].Normalcolor = Color.FromArgb(11, 7, 17);

                activeBar.Top = optionBtn[thisIndex].Top;
                activeBar.BringToFront();

                bunifuPages1.PageName = pageName[thisIndex];

                switch (thisIndex)
                {
                case 0:
                    dasboardTemplate = new DashboardPage();
                    DashboardPg.Controls.Add(dasboardTemplate);
                    break;

                case 1:
                    productTypeTemplate = new ProductTypePage();
                    productTypePg.Controls.Add(productTypeTemplate);
                    break;

                case 2:
                    billTemplate = new BillPage();
                    BillMngPg.Controls.Add(billTemplate);
                    break;

                case 3:
                    statisticTemplate = new StatisticPage();
                    StatisticPg.Controls.Add(statisticTemplate);
                    break;
                }

                switch (lastIndex)
                {
                case 0:
                    DashboardPg.Controls.Remove(dasboardTemplate);
                    dasboardTemplate.Dispose();
                    break;

                case 1:
                    productTypePg.Controls.Remove(productTypeTemplate);
                    productTypeTemplate.Dispose();
                    break;

                case 2:
                    BillMngPg.Controls.Remove(billTemplate);
                    billTemplate.Dispose();
                    break;

                case 3:
                    StatisticPg.Controls.Remove(statisticTemplate);
                    statisticTemplate.Dispose();
                    break;
                }
            }
        }