public BindDesignDialog (string id, ArrayList validClasses, string baseFolder) { XML glade = new XML (null, "gui.glade", "BindDesignDialog", null); glade.Autoconnect (this); labelMessage.Text = GettextCatalog.GetString ("The widget design {0} is not currently bound to a class.", id); fileEntry = new FolderEntry (); fileEntryBox.Add (fileEntry); fileEntry.ShowAll (); if (validClasses.Count > 0) { store = new ListStore (typeof (string)); foreach (string cname in validClasses) store.AppendValues (cname); comboClasses.Model = store; CellRendererText cr = new CellRendererText (); comboClasses.PackStart (cr, true); comboClasses.AddAttribute (cr, "text", 0); comboClasses.Active = 0; } else { radioSelect.Sensitive = false; radioCreate.Active = true; } fileEntry.Path = baseFolder; // Initialize the class name using the widget name int i = id.IndexOf ('.'); if (i != -1) { entryClassName.Text = id.Substring (i+1); entryNamespace.Text = id.Substring (0,i); } else { entryClassName.Text = id; entryNamespace.Text = lastNamespace; } dialog.Response += new Gtk.ResponseHandler (OnResponse); UpdateStatus (); }
void Build () { Title = "Tizen SDK Info"; BorderWidth = 6; deviceEntry = new Entry () { ActivatesDefault = true }; sdkFolderEntry = new FolderEntry (); monoX86Entry = new FileEntry (); monoArmEntry = new FileEntry (); authorKeyEntry = new FileEntry (); authorPassEntry = new Entry () { Visibility = false, ActivatesDefault = true }; var sdkFolderLabel = new Label ("_SDK Installation Folder:") { Xalign = 0, Justify = Justification.Left, UseUnderline = true, MnemonicWidget = sdkFolderEntry }; var monoX86Label = new Label ("_Mono Runtime Bundle (x86):") { Xalign = 0, Justify = Justification.Left, UseUnderline = true, MnemonicWidget = monoX86Entry }; var monoArmLabel = new Label ("_Mono Runtime Bundle (ARM):") { Xalign = 0, Justify = Justification.Left, UseUnderline = true, MnemonicWidget = monoArmEntry }; var authorKeyLabel = new Label ("_Author Key:") { Xalign = 0, Justify = Justification.Left, UseUnderline = true, MnemonicWidget = authorKeyEntry }; var authorPassLabel = new Label ("_Author Key Password:"******"_Device ID:") { Xalign = 0, Justify = Justification.Left, UseUnderline = true, MnemonicWidget = deviceEntry }; var table = new Table (2, 5, false); var fill = AttachOptions.Expand | AttachOptions.Fill; var none = AttachOptions.Shrink; var expand = AttachOptions.Expand; table.Attach (sdkFolderLabel, 0, 1, 0, 1, expand, none, 2, 2); table.Attach (sdkFolderEntry, 1, 2, 0, 1, fill, none, 2, 2); table.Attach (monoX86Label, 0, 1, 1, 2, expand, none, 2, 2); table.Attach (monoX86Entry, 1, 2, 1, 2, fill, none, 2, 2); table.Attach (monoArmLabel, 0, 1, 2, 3, expand, none, 2, 2); table.Attach (monoArmEntry, 1, 2, 2, 3, fill, none, 2, 2); table.Attach (authorKeyLabel, 0, 1, 3, 4, expand, none, 2, 2); table.Attach (authorKeyEntry, 1, 2, 3, 4, fill, none, 2, 2); table.Attach (authorPassLabel, 0, 1, 4, 5, expand, none, 2, 2); table.Attach (authorPassEntry, 1, 2, 4, 5, fill, none, 2, 2); table.Attach (deviceLabel, 0, 1, 5, 6, expand, none, 2, 2); table.Attach (deviceEntry, 1, 2, 5, 6, fill, none, 2, 2); VBox.PackStart (new Label ("Tizen Project Setup:"), true, false, 6); VBox.PackStart (table, true, false, 6); cancelButton = new Button (Gtk.Stock.Cancel); this.AddActionWidget (cancelButton, ResponseType.Cancel); okButton = new Button (Gtk.Stock.Ok) { CanDefault = true }; this.AddActionWidget (okButton, ResponseType.Ok); okButton.HasDefault = true; ShowAll (); Resize (400, 80); Resizable = false; }