Пример #1
0
 private Gnome.DruidPage CreateRAPage()
 {
     RAPage = new DruidRAPage(
      Util.GS("Encryption"),
      AddAccountPixbuf,
      null);
        RAPage.CancelClicked +=
     new Gnome.CancelClickedHandler(OnCancelClicked);
        RAPage.ValidateClicked +=
     new ValidateClickedHandler(OnValidateClicked);
        RAPage.SkipClicked +=
     new SkipClickedHandler(OnSkipClicked);
        RAPage.Prepared +=
     new Gnome.PreparedHandler(OnRAPagePrepared);
        Table table = new Table(6, 3, false);
        RAPage.VBox.PackStart(table, false, false, 0);
        table.ColumnSpacing = 6;
        table.RowSpacing = 6;
        table.BorderWidth = 12;
        this.AlreadyPrepared = false;
        Label l = new Label(Util.GS("Enter the Passphrase"));
        table.Attach(l, 0,3, 0,1,
     AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        l.LineWrap = true;
        l.Xalign = 0.0F;
        table.Attach(new Label(""), 0,1, 1,2,
     AttachOptions.Fill, 0,12,0);
        l = new Label(Util.GS("_Passphrase:"));
        table.Attach(l, 1,2, 1,2,
     AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        l.Xalign = 0.0F;
        PassPhraseEntry = new Entry();
        PassPhraseEntry.Visibility = false;
        table.Attach(PassPhraseEntry, 2,3, 1,2,
     AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        PassPhraseEntry.Changed += new EventHandler(ChangeSensitivity);
        l.MnemonicWidget = PassPhraseEntry;
        RetypePassPhraseLabel = new Label(Util.GS("R_etype the passphrase:"));
        table.Attach(RetypePassPhraseLabel, 1,2, 2,3,
     AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        l.Xalign = 0.0F;
        PassPhraseVerifyEntry = new Entry();
        PassPhraseVerifyEntry.Visibility = false;
        table.Attach(PassPhraseVerifyEntry, 2,3, 2,3,
     AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        PassPhraseVerifyEntry.Changed += new EventHandler(ChangeSensitivity);
        l.MnemonicWidget = PassPhraseVerifyEntry;
        RememberPassPhraseCheckButton = new CheckButton(Util.GS("_Remember the passphrase"));
        table.Attach(RememberPassPhraseCheckButton, 2,3, 3,4,
     AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        SelectRALabel = new Label(Util.GS("Select the Passphrase Recovery Agent"));
        table.Attach(SelectRALabel, 0,3, 4,5,
     AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        l.LineWrap = true;
        l.Xalign = 0.0F;
        RATreeView = new iFolderTreeView ();
        ScrolledWindow RAScrolledWindow = new ScrolledWindow();
        RAScrolledWindow.ShadowType = Gtk.ShadowType.None;
        RAScrolledWindow.HscrollbarPolicy = Gtk.PolicyType.Automatic;
        RAScrolledWindow.VscrollbarPolicy = Gtk.PolicyType.Automatic;
        RAScrolledWindow.Add(RATreeView);
        RATreeStore = new ListStore(typeof(string));
        RATreeView.Model = RATreeStore;
        TreeViewColumn raNameColumn = new TreeViewColumn();
        raNameColumn.Title = Util.GS("Passphrase Recovery Agents");
        CellRendererText cr = new CellRendererText();
        cr.Xpad = 5;
        raNameColumn.PackStart(cr, false);
        raNameColumn.SetCellDataFunc(cr,
        new TreeCellDataFunc(RANameCellTextDataFunc));
        raNameColumn.Resizable = true;
        raNameColumn.MinWidth = 250;
        RATreeView.AppendColumn(raNameColumn);
        RATreeView.Selection.Mode = SelectionMode.Single;
     table.Attach(RAScrolledWindow, 0,3, 5,7,
      AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
        AccountDruid.CancelButton.Sensitive = false;
        return RAPage;
 }
Пример #2
0
 private Gnome.DruidPage CreateDefaultiFolderPage()
 {
     DefaultiFolderPage = new DruidRAPage(
      Util.GS("Default iFolder"),
      AddAccountPixbuf,
      null);
        DefaultiFolderPage.CancelClicked +=
     new Gnome.CancelClickedHandler(OnCancelClicked);
        DefaultiFolderPage.ValidateClicked +=
     new ValidateClickedHandler(OnDefaultiFolderValidateClicked);
        DefaultiFolderPage.SkipClicked +=
     new SkipClickedHandler(OnDefaultAccountSkipClicked);
        DefaultiFolderPage.Prepared +=
     new Gnome.PreparedHandler(OnDefaultAccountPagePrepared);
        Table table = new Table(3, 5, false);
        DefaultiFolderPage.VBox.PackStart(table, false, false, 0);
        table.ColumnSpacing = 6;
        table.RowSpacing = 6;
        table.BorderWidth = 12;
        CreateDefault = new CheckButton(Util.GS("Create default iFolder."));
        table.Attach(CreateDefault, 0,5, 0,1,
     AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        CreateDefault.Xalign = 0.0F;
        CreateDefault.Toggled += new EventHandler(OnCreateDefaultChanged);
        locationLabel = new Label(Util.GS("_Location:"));
        table.Attach(locationLabel, 1,2, 1,2, AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        LocationEntry = new Entry();
        table.Attach(LocationEntry, 2,4, 1,2, AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        BrowseButton = new Button(Util.GS("_Browse"));
        table.Attach(BrowseButton, 4,5, 1,2, AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        BrowseButton.Clicked += new EventHandler(OnBrowseButtonClicked);
        securityLabel = new Label("Security:");
        table.Attach( securityLabel, 1,2, 2,3, AttachOptions.Fill | AttachOptions.Shrink, 0,0,0);
        encryptionCheckButton = new RadioButton(Util.GS("Passphrase Encryption"));
        table.Attach(encryptionCheckButton, 2,3, 2,3,
      AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        sslCheckButton = new RadioButton(encryptionCheckButton, Util.GS("Regular"));
        table.Attach(sslCheckButton, 3,4, 2,3, AttachOptions.Fill | AttachOptions.Shrink, 0,0,0);
        SecureSync = new CheckButton(Util.GS("Secure Sync"));
                 table.Attach(SecureSync, 4,5, 2,3, AttachOptions.Fill | AttachOptions.Shrink, 0,0,0);
        if( upload == false)
        {
     encryptionCheckButton.Visible = false;
     sslCheckButton.Visible = false;
     SecureSync.Visible = false;
        }
        if( this.CreateDefault.Active == false)
        {
     encryptionCheckButton.Sensitive = false;
     sslCheckButton.Sensitive = false;
     LocationEntry.Sensitive = false;
     BrowseButton.Sensitive = false;
     SecureSync.Sensitive = false;
        }
        else
        {
     encryptionCheckButton.Sensitive = sslCheckButton.Sensitive = true;
     LocationEntry.Sensitive = BrowseButton.Sensitive = true;
     SecureSync.Sensitive = true;
     if( ConnectedDomain.HostUrl.StartsWith( System.Uri.UriSchemeHttps ) )
                         {
                          SecureSync.Active = true;
                                 SecureSync.Sensitive = false;
                         }
        }
        AccountDruid.BackButton.Sensitive = false;
        return DefaultiFolderPage;
 }