Aggiunta interfaccia per chiedere la password.

Leonardo Robol [2010-02-06 22:35]
Aggiunta interfaccia per chiedere la password.
Filename
gtk-gui/Dizzy.AuthDialog.cs
diff --git a/gtk-gui/Dizzy.AuthDialog.cs b/gtk-gui/Dizzy.AuthDialog.cs
new file mode 100644
index 0000000..bc194ee
--- /dev/null
+++ b/gtk-gui/Dizzy.AuthDialog.cs
@@ -0,0 +1,162 @@
+// ------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//
+//
+//      Changes to this file may cause incorrect behavior and will be lost if
+//      the code is regenerated.
+//  </autogenerated>
+// ------------------------------------------------------------------------------
+
+namespace Dizzy {
+
+
+    public partial class AuthDialog {
+
+        private Gtk.VBox vbox2;
+
+        private Gtk.Label label3;
+
+        private Gtk.Table table1;
+
+        private Gtk.Label label1;
+
+        private Gtk.Label label2;
+
+        private Gtk.Entry passwordEntry;
+
+        private Gtk.Entry userEntry;
+
+        private Gtk.Button buttonCancel;
+
+        private Gtk.Button buttonOk;
+
+        protected virtual void Build() {
+            Stetic.Gui.Initialize(this);
+            // Widget Dizzy.AuthDialog
+            this.Name = "Dizzy.AuthDialog";
+            this.Title = Mono.Unix.Catalog.GetString("Autenticazione");
+            this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-dialog-authentication", Gtk.IconSize.Menu, 16);
+            this.WindowPosition = ((Gtk.WindowPosition)(4));
+            // Internal child Dizzy.AuthDialog.VBox
+            Gtk.VBox w1 = this.VBox;
+            w1.Name = "dialog1_VBox";
+            w1.BorderWidth = ((uint)(2));
+            // Container child dialog1_VBox.Gtk.Box+BoxChild
+            this.vbox2 = new Gtk.VBox();
+            this.vbox2.Name = "vbox2";
+            this.vbox2.Spacing = 6;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.label3 = new Gtk.Label();
+            this.label3.Name = "label3";
+            this.label3.LabelProp = Mono.Unix.Catalog.GetString("Autenticazione su <b>poisson.phc.unipi.it</b>:");
+            this.label3.UseMarkup = true;
+            this.vbox2.Add(this.label3);
+            Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.label3]));
+            w2.Position = 0;
+            w2.Expand = false;
+            w2.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.table1 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
+            this.table1.Name = "table1";
+            this.table1.RowSpacing = ((uint)(6));
+            this.table1.ColumnSpacing = ((uint)(6));
+            // Container child table1.Gtk.Table+TableChild
+            this.label1 = new Gtk.Label();
+            this.label1.Name = "label1";
+            this.label1.LabelProp = Mono.Unix.Catalog.GetString("Username");
+            this.table1.Add(this.label1);
+            Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
+            w3.XOptions = ((Gtk.AttachOptions)(4));
+            w3.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table1.Gtk.Table+TableChild
+            this.label2 = new Gtk.Label();
+            this.label2.Name = "label2";
+            this.label2.LabelProp = Mono.Unix.Catalog.GetString("Password");
+            this.table1.Add(this.label2);
+            Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
+            w4.TopAttach = ((uint)(1));
+            w4.BottomAttach = ((uint)(2));
+            w4.XOptions = ((Gtk.AttachOptions)(4));
+            w4.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table1.Gtk.Table+TableChild
+            this.passwordEntry = new Gtk.Entry();
+            this.passwordEntry.CanDefault = true;
+            this.passwordEntry.CanFocus = true;
+            this.passwordEntry.Name = "passwordEntry";
+            this.passwordEntry.IsEditable = true;
+            this.passwordEntry.Visibility = false;
+            this.passwordEntry.InvisibleChar = '•';
+            this.table1.Add(this.passwordEntry);
+            Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.passwordEntry]));
+            w5.TopAttach = ((uint)(1));
+            w5.BottomAttach = ((uint)(2));
+            w5.LeftAttach = ((uint)(1));
+            w5.RightAttach = ((uint)(2));
+            w5.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table1.Gtk.Table+TableChild
+            this.userEntry = new Gtk.Entry();
+            this.userEntry.CanDefault = true;
+            this.userEntry.CanFocus = true;
+            this.userEntry.Name = "userEntry";
+            this.userEntry.IsEditable = true;
+            this.userEntry.InvisibleChar = '•';
+            this.table1.Add(this.userEntry);
+            Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.userEntry]));
+            w6.LeftAttach = ((uint)(1));
+            w6.RightAttach = ((uint)(2));
+            w6.YOptions = ((Gtk.AttachOptions)(4));
+            this.vbox2.Add(this.table1);
+            Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.table1]));
+            w7.Position = 1;
+            w7.Expand = false;
+            w7.Fill = false;
+            w1.Add(this.vbox2);
+            Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
+            w8.Position = 0;
+            w8.Expand = false;
+            w8.Fill = false;
+            // Internal child Dizzy.AuthDialog.ActionArea
+            Gtk.HButtonBox w9 = this.ActionArea;
+            w9.Name = "dialog1_ActionArea";
+            w9.Spacing = 10;
+            w9.BorderWidth = ((uint)(5));
+            w9.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
+            // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+            this.buttonCancel = new Gtk.Button();
+            this.buttonCancel.CanDefault = true;
+            this.buttonCancel.CanFocus = true;
+            this.buttonCancel.Name = "buttonCancel";
+            this.buttonCancel.UseStock = true;
+            this.buttonCancel.UseUnderline = true;
+            this.buttonCancel.Label = "gtk-cancel";
+            this.AddActionWidget(this.buttonCancel, -6);
+            Gtk.ButtonBox.ButtonBoxChild w10 = ((Gtk.ButtonBox.ButtonBoxChild)(w9[this.buttonCancel]));
+            w10.Expand = false;
+            w10.Fill = false;
+            // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+            this.buttonOk = new Gtk.Button();
+            this.buttonOk.CanDefault = true;
+            this.buttonOk.CanFocus = true;
+            this.buttonOk.Name = "buttonOk";
+            this.buttonOk.UseStock = true;
+            this.buttonOk.UseUnderline = true;
+            this.buttonOk.Label = "gtk-ok";
+            this.AddActionWidget(this.buttonOk, -5);
+            Gtk.ButtonBox.ButtonBoxChild w11 = ((Gtk.ButtonBox.ButtonBoxChild)(w9[this.buttonOk]));
+            w11.Position = 1;
+            w11.Expand = false;
+            w11.Fill = false;
+            if ((this.Child != null)) {
+                this.Child.ShowAll();
+            }
+            this.DefaultWidth = 400;
+            this.DefaultHeight = 154;
+            this.buttonOk.HasDefault = true;
+            this.Show();
+            this.passwordEntry.Activated += new System.EventHandler(this.OnOkClicked);
+            this.buttonOk.Activated += new System.EventHandler(this.OnOkClicked);
+            this.buttonOk.Clicked += new System.EventHandler(this.OnOkClicked);
+        }
+    }
+}
ViewGit