public static void LoadSettings(ObjectToolPanel ToolPanel) { if (htAssembly.Count == 0) { BackgroundLoading(ToolPanel); } }
public ObjectManager(IObjectCanvas Canvas, PropertyGrid propertyGrid, ObjectToolPanel ToolPanel) { this.StartPoint = ObjectPoint.Empty; this.EndPoint = ObjectPoint.Empty; this.objects = new ObjectCollection(); LoadSettings(ToolPanel); this.SetHandler(Canvas, propertyGrid, ToolPanel); if (ToolPanel != null) { ToolPanel.LoadObjectTool(); } }
private void SetHandler(IObjectCanvas Canvas, PropertyGrid propertyGrid, ObjectToolPanel ToolPanel) { if (Canvas != null) { this.SetCanvas(Canvas); } if (propertyGrid != null) { this.SetPropertyGrid(propertyGrid); } if (ToolPanel != null) { this.SetToolPanel(ToolPanel); this.AfterCreateStart = (ObjectEventHandler)Delegate.Combine(this.AfterCreateStart, new ObjectEventHandler(this.ObjectManager_AfterCreateStart)); this.AfterSelect = (ObjectEventHandler)Delegate.Combine(this.AfterSelect, new ObjectEventHandler(this.ObjectManager_AfterSelect)); this.AfterCreateFinished = (ObjectEventHandler)Delegate.Combine(this.AfterCreateFinished, new ObjectEventHandler(ToolPanel.Manager_AfterCreateFinished)); this.AfterCreateFinished = (ObjectEventHandler)Delegate.Combine(this.AfterCreateFinished, new ObjectEventHandler(this.ObjectManager_AfterCreateFinished)); } }
public void SetToolPanel(ObjectToolPanel ToolPanel) { this.ToolPanel = ToolPanel; ToolPanel.ToolsChanged += new EventHandler(this.ToolPanel_ToolsChanged); }