public INotation createNotation() { SubTypeConnector subtypeconnector = new SubTypeConnector(new Point(this.x, this.y), Completeness, Disjointness); subtypeconnector.Location = new Point(this.x, this.y); foreach (string des in this.Discriminators) { subtypeconnector.discriminators.Add(des); } return((INotation)subtypeconnector); }
public INotation createNotation() { SubTypeConnector subtypeconnector = new SubTypeConnector(new Point(this.x, this.y), Completeness, Disjointness); subtypeconnector.Location = new Point(this.x, this.y); foreach (string des in this.Discriminators) { subtypeconnector.discriminators.Add(des); } return (INotation)subtypeconnector; }
public EditSubtypeConnector(SubTypeConnector con) { connector = con; InitializeComponent(); }
//Create SubTypeConnector private void CreateSubTypeConnector(EntityShape supertype) { if (supertype.SubtypeConnector == null) { EntityShape subtype = new EntityShape(); subtype.CenterPoint = this.PointToClient(Control.MousePosition); Point CenterTwoEntity = new Point(Math.Abs(supertype.CenterPoint.X + subtype.CenterPoint.X) / 2, Math.Abs(supertype.CenterPoint.Y + subtype.CenterPoint.Y) / 2); SubTypeConnector subconnector = new SubTypeConnector(supertype, subtype, CenterTwoEntity, SubTypeCompleteness, SubTypeDisjointness); supertype.SubtypeConnector = subconnector; this.Controls.Add(subconnector); this.Controls.Add(subtype); } else { if (supertype.SubtypeConnector.completeness == SubTypeCompleteness && supertype.SubtypeConnector.disjointness == SubTypeDisjointness) { EntityShape subtype = new EntityShape(); subtype.CenterPoint = this.PointToClient(Control.MousePosition); supertype.SubtypeConnector.addSubType((EntityShape)subtype); this.Controls.Add(subtype); } else { DevExpress.XtraEditors.XtraMessageBox.Show("The constraint of the Sub Type you want to add must be the same to existed constraint in this Super Type", "Warning"); } } }
void subtypeconnector_Disposed(object sender, EventArgs e) { subtypeconnector = null; }