public object AddNewComponent(string fileName) { object ob = ProjectBackend.AddNewComponent(fileName); object component = App.GetComponent(ob, null, null); if (component is WidgetComponent) { var wc = (WidgetComponent)component; WidgetInfo wi = GetWidget(wc.Name); if (wi == null) { wi = new WidgetInfo(this, wc); widgets.Add(wi); } return(wi); } if (component is ActionGroupComponent) { var ac = (ActionGroupComponent)component; // Don't wait for the group added event to come to update the groups list since // it may be too late. ActionGroupInfo gi = GetActionGroup(ac.Name); if (gi == null) { gi = new ActionGroupInfo(this, ac.Name); groups.Add(gi); } return(gi); } return(null); }
internal void NotifyActionGroupRemoved(string group) { GuiDispatch.InvokeSync(delegate { ActionGroupInfo gi = GetActionGroup(group); if (gi != null) { groups.Remove(gi); if (ActionGroupsChanged != null) { ActionGroupsChanged(this, EventArgs.Empty); } } }); }
internal void NotifyActionGroupAdded(string group) { GuiDispatch.InvokeSync(delegate { ActionGroupInfo gi = GetActionGroup(group); if (gi == null) { gi = new ActionGroupInfo(this, group); groups.Add(gi); } if (ActionGroupsChanged != null) { ActionGroupsChanged(this, EventArgs.Empty); } }); }
public ActionGroupComponent AddNewActionGroup(XmlElement template) { object ob = ProjectBackend.AddNewActionGroupFromTemplate(template.OuterXml); ActionGroupComponent ac = (ActionGroupComponent)App.GetComponent(ob, null, null); // Don't wait for the group added event to come to update the groups list since // it may be too late. ActionGroupInfo gi = GetActionGroup(ac.Name); if (gi == null) { gi = new ActionGroupInfo(this, ac.Name); groups.Add(gi); } return(ac); }
internal void NotifyActionGroupAdded (string group) { GuiDispatch.InvokeSync (delegate { ActionGroupInfo gi = GetActionGroup (group); if (gi == null) { gi = new ActionGroupInfo (this, group); groups.Add (gi); } if (ActionGroupsChanged != null) ActionGroupsChanged (this, EventArgs.Empty); }); }
public void RemoveActionGroup (ActionGroupInfo group) { ActionGroupComponent ac = (ActionGroupComponent) group.Component; ProjectBackend.RemoveActionGroup ((Stetic.Wrapper.ActionGroup) ac.Backend); }
public ActionGroupComponent AddNewActionGroup (XmlElement template) { object ob = ProjectBackend.AddNewActionGroupFromTemplate (template.OuterXml); ActionGroupComponent ac = (ActionGroupComponent) App.GetComponent (ob, null, null); // Don't wait for the group added event to come to update the groups list since // it may be too late. ActionGroupInfo gi = GetActionGroup (ac.Name); if (gi == null) { gi = new ActionGroupInfo (this, ac.Name); groups.Add (gi); } return ac; }
public object AddNewComponent (string fileName) { object ob = ProjectBackend.AddNewComponent (fileName); object component = App.GetComponent (ob, null, null); if (component is WidgetComponent) { var wc = (WidgetComponent) component; WidgetInfo wi = GetWidget (wc.Name); if (wi == null) { wi = new WidgetInfo (this, wc); widgets.Add (wi); } return wi; } if (component is ActionGroupComponent) { var ac = (ActionGroupComponent) component; // Don't wait for the group added event to come to update the groups list since // it may be too late. ActionGroupInfo gi = GetActionGroup (ac.Name); if (gi == null) { gi = new ActionGroupInfo (this, ac.Name); groups.Add (gi); } return gi; } return null; }
public ActionGroupDesigner CreateActionGroupDesigner (ActionGroupInfo actionGroup, bool autoCommitChanges) { return new ActionGroupDesigner (this, null, actionGroup.Name, null, autoCommitChanges); }
public void RemoveActionGroup(ActionGroupInfo group) { ActionGroupComponent ac = (ActionGroupComponent)group.Component; ProjectBackend.RemoveActionGroup((Stetic.Wrapper.ActionGroup)ac.Backend); }
public ActionGroupDesigner CreateActionGroupDesigner(ActionGroupInfo actionGroup, bool autoCommitChanges) { return(new ActionGroupDesigner(this, null, actionGroup.Name, null, autoCommitChanges)); }