示例#1
0
        public void showConstraints()
        {
            if (currentStudent.Constraints != null)
            {
                string[] constraints = currentStudent.Constraints.Split(';');
                foreach (string constrain in constraints)
                {
                    if (constrain == "")
                    {
                        continue;
                    }
                    MatchCollection match = Regex.Matches(constrain, @"[0-9]+");
                    int             col   = int.Parse(match[0].ToString());
                    int             row   = int.Parse(match[1].ToString());
                    Rectangle       rec   = this.schdeulerWeeklyGrid.GetCellDisplayRectangle(col, row, true);

                    MetroTile c = new MetroTile();
                    c.Name     = "const_" + col + "_" + row;
                    c.Location = rec.Location;
                    c.Size     = rec.Size;
                    c.Enabled  = false;
                    c.Style    = MetroFramework.MetroColorStyle.Orange;

                    this.warpper.Controls.Add(c);
                    c.BringToFront();
                    c.Show();
                }
            }
        }
示例#2
0
        public void Clik(Object sender, EventArgs e)
        {
            MetroTile Mt = (MetroTile)sender;

            if (Mate != Mt)
            {
                Mate.Width          = 92;
                Mate.Height         = 42;
                Mate.Style          = MetroFramework.MetroColorStyle.Magenta;
                Mate.Left          += 15;
                Mt.Style            = MetroFramework.MetroColorStyle.Red;
                Mt.CausesValidation = true;
                Mt.BringToFront();
                Mate = Mt;
            }
            else
            {
                Mate.BringToFront();
            }
        }
示例#3
0
        public void focuser(object sender, EventArgs e)
        {
            DateTime D = DateTime.Now;

            metroLabel1.Text = D.ToString();
            PB();
            MetroTile Mt = (MetroTile)sender;

            if (Mt != Mate)
            {
                if (Mt.Style != MetroFramework.MetroColorStyle.Magenta)
                {
                    Mt.Width  = 118;
                    Mt.Height = 150;
                    Mt.Style  = MetroFramework.MetroColorStyle.Green;
                    Mt.Left  -= 15;
                    Mt.BringToFront();
                    Mt.Refresh();
                }
            }
        }
示例#4
0
        public void defocuser(object sender, EventArgs e)
        {
            MetroTile Mt = (MetroTile)sender;

            if (Mt != Mate)
            {
                if (Mt.Style != MetroFramework.MetroColorStyle.Magenta)
                {
                    Mt.Width  = 92;
                    Mt.Height = 42;
                    Mt.Style  = MetroFramework.MetroColorStyle.Blue;
                    Mt.Left  += 15;
                    Mt.BringToFront();
                    Mt.Refresh();
                    metroProgressBar2.BringToFront();
                    metroProgressBar1.BringToFront();
                    metroProgressBar3.BringToFront();
                    metroProgressBar4.BringToFront();
                    metroProgressBar5.BringToFront();
                }
            }
        }