コード例 #1
0
ファイル: CarSystem.cs プロジェクト: ayaRayan93/TaxesSystem
        public void bindSparePartForm(DataRowView carRow, Cars cars)
        {
            CarSpareParts objForm = new CarSpareParts(carRow, cars, xtraTabControlCarsContent, this);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "قطع الغيار");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("قطع الغيار");
                xtraTabPage = getTabPage(xtraTabControlCarsContent, "قطع الغيار");
            }
            xtraTabPage.Controls.Clear();
            xtraTabPage.Controls.Add(objForm);
            xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }
コード例 #2
0
ファイル: CarSystem.cs プロジェクト: ayaRayan93/TaxesSystem
        //function
        //cars
        public void bindRecordCarForm(Cars cars)
        {
            Car_Record objForm = new Car_Record(cars, xtraTabControlCarsContent);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "أضافة سيارة");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("أضافة سيارة");
                xtraTabPage = getTabPage(xtraTabControlCarsContent, "أضافة سيارة");
            }
            xtraTabPage.Controls.Clear();
            xtraTabPage.Controls.Add(objForm);
            xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }
コード例 #3
0
ファイル: CarSystem.cs プロジェクト: ayaRayan93/TaxesSystem
        public void bindCarDriversForm(DataRowView carRow, Cars cars)
        {
            CarDrivers objForm = new CarDrivers(carRow, cars, xtraTabControlCarsContent);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "سائقي السيارة");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("سائقي السيارة");
                xtraTabPage = getTabPage(xtraTabControlCarsContent, "سائقي السيارة");
            }
            xtraTabPage.Controls.Clear();
            xtraTabPage.Controls.Add(objForm);
            xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }
コード例 #4
0
ファイル: CarSystem.cs プロジェクト: ayaRayan93/TaxesSystem
        //Cars
        private void navBarItem1_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            try
            {
                restForeColorOfNavBarItem();
                NavBarItem navBarItem = (NavBarItem)sender;
                navBarItem.Appearance.ForeColor = Color.Blue;
                if (!xtraTabControlCarsContent.Visible)
                {
                    xtraTabControlCarsContent.Visible = true;
                }

                XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "السيارات");
                if (xtraTabPage == null)
                {
                    xtraTabControlCarsContent.TabPages.Add("السيارات");
                    xtraTabPage = getTabPage(xtraTabControlCarsContent, "السيارات");
                }

                xtraTabPage.Controls.Clear();
                xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

                Cars objForm = new Cars(this);

                objForm.TopLevel = false;
                xtraTabPage.Controls.Add(objForm);
                objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                objForm.Dock            = DockStyle.Fill;
                //objForm.DisplayAtaqm();
                objForm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }