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