public RawComponent(ShapeCanvas canvas, string name, Font font, Font categoryFont, Font propertyFont, object tag) : base(canvas, name, font, categoryFont, propertyFont) { RoundedCorners = true; //BackColor1 = Color.Green; //BackColor2 = Color.YellowGreen; //ForeColor = Color.White; SetColors(); Tag = tag; }
public RawShape(ShapeCanvas canvas, string name, Font font, Font fontCategory, Font fontProperty) { OriginatingLineStyle = new LinkLine(font); OriginatingLineStyle.Parent = this; Text = name; Font = font; FontCategory = fontCategory; FontProperty = fontProperty; Canvas = canvas; }
public RawEntity(ShapeCanvas canvas, string name, Font font, object tag) : base(canvas, name, font) { RoundedCorners = true; //BackColor1 = Color.FromArgb(130, 130, 130); //BackColor2 = Color.FromArgb(40, 40, 40); //ForeColor = Color.White; SetColors(); Tag = tag; }
public RawComponent(ShapeCanvas canvas, string name, Font font, object tag) : base(canvas, name, font) { RoundedCorners = true; //BackColor1 = Color.Green; //BackColor2 = Color.YellowGreen; //ForeColor = Color.White; SetColors(); Tag = tag; }
public RawTable(ShapeCanvas canvas, string name, Font font, object tag) : base(canvas, name, font) { RoundedCorners = false; //BackColor1 = Color.Blue; //BackColor2 = Color.DarkBlue; //ForeColor = Color.White; SetColors(); Tag = tag; }
internal void ProcessMouseMove(MouseEventArgs e, ref bool mustRedraw, ref bool oneIsAlreadyFocused, ref ShapeCanvas.LineEndWithFocus TempFocusedLineEnd) { if (this.GPath == null) return; bool isFocused = false; bool shapeHasFocus = this.GPath.IsVisible(e.X, e.Y); if (this.HasFocus != shapeHasFocus) { this.HasFocus = shapeHasFocus; mustRedraw = true; } if (oneIsAlreadyFocused) isFocused = false; else if (this.OriginatingLineStyle != null && this.OriginatingLineStyle.GPath != null) isFocused = this.OriginatingLineStyle.GPath.IsVisible(e.X, e.Y); if (this.OriginatingLineStyle != null) { if (this.OriginatingLineStyle.IsFocused != isFocused) { this.OriginatingLineStyle.IsFocused = isFocused; mustRedraw = true; if (this.OriginatingLineStyle.IsFocused) this.OriginatingLineStyle.RaiseMouseEnter(e); else this.OriginatingLineStyle.RaiseMouseLeave(e); } if (this.OriginatingLineStyle.GPathFinishEnd != null && this.OriginatingLineStyle.GPathFinishEnd.IsVisible(e.X, e.Y)) { this.OriginatingLineStyle.RaiseMouseOverEnd1(e); TempFocusedLineEnd = new ShapeCanvas.LineEndWithFocus(this.OriginatingLineStyle, ShapeCanvas.LineEndWithFocus.EndTypes.End); } else if (this.OriginatingLineStyle.GPathStartEnd != null && this.OriginatingLineStyle.GPathStartEnd.IsVisible(e.X, e.Y)) { this.OriginatingLineStyle.RaiseMouseOverEnd2(e); TempFocusedLineEnd = new ShapeCanvas.LineEndWithFocus(this.OriginatingLineStyle, ShapeCanvas.LineEndWithFocus.EndTypes.Start); } if (this.OriginatingLineStyle.GPathMiddleImage != null && this.OriginatingLineStyle.GPathMiddleImage.IsVisible(e.X, e.Y)) this.OriginatingLineStyle.RaiseMouseOverMiddleImage(e); } if (isFocused) oneIsAlreadyFocused = true; foreach (RawCategory category in Categories) category.ProcessMouseMove(e, ref mustRedraw); }
private void shapeCanvas1_LineEndWithFocusChanged(ShapeCanvas.LineEndWithFocus lineEndWithFocus) { if (lineEndWithFocus == null || lineEndWithFocus.Line == null) { //RelationshipEditorForm.Visible = false; return; } return; }
private void shapeCanvas1_LineEndWithFocusChanged(ShapeCanvas.LineEndWithFocus lineEndWithFocus) { if (lineEndWithFocus == null || lineEndWithFocus.Line == null) { RelationshipEditorForm.Visible = false; return; } return; int offset = 40; Point pt = PointToClient(Cursor.Position);// e.Location; pt.Offset(-offset, -offset); if (!RelationshipEditorForm.Visible) { RelationshipEditorForm.Fill((Relationship)lineEndWithFocus.Line.DataObject); if (pt.X + RelationshipEditorForm.Width < this.Width) RelationshipEditorForm.Location = pt; else { pt.Offset(-1 * RelationshipEditorForm.Width + offset * 2, 0); RelationshipEditorForm.Location = pt; } if (pt.Y + RelationshipEditorForm.Height < this.Height) RelationshipEditorForm.Location = pt; else { pt.Offset(0, -1 * RelationshipEditorForm.Height + offset * 2); RelationshipEditorForm.Location = pt; } RelationshipEditorForm.Visible = true; RelationshipEditorForm.Refresh(); } }