예제 #1
0
        private void menuItemMainRelationships_Click(object sender, EventArgs e)
        {
            if (lvwMain.SelectedItems.Count == 1)
            {
                var item  = lvwMain.SelectedItems[0].Tag as Microsoft.VisualStudio.Modeling.ModelElement;
                var shape = _model.Store.ElementDirectory.AllElements
                            .Where(x => x is Microsoft.VisualStudio.Modeling.Diagrams.CompartmentShape)
                            .Cast <Microsoft.VisualStudio.Modeling.Diagrams.CompartmentShape>()
                            .FirstOrDefault(x => x.ModelElement.Id == item.Id) as nHydrate.Dsl.EntityShape;

                if (shape != null)
                {
                    var F = new nHydrate.DslPackage.Forms.RelationCollectionForm(_model, shape, _model.Store, _diagram.CurrentDiagram, _docData as nHydrateDocData);
                    F.ShowDialog();
                }
            }
        }
예제 #2
0
		private void menuItemMainRelationships_Click(object sender, EventArgs e)
		{
			if (lvwMain.SelectedItems.Count == 1)
			{
				var item = lvwMain.SelectedItems[0].Tag as Microsoft.VisualStudio.Modeling.ModelElement;
				var shape = _model.Store.ElementDirectory.AllElements
					.Where(x => x is Microsoft.VisualStudio.Modeling.Diagrams.CompartmentShape)
					.Cast<Microsoft.VisualStudio.Modeling.Diagrams.CompartmentShape>()
					.FirstOrDefault(x => x.ModelElement.Id == item.Id) as nHydrate.Dsl.EntityShape;

				if (shape != null)
				{
					var F = new nHydrate.DslPackage.Forms.RelationCollectionForm(_model, shape, _model.Store, _diagram.CurrentDiagram, _docData as nHydrateDocData);
					F.ShowDialog();
				}
			}
		}