private Widget CreateMoreOptionsExpander(string defaultDomainID) { optionsExpander = new Expander(Util.GS("More options")); optionsExpander.Activated += new EventHandler(OnOptionsExpanded); Table optionsTable = new Table(2, 3, false); optionsExpander.Add(optionsTable); optionsTable.ColumnSpacing = 10; optionsTable.RowSpacing = 10; optionsTable.SetColSpacing(0, 30); Label l = new Label(Util.GS("iFolder Account:")); l.Xalign = 0; optionsTable.Attach(l, 1,2,0,1, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); domainComboBox = ComboBox.NewText(); optionsTable.Attach(domainComboBox, 2,3,0,1, AttachOptions.Expand | AttachOptions.Fill, 0,0,0); int defaultDomain = 0; for (int x = 0; x < domains.Length; x++) { domainComboBox.AppendText(domains[x].Name); if (defaultDomainID != null) { if (defaultDomainID == domains[x].ID) defaultDomain = x; } else defaultDomain = x; } domainComboBox.Active = defaultDomain; l = new Label(Util.GS("Description:")); l.Xalign = 0; optionsTable.Attach(l, 1,2,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); descriptionTextView = new TextView(); descriptionTextView.LeftMargin = 4; descriptionTextView.RightMargin = 4; descriptionTextView.Editable = true; descriptionTextView.CursorVisible = true; descriptionTextView.AcceptsTab = false; descriptionTextView.WrapMode = WrapMode.WordChar; ScrolledWindow sw = new ScrolledWindow(); sw.ShadowType = ShadowType.EtchedIn; sw.Add(descriptionTextView); optionsTable.Attach(sw, 2,3,1,2, AttachOptions.Expand | AttachOptions.Fill, 0,0,0); optionsTable.ShowAll(); return optionsExpander; }
private Widget CreateMoreOptionsExpander(string defaultDomainID) { optionsExpander = new Expander(Util.GS("More options")); optionsExpander.Activated += new EventHandler(OnOptionsExpanded); optionsExpander.Activate(); Table optionsTable = new Table(2, 3, false); optionsExpander.Add(optionsTable); optionsTable.ColumnSpacing = 10; optionsTable.RowSpacing = 10; optionsTable.SetColSpacing(0, 30); Label l = new Label(Util.GS("iFolder account")); l.Xalign = 0; optionsTable.Attach(l, 1,2,0,1, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); Encryption = new RadioButton(Util.GS("Passphrase Encryption")); optionsTable.Attach(Encryption, 2,3,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); Regular = new RadioButton(Encryption, Util.GS("Regular")); optionsTable.Attach(Regular, 3,4,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); SecureSync = new CheckButton(Util.GS("Secure Sync")); optionsTable.Attach(SecureSync, 4,5,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); l = new Label(Util.GS("Security")); l.Xalign = 0; optionsTable.Attach(l, 1,2,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); domainComboBox = ComboBox.NewText(); optionsTable.Attach(domainComboBox, 2,3,0,1, AttachOptions.Expand | AttachOptions.Fill, 0,0,0); int defaultDomain = 0; for (int x = 0; x < domains.Length; x++) { domainComboBox.AppendText(string.Format(domains[x].Name + " - " + domains[x].Host)); if (defaultDomainID != null) { if (defaultDomainID == domains[x].ID) defaultDomain = x; } else defaultDomain = x; } domainComboBox.Active = defaultDomain; int SecurityPolicy = ifws.GetSecurityPolicy(this.DomainID); ChangeStatus(SecurityPolicy); optionsTable.ShowAll(); return optionsExpander; }
private Widget rellenoDelFrame() { Button butonOk; Frame marcoEtiquetaQue; //Label etiquetaQue; Label etiquetaEntrada_x; Label etiquetaEntrada_y; //Entry entrada_x; //Entry entrada_y; Table tablaEntradas; VBox superCaja = null; uint padding = 20; etiquetaQue = new Label(Ej_frame.str_Pide1); etiquetaQue.LineWrap = true; etiquetaQue.Justify = Justification.Left; marcoEtiquetaQue = new Frame(); marcoEtiquetaQue.BorderWidth = 10; marcoEtiquetaQue.Add(etiquetaQue); entrada_x = new Entry(3); entrada_x.Text = "1,0"; etiquetaEntrada_x = new Label("valor de la x"); entrada_y = new Entry(3); entrada_y.Text = "1,0"; etiquetaEntrada_y = new Label("valor de la y"); tablaEntradas = new Table (2, 2, true); tablaEntradas.SetColSpacing(0, 5); tablaEntradas.SetColSpacing(1, 5); tablaEntradas.SetRowSpacing(0, 5); tablaEntradas.SetRowSpacing(1, 5); tablaEntradas.Attach(etiquetaEntrada_x, 0, 1, 0, 1); tablaEntradas.Attach(entrada_x, 1, 2, 0, 1); tablaEntradas.Attach(etiquetaEntrada_y, 0, 1, 1, 2); tablaEntradas.Attach(entrada_y, 1, 2, 1, 2); entrada_x.WidthRequest = 4; butonOk = new Button ("Aplicar cambios"); butonOk.Clicked += accionBoton; superCaja = new VBox (false, 5); superCaja.PackStart(marcoEtiquetaQue, false, false, padding); superCaja.PackStart(tablaEntradas, true, false, padding); superCaja.PackStart(butonOk, true, false, padding); return superCaja; }