public NewCategory AddCategory(string name) { catWorkspace.TabPages.Add(name, name); catWorkspace.SelectedIndex = catWorkspace.TabCount - 1; NewCategory category = new NewCategory(this, catWorkspace.TabPages.Count - 1, name); categories.Add(category); //catWorkspace.TabPages[name].Controls.Add(category.); //catWorkspace.TabPages[name].BackColor = Color.DimGray; ; return category; }
public NewCategory AddCategory(string name) { catWorkspace.TabPages.Add(name, name); catWorkspace.SelectedIndex = catWorkspace.TabCount - 1; NewCategory category = new NewCategory(this, catWorkspace.TabPages.Count - 1, name); categories.Add(category); //catWorkspace.TabPages[name].Controls.Add(category.); //catWorkspace.TabPages[name].BackColor = Color.DimGray; ; return(category); }
public NewObjective(NewCategory owner, string name) { this.owner = owner; this.Location = FindLocation(); this.name = name; owner.Owner.Controls.Add(this); MakeLabel(); this.Click += new EventHandler(NewObjective_Click); this.BackColor = Color.LightBlue; this.Height = baseHeight; this.Width = baseWidth; this.BorderStyle = BorderStyle.FixedSingle; //this.Paint +=new PaintEventHandler(NewObjective_Paint); }
public NewObjective(NewCategory owner, string name) { this.owner = owner; this.Location = FindLocation(); this.name = name; owner.Owner.Controls.Add(this); MakeLabel(); this.Click += new EventHandler(NewObjective_Click); this.BackColor = Color.LightBlue; this.Height = baseHeight; this.Width = baseWidth; this.BorderStyle = BorderStyle.FixedSingle; //this.Paint +=new PaintEventHandler(NewObjective_Paint); }
public void RemoveObjective(NewObjective obj) { foreach (NewImperative imp in obj.Imperatives) { ClientDataControl.db.RemoveBOM(imp.Name, ClientDataControl.Client.EntityObject); } obj.Controls.Clear(); Controls.RemoveByKey(obj.ObjName); NewCategory cat = obj.owner; cat.objectives.Remove(obj); if (cat.Objectives.Count == 0) { Controls.Remove(cat); categories.Remove(cat); catWorkspace.TabPages.RemoveByKey(cat.name); } obj.Visible = false; ClientDataControl.db.SaveChanges(); }
public void RemoveImperative(NewImperative imp) { Controls.RemoveByKey(imp.Name); NewObjective obj = imp.owner; obj.Imperatives.Remove(imp); if (obj.Imperatives.Count == 0) { Controls.RemoveByKey(obj.ObjName); NewCategory cat = obj.owner; if (cat.Objectives.Count == 0) { Controls.Remove(cat); categories.Remove(cat); catWorkspace.TabPages.RemoveByKey(cat.name); } obj.Visible = false; } ClientDataControl.db.RemoveBOM(imp.Name, ClientDataControl.Client.EntityObject); ClientDataControl.db.SaveChanges(); Refresh(); }
public static bool AddCategory(NewCategory cat) { bomCategories.Add(cat); return(true); }
public static bool AddCategory(NewCategory cat) { bomCategories.Add(cat); return true; }