Example #1
0
        public TestingMenu()
        {
            InitializeComponent();

            this.Loaded += TestingMenu_Loaded;

            Server = Server.Instance;
            Server.GetAvailableTestsResponse += Server_GetTestsResponse;
            Server.GetFailedTestsResponse    += Server_GetTestsResponse;
            Server.GetComplitedTestsResponse += Server_GetTestsResponse;
            AvailableTestList = new List <List <object> >();

            NavigationWorker = new NavigationWorker(NavigationPanel);

            TransButton all = new TransButton("Доступные", false, false, false);

            all.FontSize = 16;
            NavigationWorker.AddButton(all, DisplayAll);

            TransButton complited = new TransButton("Пройденные", false, false, false);

            complited.FontSize = 16;
            NavigationWorker.AddButton(complited, DisplayComplited);

            TransButton failed = new TransButton("Проваленные", false, false, false);

            failed.FontSize = 16;
            NavigationWorker.AddButton(failed, DisplayFailed);
        }
Example #2
0
        public ArrayList getTables(string storeID, string sectionName)
        {
            ArrayList mangButton = new ArrayList();
            DataTable tbl        = getGui.GetAllTablesBySectionID(storeID, sectionName);

            for (int i = 0; i < tbl.Rows.Count; i++)
            {
                if ((int)tbl.Rows[i][10] == 0)
                {
                    int x         = (int)tbl.Rows[i][4];
                    int y         = (int)tbl.Rows[i][5];
                    int height    = (int)tbl.Rows[i][6];
                    int width     = (int)tbl.Rows[i][7];
                    int shapeType = (int)tbl.Rows[i][3];
                    TransButton.Shape shape;
                    if (shapeType == 0)
                    {
                        shape = TransButton.Shape.Rec;
                    }
                    else if (shapeType == 1)
                    {
                        shape = TransButton.Shape.Square;
                    }
                    else
                    {
                        shape = TransButton.Shape.Elip;
                    }

                    var tmpBut = new TransButton(x, y, width, height);
                    tmpBut.ForeColor   = Color.FromArgb((int)tbl.Rows[i][13]);
                    tmpBut.BorderColor = Color.FromArgb((int)tbl.Rows[i][13]);
                    if (tbl.Rows[i][17].ToString() != "")
                    {
                        tmpBut.cashierId = tbl.Rows[i][16].ToString();
                        if (tbl.Rows[i][16].ToString() == StaticClass.cashierId)
                        {
                            tmpBut.BackColor = Color.Green;
                        }
                        else
                        {
                            tmpBut.BackColor = Color.Orange;
                        }
                        if (Convert.ToBoolean(tbl.Rows[i][15]))
                        {
                            tmpBut.BackColor = Color.Red;
                            tmpBut.ForeColor = Color.Gray;
                            tmpBut.Enabled   = false;
                        }
                        tmpBut.invoiceNum = tbl.Rows[i][17].ToString();
                    }

                    tmpBut.ButtonShape = shape;
                    tmpBut.tableName   = tbl.Rows[i][2].ToString();
                    tmpBut.ButtonText  = tbl.Rows[i][2].ToString();
                    mangButton.Add(tmpBut);
                }
            }
            return(mangButton);
        }
Example #3
0
        public TestsControlPage()
        {
            InitializeComponent();

            NavigationWorker navigationWorker = new NavigationWorker(NavigationPanel);

            TransButton all = new TransButton("Доступные", false, false, false);

            all.FontSize = 16;
            navigationWorker.AddButton(all, delegate() { });

            TransButton created = new TransButton("Созданные", false, false, false);

            created.FontSize = 16;
            navigationWorker.AddButton(created, delegate() { });

            navigationWorker.NavigateTo(0);
        }