public PushDownRelationTypeWizard(Repository repository, RelationType relationType) { this.InitializeComponent(); this.repository = repository; this.relationType = relationType; this.namespaceTextBox.Text = relationType.ToString(); this.pushDown = this.repository.PushDown(this.relationType); this.dependencyRichTextBox.UpdateDependencies(this.pushDown); }
public PushDownRelationTypeWizard(Repository repository, RelationType relationType) { this.repository = repository; this.relationType = relationType; this.Title = Mono.Unix.Catalog.GetString("Push Relation 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 Relation Type Down Wizard</span>", 0.5f)); headerBox.PackStart(new HtmlLabel("This wizard allows you to push an relation type down from a super domain.", 0.5f)); var form = new Form(); this.VBox.PackStart(form); var namespaceNameLabel = new HtmlLabel("Relation type"); this.namespaceEntry = new Entry { Sensitive = false, Text = this.relationType.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.relationType); this.dependencyTextView.Update(this.pushdown); }