protected FlowCommand(FlowAreaControl areaControl, ArrowControl arrowControl, SourceItemControl src, SourceItemControl dest) { this.areaControl = areaControl; this.arrowControl = arrowControl; this.src = src; this.dest = dest; }
public ScopeJoinManager(FlowAreaControl flowAreaControl, Command.CommandManager commandManager, MoveManager moveManager) { this.flowAreaControl = flowAreaControl; this.commandManager = commandManager; this.moveManager = moveManager; commandSet = new CommandSet(); moveManager.ControlPressed += moveManager_ControlPressed; moveManager.MoveEnd += moveManager_MoveEnd; }
public AddBoundCommentBommand(FlowAreaControl areaControl, SourceControl sourceControl) : base(areaControl, sourceControl, new BoundCommentControl { DataContext = new Model.Comment { Text = "Comment" } }) { }
public CopyData(FlowAreaControl areaControl, Source[] sources, Connection[] connections, Connection[] externalConnections, Comment[] comments) { AreaControl = areaControl; Sources = sources; Connections = connections; ExternalConnections = externalConnections; Comments = comments; }
public void Initialize() { controls[0].IsMoved = false; mouseDownPos = controls[0].PointToScreen(Mouse.GetPosition(controls[0])); moveInfos = controls.Select(c => new MoveInfo { OffsetX = c.CurrentPositionable.Position.X, OffsetY = c.CurrentPositionable.Position.Y }).ToArray(); areaControl = Utility.GetParent <FlowAreaControl>(controls[0]); areaControl.MouseMove += areaControl_MouseMove; areaControl.MouseUp += areaControl_MouseUp; areaControl.MouseLeave += areaControl_MouseLeave; areaControl.KeyDown += areaControl_KeyDown; areaShift = new Point(areaControl.CurrentShiftX, areaControl.CurrentShiftY); }
public AddSourceCommand(FlowAreaControl areaControl, SourceControl sourceControl) { this.areaControl = areaControl; SourceControl = sourceControl; }
public RemoveScopeCommand(FlowAreaControl flowAreaControl, ScopeControl scopeControl, ScopeControl parentScopeControl) : base(flowAreaControl, scopeControl, parentScopeControl) { }
public RemoveSelectableFromScopeCommand(FlowAreaControl flowAreaControl, ScopeControl scopeControl, PositionableControl positionableControl) : base(flowAreaControl, scopeControl, positionableControl) { }
public AddCommentCommand(FlowAreaControl areaControl, double posX, double posY) { this.areaControl = areaControl; CommentControl = areaControl.CreateComment(); CommentControl.CurrentComment.Position = new Point(posX, posY); }
protected EditScopeCommandBase(FlowAreaControl flowAreaControl, ScopeControl scopeControl, PositionableControl positionableControl) { this.flowAreaControl = flowAreaControl; this.scopeControl = scopeControl; this.positionableControl = positionableControl; }
private void FlowDrawPanel_Load(object sender, EventArgs e) { if (sourceCache == null) { sourceCache = new Dictionary <string, AssemblyAndTypeAndSource[]>(); foreach (IGrouping <string, AssemblyAndTypeAndSource> ss in flowSources.Select(a => new AssemblyAndTypeAndSource(a)).GroupBy(a => a.Source.Name).ToArray()) { var sources = ss.ToArray(); Array.Sort(sources, (a1, a2) => { int count1 = a1.Source.InProperties.Count + a1.Source.InMethods.Count + a1.Source.OutProperties.Count + a1.Source.OutMethods.Count; int count2 = a2.Source.InProperties.Count + a2.Source.InMethods.Count + a2.Source.OutProperties.Count + a2.Source.OutMethods.Count; if (count1 > count2) { return(1); } if (count1 < count2) { return(-1); } if (a1.Source.InProperties.Count > a2.Source.InProperties.Count) { return(1); } if (a1.Source.InProperties.Count < a2.Source.InProperties.Count) { return(-1); } if (a1.Source.OutProperties.Count > a2.Source.OutProperties.Count) { return(1); } if (a1.Source.OutProperties.Count < a2.Source.OutProperties.Count) { return(-1); } if (a1.Source.InMethods.Count > a2.Source.InMethods.Count) { return(1); } if (a1.Source.InMethods.Count < a2.Source.InMethods.Count) { return(-1); } if (a1.Source.OutMethods.Count > a2.Source.OutMethods.Count) { return(1); } if (a1.Source.OutMethods.Count < a2.Source.OutMethods.Count) { return(-1); } int point = 0; foreach (CustomMemberInfo <PropertyInfo> propertyInfo1 in a1.Source.InProperties) { var propertyInfo2 = a2.Source.InProperties.FirstOrDefault(c => c.MemberInfo.Name == propertyInfo1.MemberInfo.Name); if (propertyInfo2 != null && propertyInfo1.MemberInfo.PropertyType != propertyInfo2.MemberInfo.PropertyType) { if (TypeConverterManager.CanConvert(propertyInfo2.MemberInfo.PropertyType, propertyInfo1.MemberInfo.PropertyType)) { point--; } else { point++; } } } return(point); }); sourceCache.Add(ss.Key, sources); } } foreach (KeyValuePair <string, AssemblyAndTypeAndSource[]> group in sourceCache) { foreach (AssemblyAndTypeAndSource source in group.Value) { try { CreateToolStripMenuItem(source); } catch (Exception ex) { MessageBox.Show(ex.Message); #if DEBUG MessageBox.Show(ex.StackTrace); #endif } } } areaControl = new FlowAreaControl(); areaControl.DragEnter += areaControl_DragEnter; areaControl.Drop += areaControl_Drop; elementHost1.Child = areaControl; areaControl.SelectionChanged += areaControl_SelectionChanged; areaControl.CanConvert += areaControl_CanConvert; areaControl.Modified += areaControl_Modified; areaControl.GetSource += areaControl_GetSource; FinishInitialize(); }
protected ScopeCommandBase(FlowAreaControl flowAreaControl, ScopeControl scopeControl, ScopeControl parentScopeControl) { this.flowAreaControl = flowAreaControl; this.scopeControl = scopeControl; this.parentScopeControl = parentScopeControl; }
protected BoundCommentCommandBase(FlowAreaControl areaControl, SourceControl sourceControl, BoundCommentControl commentControl) { this.areaControl = areaControl; this.sourceControl = sourceControl; this.commentControl = commentControl; }
public RemoveBoundCommentCommand(FlowAreaControl areaControl, SourceControl sourceControl, BoundCommentControl commentControl) : base(areaControl, sourceControl, commentControl) { }
public RemoveSelectablesCommand(FlowAreaControl flowAreaControl, SelectableControl[] controls) { this.flowAreaControl = flowAreaControl; this.controls = controls; }
public AddSelectableToScopeCommand(FlowAreaControl flowAreaControl, ScopeControl scopeControl, PositionableControl positionableControl) : base(flowAreaControl, scopeControl, positionableControl) { }
public RemoveFlowCommand(FlowAreaControl areaControl, ArrowControl arrowControl) : base(areaControl, arrowControl, arrowControl.SrcItem, arrowControl.DestItem) { }
public AddFlowCommand(FlowAreaControl areaControl, ArrowControl arrowControl, SourceItemControl src, SourceItemControl dest) : base(areaControl, arrowControl, src, dest) { }