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(); } } }
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(); } }
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(); } } }
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(); } } }