Пример #1
0
 static void help_cb(IntPtr druid)
 {
     try {
         Druid druid_managed = GLib.Object.GetObject(druid, false) as Druid;
         druid_managed.OnHelp();
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Пример #2
0
        public FirstStartDruid()
        {
            // FirstPage
            _FirstPage = new GNOME.DruidPageEdge(GNOME.EdgePosition.Start, true,
                _("Smuxi's first start"),
                _("Welcome to the smuxi\n"+
                "You started smuxi for the first time and it needs some answers from you.\n\n"+
                "Click \"Forward\" to begin."),
                null, null, null);
            _FirstPage.CancelClicked += new GNOME.CancelClickedHandler(_OnCancel);

            // page 1
            _Page1 = new GNOME.DruidPageStandard();
            _Page1.CancelClicked += new GNOME.CancelClickedHandler(_OnCancel);
            _Page1.Prepared += new GNOME.PreparedHandler(_OnPage1Prepared);
            _Page1.NextClicked += new GNOME.NextClickedHandler(_OnPage1NextClicked);
            _ModeComboBox = Gtk.ComboBox.NewText();
            _ModeComboBox.AppendText(_("Local"));
            _ModeComboBox.AppendText(_("Remote"));
            _ModeComboBox.Changed += new EventHandler(_OnModeComboBoxChanged);
            _ModeComboBox.Active = 0;
            _Page1.AppendItem(_("_Default Engine Mode:"),
                _ModeComboBox, _("When smuxi is started which mode it should use by default"));

            // LastPage
            _LastPage = new GNOME.DruidPageEdge(GNOME.EdgePosition.Finish, true,
                _("Thank you"), _("Now you can use smuxi"), null,
                null, null);
            _LastPage.CancelClicked += new GNOME.CancelClickedHandler(_OnCancel);
            _LastPage.FinishClicked += new GNOME.FinishClickedHandler(_OnFinishClicked);

            _Druid = new GNOME.Druid(_("First Start Druid"), true);
            _Druid.Cancel += new EventHandler(_OnCancel);

            _Druid.AppendPage(_FirstPage);
            _Druid.AppendPage(_Page1);
            _Druid.AppendPage(_LastPage);
            _Druid.ShowAll();
        }