internal virtual FlowChartContainer GetContent(FlowChartModel model) { FlowChartContainer container = new FlowChartContainer(); model.Items.ForEach(x => container.Items.Add(x.GetComponent())); return container; }
internal void Load(FlowChartContainer container) { this.isReseting = true; this.SelectedComponent = null; this.Model.Items.Clear(); container.Items.ForEach(x => { BaseComponent c = (BaseComponent)Activator.CreateInstance(Type.GetType(x.Type)); c.SetComponent(x); this.Add(c); }); container.Items.ForEach(x => { BaseComponent c = this.Model.Items.Find(y => y.ID == x.ID); c.Accept(new ObjectCreateVisitor(Model, x)); }); this.view.Invalidate(); this.isReseting = false; }