Пример #1
0
        public static void RemoveLoad(Loadout l)
        {
            Build build = Program.Builds.FirstOrDefault(b => b.ID == l.BuildID);

            BuildsPrintTo?.Invoke(null, PrintToEventArgs.GetEvent(build, "!"));
            l.Unlock();
            Loads.Remove(l);
        }
Пример #2
0
 /// <summary>
 /// Remove the specified object from
 /// </summary>
 /// <param name="mObject"></param>
 /// <returns></returns>
 public bool Deselect(ModelObject mObject)
 {
     if (mObject == null)
     {
         return(false);
     }
     else if (mObject is Element)
     {
         return(Elements.Remove((Element)mObject));
     }
     else if (mObject is Node)
     {
         return(Nodes.Remove((Node)mObject));
     }
     else if (mObject is Load)
     {
         return(Loads.Remove((Load)mObject));
     }
     else if (mObject is SectionFamily)
     {
         return(SectionFamilies.Remove((SectionFamily)mObject));
     }
     else if (mObject is BuildUpFamily)
     {
         return(BuildUpFamilies.Remove((BuildUpFamily)mObject));
     }
     else if (mObject is Material)
     {
         return(Materials.Remove((Material)mObject));
     }
     else if (mObject is ModelObjectSetBase)
     {
         return(Sets.Remove((ModelObjectSetBase)mObject));
     }
     else
     {
         return(false);
     }
 }