예제 #1
0
        private void Show_Disciplines()
        {
            disciplineGroupBox.Location  = new Point(this.Width / 4, this.Height / 4);
            disciplineGroupBox.ForeColor = Color.Black;
            disciplineGroupBox.Width     = this.Width / 2;
            disciplineGroupBox.Height    = this.Height / 2;
            disciplineGroupBox.Show();
            centerGroupBox.Hide();
            btnNext.Hide();
            RadioButton cb;
            int         i;

            for (i = 0; i < selectedMajor.Item1.Count(); i++)
            {
                cb          = new RadioButton();
                cb.Text     = selectedMajor.Item1[i];
                cb.Width    = disciplineGroupBox.Width - 50;
                cb.Height   = 3 * cb.Height;
                cb.Location = new Point(25, (i + 1) * 50);
                cb.Show();
                disciplineGroupBox.Controls.Add(cb);
                disciplineButtons.Add(cb);
            }
            Button btn = new Button();

            btn.Width    = 125;
            btn.Height   = 75;
            btn.Text     = "Next";
            btn.Location = new Point(10, 50 + (i + 2) * 50);
            btn.Click   += new EventHandler(Discipline_Click);
            disciplineGroupBox.Controls.Add(btn);
            btn.Show();
        }
예제 #2
0
 /// <summary>
 /// kończy grę i wyświetla komunikat z sumą zdobytych punktów
 /// </summary>
 /// <param name="Question"></param>
 private void KoniecGry(GroupBox Question)
 {
     Question.Hide();
     MessageBox.Show($"{Name} zdobyłeś {score} punktów", "Koniec Gry", MessageBoxButtons.OK);
     quizDatabase.AddToLeaderboard(this.Name, this.score.ToString());
     counterQuestions = 1;
 }
예제 #3
0
        public Form1()
        {
            InitializeComponent();
            socket = new Socket();

            functions = GB_Functions;


            functions.Hide();
        }
예제 #4
0
        //Creating the groupbox that will hold a summary of the agent's data
        GroupBox AgentPanel(Agent agent)
        {
            GroupBox agentBox = new GroupBox();
            int      yPoint   = agentList.Count > 1 ? ((agentList.Count - 1) * 70) + 3 : 3;

            agentBox.Location     = new Point(3, yPoint);
            agentBox.Size         = new Size(254, 70);
            agentBox.DoubleClick += agent.DisplayAgentInformation;
            agentBox.Click       += agent.AgentSelect;

            PictureBox mainJob = new PictureBox();

            agentBox.Controls.Add(mainJob);
            mainJob.Location = new Point(6, 13);
            mainJob.Size     = new Size(50, 50);
            mainJob.SizeMode = PictureBoxSizeMode.Zoom;
            mainJob.Image    = IconPath.GetIcon(agent.mainJob.jobType);

            Label agentLabel = new Label();

            agentBox.Controls.Add(agentLabel);
            agentLabel.Location = new Point(62, 16);
            agentLabel.Text     = agent.name;

            GroupBox progressBox = new GroupBox();

            agentBox.Controls.Add(progressBox);
            progressBox.Location = new Point(62, 31);
            progressBox.Size     = new Size(188, 32);
            progressBox.Hide();

            ProgressBar progressBar = new ProgressBar();

            progressBox.Controls.Add(progressBar);
            progressBar.Location = new Point(3, 10);
            progressBar.Size     = new Size(158, 17);

            PictureBox progressJob = new PictureBox();

            progressBox.Controls.Add(progressJob);
            progressJob.Location = new Point(165, 8);
            progressJob.Size     = new Size(20, 20);
            progressJob.SizeMode = PictureBoxSizeMode.Zoom;

            agent.listBox.agentBox    = agentBox;
            agent.listBox.mainJob     = mainJob;
            agent.listBox.agentLabel  = agentLabel;
            agent.listBox.progressBox = progressBox;
            agent.listBox.progressBar = progressBar;
            agent.listBox.progressJob = progressJob;

            return(agentBox);
        }
예제 #5
0
    protected void UpdateUIStorage()
    {
        switch (((ManagerDbTypeItem)uiDatabaseTypeComboBox.SelectedItem).Value)
        {
        case ManagerStorageEnum.InMemory:
            uiDatabaseFileGroupBox.Visible   = false;
            uiDatabaseServerGroupBox.Visible = false;
            break;

        case ManagerStorageEnum.db4o:
            uiDatabaseFileGroupBox.Visible = true;
            uiDatabaseFileGroupBox.Show();
            uiDatabaseServerGroupBox.Visible = false;
            uiDatabaseServerGroupBox.Hide();
            break;

        default:
            uiDatabaseFileGroupBox.Visible   = false;
            uiDatabaseServerGroupBox.Visible = true;
            break;
        }
    }
예제 #6
0
 private void HideGroupBox(object sender, EventArgs e, GroupBox g)
 {
     g.Hide();
 }