Inheritance: ProjectItemInfo
Example #1
0
        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);
        }
Example #2
0
 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);
             }
         }
     });
 }
Example #3
0
 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);
         }
     });
 }
Example #4
0
        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);
        }
Example #5
0
		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);
			});
		}
Example #6
0
		public void RemoveActionGroup (ActionGroupInfo group)
		{
			ActionGroupComponent ac = (ActionGroupComponent) group.Component;
			ProjectBackend.RemoveActionGroup ((Stetic.Wrapper.ActionGroup) ac.Backend);
		}
Example #7
0
		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;
		}
Example #8
0
		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;
		}
Example #9
0
		public ActionGroupDesigner CreateActionGroupDesigner (ActionGroupInfo actionGroup, bool autoCommitChanges)
		{
			return new ActionGroupDesigner (this, null, actionGroup.Name, null, autoCommitChanges);
		}
Example #10
0
        public void RemoveActionGroup(ActionGroupInfo group)
        {
            ActionGroupComponent ac = (ActionGroupComponent)group.Component;

            ProjectBackend.RemoveActionGroup((Stetic.Wrapper.ActionGroup)ac.Backend);
        }
Example #11
0
 public ActionGroupDesigner CreateActionGroupDesigner(ActionGroupInfo actionGroup, bool autoCommitChanges)
 {
     return(new ActionGroupDesigner(this, null, actionGroup.Name, null, autoCommitChanges));
 }