public static void FillNode(this KeSchema schema, TreeNode schemaNode) { // Enum types TreeNode enumTypesNode = schemaNode.Nodes.Add("Enum Types"); enumTypesNode.Tag = schema; enumTypesNode.ContextMenuStrip = ContextMenuEnumTypes.CreateContextMenuForEnumType(); foreach (KeEnumType enumType in schema.EnumTypes) { TreeNode enumTypeNode = enumTypesNode.Nodes.Add(enumType.Name); enumTypeNode.Tag = enumType; } // Complex types TreeNode complexTypesNode = schemaNode.Nodes.Add("Complex Types"); complexTypesNode.Tag = ""; foreach (KeComplexType complexType in schema.ComplexTypes) { } // Entity types TreeNode entityTypesNode = schemaNode.Nodes.Add("Entity Types"); entityTypesNode.Tag = ""; foreach (KeEntityType entityType in schema.EntityTypes) { } }
public AddEnumTypeDialog(KeSchema schema) { InitializeComponent(); enumTypeNamespace.Text = schema.Namespace; enumTypeNamespace.Enabled = false; enumUnderlingTypeCombox.SelectedIndex = 2; this.schema = schema; }
public static bool IsUnique(KeSchema schema, string name) { if (schema.EnumTypes.Any(e => e.Name == name)) { return(false); } if (schema.ComplexTypes.Any(e => e.Name == name)) { return(false); } if (schema.EntityTypes.Any(e => e.Name == name)) { return(false); } return(true); }
public static void newEnumTypeMenuItem_Click(object sender, EventArgs e) { ToolStripMenuItem menuItem = sender as ToolStripMenuItem; TreeNode treeNode = (TreeNode)(menuItem.GetCurrentParent().Tag); KeSchema schema = treeNode.Tag as KeSchema; AddEnumTypeDialog newEnumTypeDialog = new AddEnumTypeDialog(schema); newEnumTypeDialog.StartPosition = FormStartPosition.CenterParent; if (newEnumTypeDialog.ShowDialog() == DialogResult.OK) { schema.EnumTypes.Add(new KeEnumType(schema.Namespace, newEnumTypeDialog.EnumName, newEnumTypeDialog.UnderlingTypeName, newEnumTypeDialog.IsFlag)); } var node = treeNode.Nodes.Add(newEnumTypeDialog.EnumName); treeNode.Expand(); //schema.DelaringModel.FillTreeView(treeNode.TreeView); // MessageBox.Show("Ok"); }
public KeAction(KeSchema schema, string name, bool isBound, KePathExpression entitySetPathExpression) : base(schema, name, isBound, entitySetPathExpression) { }
public KeSchemaElement(KeSchema declaringSchema, string name) : base(name) { DeclaringSchema = declaringSchema; }
public KeTerm(KeSchema schema, string name, KeTypeReference type) : base(schema, name) { }
public KeFunction(KeSchema schema, string name, bool isBound, KePathExpression entitySetPathExpression, bool isComposable) : base(schema, name, isBound, entitySetPathExpression) { IsComposable = isComposable; }