public PushDownObjectTypeWizard(Repository repository, ObjectType objectType) { this.repository = repository; this.objectType = objectType; this.Title = Mono.Unix.Catalog.GetString("Push Object Type Down Wizard"); this.Icon = Gdk.Pixbuf.LoadFromResource("Allors.R1.Development.GtkSharp.Icons.allors.ico"); this.DefaultWidth = 640; this.DefaultHeight = 400; var headerBox = new VBox { Spacing = 10, BorderWidth = 10 }; this.VBox.PackStart(headerBox, false, false, 0); headerBox.PackStart(new HtmlLabel("<span size=\"large\">Welcome to the Allors Push Object Type Down Wizard</span>", 0.5f)); headerBox.PackStart(new HtmlLabel("This wizard allows you to push an object type down from a super domain.", 0.5f)); var form = new Form(); this.VBox.PackStart(form); var namespaceNameLabel = new HtmlLabel("Object type"); this.namespaceEntry = new Entry { Sensitive = false, Text = this.objectType.Name }; var dependencyLabel = new HtmlLabel("Dependencies"); this.dependencyTextView = new DependencyTextView(); var scrolledDepenceyTextView = new ScrolledWindow { this.dependencyTextView }; var buttonCancel = new Button { CanDefault = true, UseStock = true, UseUnderline = true, Label = "gtk-cancel" }; this.AddActionWidget(buttonCancel, -6); var buttonOk = new Button { CanDefault = true, Name = "buttonOk", UseStock = true, UseUnderline = true, Label = "gtk-ok" }; buttonOk.Clicked += this.OnButtonOkClicked; this.ActionArea.PackStart(buttonOk); // Layout form.Attach(namespaceNameLabel, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Shrink, 0, 0); form.Attach(this.namespaceEntry, 0, 1, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); form.Attach(dependencyLabel, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Shrink, 0, 0); form.Attach(scrolledDepenceyTextView, 0, 1, 3, 4, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 0, 0); this.ShowAll(); this.pushdown = this.repository.PushDown(this.objectType); this.dependencyTextView.Update(this.pushdown); }
public PullUpRelationTypeWizard(Repository repository, RelationType relationType) { this.repository = repository; this.relationType = relationType; this.Title = Mono.Unix.Catalog.GetString("Pull up Relation Type Wizard"); this.Icon = Gdk.Pixbuf.LoadFromResource("Allors.R1.Development.GtkSharp.Icons.allors.ico"); this.DefaultWidth = 640; this.DefaultHeight = 400; var headerBox = new VBox { Spacing = 10, BorderWidth = 10 }; this.VBox.PackStart(headerBox, false, false, 0); headerBox.PackStart(new HtmlLabel("<span size=\"large\">Welcome to the Allors Pull Up Relation Type Wizard</span>", 0.5f)); headerBox.PackStart(new HtmlLabel("This wizard allows you to pull a relation type to a super domain.", 0.5f)); var form = new Form(); this.VBox.PackStart(form); var objectTypeLabel = new HtmlLabel("Relation type"); this.objectTypeEntry = new Entry { Sensitive = false, Text = this.relationType.Name }; var superDomainLabel = new HtmlLabel("Pull up to super domain"); this.superDomainComboBox = new SuperDomainComboBox(repository, relationType.DomainWhereDeclaredRelationType); this.superDomainComboBox.Changed += (sender, args) => this.CreatePullUp(); this.superDomainErrorMessage = new ErrorMessage(); this.dependencyTextView = new DependencyTextView(); var scrolledDepenceyTextView = new ScrolledWindow { this.dependencyTextView }; var buttonCancel = new Button { CanDefault = true, UseStock = true, UseUnderline = true, Label = "gtk-cancel" }; this.AddActionWidget(buttonCancel, -6); var buttonOk = new Button { CanDefault = true, Name = "buttonOk", UseStock = true, UseUnderline = true, Label = "gtk-ok" }; buttonOk.Clicked += this.OnButtonOkClicked; this.ActionArea.PackStart(buttonOk); // Layout form.Attach(objectTypeLabel, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Shrink, 0, 0); form.Attach(this.objectTypeEntry, 0, 1, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); form.Attach(superDomainLabel, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Shrink, 0, 0); form.Attach(this.superDomainComboBox, 0, 1, 3, 4, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); form.Attach(this.superDomainErrorMessage, 0, 1, 4, 5, AttachOptions.Fill, AttachOptions.Shrink, 0, 0); form.Attach(scrolledDepenceyTextView, 0, 1, 5, 6, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 0, 0); this.ShowAll(); this.ResetErrorMessages(); }