internal void NotifyWidgetNameChanged(object obj, string oldName, string newName, bool isRoot) { WidgetComponent c = obj != null ? (WidgetComponent)App.GetComponent(obj, null, null) : null; if (c != null) { c.UpdateName(newName); } if (isRoot) { WidgetInfo wi = GetWidget(oldName); if (wi != null) { wi.NotifyNameChanged(newName); } } GuiDispatch.InvokeSync( delegate { if (c != null) { if (ComponentNameChanged != null) { ComponentNameChanged(this, new ComponentNameEventArgs(this, c, oldName)); } } } ); }
internal void NotifyChanged(string rootWidgetName) { GuiDispatch.InvokeSync( delegate { if (Changed != null) { Changed(this, EventArgs.Empty); } // TODO: Optimize foreach (ProjectItemInfo it in widgets) { if (it.Name == rootWidgetName) { it.NotifyChanged(); } } foreach (ProjectItemInfo it in groups) { if (it.Name == rootWidgetName) { it.NotifyChanged(); } } } ); }
internal void NotifyComponentTypesChanged() { GuiDispatch.InvokeSync(delegate { if (ComponentTypesChanged != null) { ComponentTypesChanged(this, EventArgs.Empty); } }); }
internal void NotifyProjectReloading() { GuiDispatch.InvokeSync(delegate { if (ProjectReloading != null) { ProjectReloading(this, EventArgs.Empty); } }); }
public void NotifyRootWidgetChanging() { GuiDispatch.InvokeSync( delegate { if (!disposed) { designer.NotifyRootWidgetChanging(); } } ); }
internal void NotifySelectionChanged(object ob, bool canCut, bool canCopy, bool canPaste, bool canDelete) { GuiDispatch.InvokeSync( delegate { if (!disposed) { designer.NotifySelectionChanged(ob, canCut, canCopy, canPaste, canDelete); } } ); }
public void NotifyChanged() { GuiDispatch.InvokeSync( delegate { if (!disposed) { designer.NotifyChanged(); } } ); }
internal void NotifyModifiedChanged() { GuiDispatch.InvokeSync( delegate { if (ModifiedChanged != null) { ModifiedChanged(this, EventArgs.Empty); } } ); }
internal void NotifySignalChanged(object obj, string name, Signal oldSignal, Signal signal) { GuiDispatch.InvokeSync(delegate { if (SignalChanged != null) { Component c = App.GetComponent(obj, name, null); if (c != null) { SignalChanged(this, new ComponentSignalEventArgs(this, c, oldSignal, signal)); } } }); }
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 string ImportFile(string filePath) { if (importFileDelegate != null) { string res = null; GuiDispatch.InvokeSync(delegate { res = importFileDelegate(filePath); }); return(res); } else { return(filePath); } }
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); } }); }
internal void NotifyWidgetRemoved(string name) { GuiDispatch.InvokeSync( delegate { WidgetInfo wi = GetWidget(name); if (wi != null) { widgets.Remove(wi); if (WidgetRemoved != null) { WidgetRemoved(this, new WidgetInfoEventArgs(this, wi)); } } } ); }
internal void NotifyWidgetAdded(object obj, string name, string typeName) { GuiDispatch.InvokeSync( delegate { Component c = App.GetComponent(obj, name, typeName); if (c != null) { WidgetInfo wi = GetWidget(c.Name); if (wi == null) { wi = new WidgetInfo(this, c); widgets.Add(wi); } if (WidgetAdded != null) { WidgetAdded(this, new WidgetInfoEventArgs(this, wi)); } } } ); }