예제 #1
0
        public HmPreferencesWidget() : base()
        {
            HmBackend.LoadCredentials(out this.username, out this.password);

            //Fixme Please ! I look UGLY!
            VBox mainVBox = new VBox(false, 12);

            mainVBox.BorderWidth = 10;
            mainVBox.Show();
            Add(mainVBox);

            HBox usernameBox = new HBox(false, 12);

            Gtk.Label emailLabel = new Label("Email Address");
            usernameBox.Add(emailLabel);
            emailEntry = new Entry(username);
            usernameBox.Add(emailEntry);
            usernameBox.ShowAll();
            mainVBox.PackStart(usernameBox, false, false, 0);

            HBox passwordBox = new HBox(false, 12);

            Gtk.Label passwordLabel = new Label("Password");
            passwordBox.Add(passwordLabel);
            passwordEntry = new Entry(password);
            passwordBox.Add(passwordEntry);
            passwordBox.ShowAll();
            mainVBox.PackStart(passwordBox, false, false, 0);

            // Status message label
            statusLabel          = new Label();
            statusLabel.Justify  = Gtk.Justification.Center;
            statusLabel.Wrap     = true;
            statusLabel.LineWrap = true;
            statusLabel.Show();
            statusLabel.UseMarkup    = true;
            statusLabel.UseUnderline = false;

            mainVBox.PackStart(statusLabel, false, false, 0);

            authButton = new LinkButton("Click Here to Connect");
            authButton.Show();
            mainVBox.PackStart(authButton, false, false, 0);
            mainVBox.ShowAll();

            authButton.Clicked += OnAuthButtonClicked;
        }