Mi ero dimenticato un po' di file.
Leonardo Robol [2010-02-01 12:55]
Mi ero dimenticato un po' di file.
diff --git a/GlobalConfig.cs b/GlobalConfig.cs
new file mode 100644
index 0000000..7eeb156
--- /dev/null
+++ b/GlobalConfig.cs
@@ -0,0 +1,16 @@
+
+using System;
+
+namespace Dizzy
+{
+
+
+ public class GlobalConfig
+ {
+ public string user, password;
+
+ public GlobalConfig ()
+ {
+ }
+ }
+}
diff --git a/StartupDialog.cs b/StartupDialog.cs
new file mode 100644
index 0000000..0d633ec
--- /dev/null
+++ b/StartupDialog.cs
@@ -0,0 +1,33 @@
+
+using System;
+using Dizzy;
+
+namespace Dizzy
+{
+
+
+ public partial class StartupDialog : Gtk.Dialog
+ {
+
+ GlobalConfig config;
+
+ protected virtual void OnOkClicked (object sender, System.EventArgs e)
+ {
+ config.user = entryUser.Text;
+ config.password = entryPassword.Text;
+ this.Destroy ();
+ }
+
+ public StartupDialog (ref GlobalConfig config)
+ {
+ this.Build ();
+ this.config = config;
+
+ // Dobbiamo fare in modo di ottenere utente e password dall'
+ // utente e poi caricare la finestra principale connettendoci
+ // al server
+ entryPassword.Visibility = false;
+
+ }
+ }
+}
diff --git a/gtk-gui/Dizzy.StartupDialog.cs b/gtk-gui/Dizzy.StartupDialog.cs
new file mode 100644
index 0000000..b57d15e
--- /dev/null
+++ b/gtk-gui/Dizzy.StartupDialog.cs
@@ -0,0 +1,168 @@
+// ------------------------------------------------------------------------------
+// <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 StartupDialog {
+
+ private Gtk.VBox vbox2;
+
+ private Gtk.Label label1;
+
+ private Gtk.HSeparator hseparator1;
+
+ private Gtk.Table table1;
+
+ private Gtk.Entry entryPassword;
+
+ private Gtk.Entry entryUser;
+
+ private Gtk.Label label4;
+
+ private Gtk.Label label5;
+
+ private Gtk.Button buttonCancel;
+
+ private Gtk.Button buttonOk;
+
+ protected virtual void Build() {
+ Stetic.Gui.Initialize(this);
+ // Widget Dizzy.StartupDialog
+ this.Name = "Dizzy.StartupDialog";
+ this.Title = Mono.Unix.Catalog.GetString("DIzzy Login");
+ this.WindowPosition = ((Gtk.WindowPosition)(4));
+ // Internal child Dizzy.StartupDialog.VBox
+ Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog1_VBox";
+ w1.Spacing = 5;
+ w1.BorderWidth = ((uint)(5));
+ // 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.label1 = new Gtk.Label();
+ this.label1.Name = "label1";
+ this.label1.LabelProp = Mono.Unix.Catalog.GetString("Inserire nome utente e password per autenticarsi su <b>poisson.phc.unipi.it</b>");
+ this.label1.UseMarkup = true;
+ this.vbox2.Add(this.label1);
+ Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.label1]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.hseparator1 = new Gtk.HSeparator();
+ this.hseparator1.Name = "hseparator1";
+ this.vbox2.Add(this.hseparator1);
+ Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.hseparator1]));
+ w3.Position = 1;
+ w3.Expand = false;
+ w3.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));
+ this.table1.BorderWidth = ((uint)(5));
+ // Container child table1.Gtk.Table+TableChild
+ this.entryPassword = new Gtk.Entry();
+ this.entryPassword.CanFocus = true;
+ this.entryPassword.Name = "entryPassword";
+ this.entryPassword.IsEditable = true;
+ this.entryPassword.InvisibleChar = '•';
+ this.table1.Add(this.entryPassword);
+ Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.entryPassword]));
+ w4.TopAttach = ((uint)(1));
+ w4.BottomAttach = ((uint)(2));
+ w4.LeftAttach = ((uint)(1));
+ w4.RightAttach = ((uint)(2));
+ w4.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child table1.Gtk.Table+TableChild
+ this.entryUser = new Gtk.Entry();
+ this.entryUser.CanFocus = true;
+ this.entryUser.Name = "entryUser";
+ this.entryUser.IsEditable = true;
+ this.entryUser.InvisibleChar = '•';
+ this.table1.Add(this.entryUser);
+ Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.entryUser]));
+ w5.LeftAttach = ((uint)(1));
+ w5.RightAttach = ((uint)(2));
+ w5.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child table1.Gtk.Table+TableChild
+ this.label4 = new Gtk.Label();
+ this.label4.Name = "label4";
+ this.label4.LabelProp = Mono.Unix.Catalog.GetString("Utente");
+ this.table1.Add(this.label4);
+ Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
+ w6.XOptions = ((Gtk.AttachOptions)(4));
+ w6.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child table1.Gtk.Table+TableChild
+ this.label5 = new Gtk.Label();
+ this.label5.Name = "label5";
+ this.label5.LabelProp = Mono.Unix.Catalog.GetString("Password");
+ this.table1.Add(this.label5);
+ Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.label5]));
+ w7.TopAttach = ((uint)(1));
+ w7.BottomAttach = ((uint)(2));
+ w7.XOptions = ((Gtk.AttachOptions)(4));
+ w7.YOptions = ((Gtk.AttachOptions)(4));
+ this.vbox2.Add(this.table1);
+ Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox2[this.table1]));
+ w8.Position = 2;
+ w8.Expand = false;
+ w8.Fill = false;
+ w1.Add(this.vbox2);
+ Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
+ w9.Position = 0;
+ w9.Expand = false;
+ w9.Fill = false;
+ // Internal child Dizzy.StartupDialog.ActionArea
+ Gtk.HButtonBox w10 = this.ActionArea;
+ w10.Name = "dialog1_ActionArea";
+ w10.Spacing = 10;
+ w10.BorderWidth = ((uint)(5));
+ w10.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 w11 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonCancel]));
+ w11.Expand = false;
+ w11.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 w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonOk]));
+ w12.Position = 1;
+ w12.Expand = false;
+ w12.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll();
+ }
+ this.DefaultWidth = 508;
+ this.DefaultHeight = 178;
+ this.Show();
+ this.buttonOk.Activated += new System.EventHandler(this.OnOkClicked);
+ this.buttonOk.Clicked += new System.EventHandler(this.OnOkClicked);
+ }
+ }
+}