Beispiel #1
0
        /// <summary>
        /// Create the UI
        /// </summary>
        private void CreateEdit()
        {
            this.Header = CmisSync.Properties_Resources.EditTitle;

            VBox layout_vertical = new VBox(false, 12);

            Button cancel_button = new Button(CmisSync.Properties_Resources.Cancel);

            cancel_button.Clicked += delegate {
                this.Close();
            };

            Button finish_button = new Button(CmisSync.Properties_Resources.SaveChanges);

            finish_button.Sensitive = false;
            finish_button.Clicked  += delegate {
                this.Controller.SaveFolder();
                this.Close();
            };

            layout_vertical.PackStart(new Label(string.Empty), false, false, 0);
            Notebook tab_view = new Notebook();
            //tab_view.AppendPage(layout_vertical, new Label("Edit Folders"));
            var credentialsWidget = new CredentialsWidget();

            credentialsWidget.Password = this.Credentials.Password.ToString();
            credentialsWidget.Address  = this.Credentials.Address.ToString();
            credentialsWidget.UserName = this.Credentials.UserName;
            credentialsWidget.Changed += (object sender, EventArgs e) => finish_button.Sensitive = true;
            tab_view.AppendPage(credentialsWidget, new Label(Properties_Resources.Credentials));
            this.Add(tab_view);
            this.AddButton(cancel_button);
            this.AddButton(finish_button);

            finish_button.GrabDefault();

            this.ShowAll();
        }
Beispiel #2
0
        /// <summary>
        /// Create the UI
        /// </summary>
        private void CreateEdit()
        {
            this.Header = CmisSync.Properties_Resources.EditTitle;

            VBox layout_vertical   = new VBox(false, 12);

            Button cancel_button = new Button(CmisSync.Properties_Resources.Cancel);
            cancel_button.Clicked += delegate {
                this.Close();
            };

            Button finish_button = new Button(CmisSync.Properties_Resources.SaveChanges);
            finish_button.Sensitive = false;
            finish_button.Clicked += delegate {
                this.Controller.SaveFolder();
                this.Close();
            };

            layout_vertical.PackStart(new Label(string.Empty), false, false, 0);
            Notebook tab_view = new Notebook();
            //tab_view.AppendPage(layout_vertical, new Label("Edit Folders"));
            var credentialsWidget = new CredentialsWidget();
            credentialsWidget.Password = this.Credentials.Password.ToString();
            credentialsWidget.Address = this.Credentials.Address.ToString();
            credentialsWidget.UserName = this.Credentials.UserName;
            credentialsWidget.Changed += (object sender, EventArgs e) => finish_button.Sensitive = true;
            tab_view.AppendPage(credentialsWidget, new Label(Properties_Resources.Credentials));
            this.Add(tab_view);
            this.AddButton(cancel_button);
            this.AddButton(finish_button);

            finish_button.GrabDefault();

            this.ShowAll();
        }