public NodeModelBase(string nodeName, string type) { NodeName = nodeName; nodeType = type; viewType = FrameController.GetInstence().MainFrameData.GetContent("Node", type, "ViewType"); renderType = FrameController.GetInstence().MainFrameData.GetContent("Node", type, "RenderType"); modelType = FrameController.GetInstence().MainFrameData.GetContent("Node", type, "ModelType"); }
public static NodeViewModelBase GetNodeViewModel(NodeModelBase nodeModel) { ViewType viewType = (ViewType)Enum.Parse(typeof(ViewType), FrameController.GetInstence().MainFrameData.GetContent("Node", nodeModel.nodeType, "ViewType")); switch (viewType) { case ViewType.CommonNode: return(new CommonNodeViewModel(nodeModel)); } return(new CommonNodeViewModel(nodeModel)); }
protected override void Create(FrameworkElement viewElement, string viewName) { view = viewElement.FindName("View") as DiagramView; view.DragEnter += OnDragEnter; view.DragOver += OnDragOver; view.DragLeave += OnDragLeave; view.Drop += OnDrop; foreach (string s in AcceptableSources) { var st = FrameController.GetInstence().AllPanel; allDragHelper.Add(new ItemsControlDragHelper(FrameController.GetInstence().AllPanel[s].FindName("Collection") as ItemsControl, view)); } }
public static NodeModelBase GetNodeModel(string nodeName, string type) { NodeModelType modelType = (NodeModelType)Enum.Parse(typeof(NodeModelType), FrameController.GetInstence().MainFrameData.GetContent("Node", type, "ModelType")); switch (modelType) { case NodeModelType.FreeDiagramNode: return(new FreeDiagramNodeModel(nodeName, type)); default: return(null); } }
public override void CreatePropertyFeature(FrameworkElement view, string viewName, string groupName) { AcceptableSources = FrameController.GetInstence().MainFrameData.GetOneElementAllContent("Panel", viewName, "Feature", groupName, "AcceptDrop", "Sources"); AcceptableType = FrameController.GetInstence().MainFrameData.GetOneElementAllContent("Panel", viewName, "Feature", groupName, "AcceptDrop", "Types"); Create(view, viewName); }