Esempio n. 1
0
        public ConfigurationDialog (LCDService plugin)
        {
            this.plugin = plugin;
            Title = AddinManager.CurrentLocalizer.GetString ("LCD configuration");
            BorderWidth = 5;
            HasSeparator = false;
            Resizable = false;

            VBox lcdproc_box = new VBox ();

            HBox host_box = new HBox ();
            host_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Hostname:")), false, false, 3);
            host_entry = new Entry ();
            host_box.PackStart (host_entry, true, true, 3);
            host_entry.Text = this.plugin.Host;
            host_entry.Changed += new EventHandler (Host_Changed);

            HBox port_box = new HBox ();
            port_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Port:")), false, false, 3);
            port_spin = new SpinButton (1, 65535, 1);
            port_box.PackStart (port_spin, true, true, 3);
            port_spin.Value = this.plugin.Port;
            port_spin.Changed += new EventHandler (Port_Changed);

            Frame lcdproc_frame = new Frame (AddinManager.CurrentLocalizer.GetString ("LCDProc Daemon:"));
            lcdproc_box.PackStart (host_box);
            lcdproc_box.PackStart (port_box);
            lcdproc_frame.Add (lcdproc_box);
            lcdproc_frame.ShowAll ();

            VBox.PackStart (lcdproc_frame, false, false, 3);
            AddButton (Stock.Close, ResponseType.Close);
        }
Esempio n. 2
0
        public ConfigurationDialog(LCDService plugin)
        {
            this.plugin = plugin;
            Title       = AddinManager.CurrentLocalizer.GetString("LCD configuration");
            BorderWidth = 5;
            Resizable   = false;

            VBox lcdproc_box = new VBox();

            HBox host_box = new HBox();

            host_box.PackStart(new Label(AddinManager.CurrentLocalizer.GetString("Hostname:")), false, false, 3);
            host_entry = new Entry();
            host_box.PackStart(host_entry, true, true, 3);
            host_entry.Text     = this.plugin.Host;
            host_entry.Changed += new EventHandler(Host_Changed);

            HBox port_box = new HBox();

            port_box.PackStart(new Label(AddinManager.CurrentLocalizer.GetString("Port:")), false, false, 3);
            port_spin = new SpinButton(1, 65535, 1);
            port_box.PackStart(port_spin, true, true, 3);
            port_spin.Value    = this.plugin.Port;
            port_spin.Changed += new EventHandler(Port_Changed);

            Frame lcdproc_frame = new Frame(AddinManager.CurrentLocalizer.GetString("LCDProc Daemon:"));

            lcdproc_box.PackStart(host_box, true, true, 3);
            lcdproc_box.PackStart(port_box, true, true, 3);
            lcdproc_frame.Add(lcdproc_box);
            lcdproc_frame.ShowAll();

            ContentArea.PackStart(lcdproc_frame, false, false, 3);
            AddButton(Stock.Close, ResponseType.Close);
        }