public AddinLoadErrorDialog(AddinError[] errors)
        {
            XML glade = new XML (null, "MonoDevelop.Startup.glade", "addinLoadErrorDialog", null);
            glade.Autoconnect (this);

            TreeStore store = new TreeStore (typeof(string));
            errorTree.AppendColumn ("Addin", new CellRendererText (), "text", 0);
            errorTree.Model = store;

            bool fatal = false;

            foreach (AddinError err in errors) {
                string name = Path.GetFileNameWithoutExtension (err.AddinFile);
                if (err.Fatal) name += " (Fatal error)";
                TreeIter it = store.AppendValues (name);
                store.AppendValues (it, "Full Path: " + err.AddinFile);
                store.AppendValues (it, "Error: " + err.Exception.Message);
                it = store.AppendValues (it, "Exception: " + err.Exception.GetType ());
                store.AppendValues (it, err.Exception.StackTrace.ToString ());
                if (err.Fatal) fatal = true;
            }

            //			addinLoadErrorDialog.ShowAll ();

            if (fatal) {
                noButton.Hide ();
                yesButton.Hide ();
                labelContinue.Hide ();
                closeButton.Show ();
                labelFatal.Show ();
            }
        }
Beispiel #2
0
        public LoginDialog(Window parent, string errorMsg)
            : base("Login", parent)
        {
            XML gxml = new XML(null, "MultiMC.GTKGUI.LoginDialog.glade",
                               "loginTable", null);

            gxml.Autoconnect(this);

            labelErrorMsg.Text = errorMsg;

            Alignment loginAlign = new Alignment(0.5f, 0.5f, 1, 1);

            loginAlign.Add(loginTable);
            loginAlign.SetPadding(4, 4, 4, 4);
            this.VBox.Add(loginAlign);
            loginAlign.ShowAll();

            okButton     = this.AddButton("_OK", ResponseType.Ok) as Button;
            cancelButton = this.AddButton("_Cancel", ResponseType.Cancel) as Button;

            this.Default = okButton;

            this.WidthRequest = 420;

            labelErrorMsg.Visible = !string.IsNullOrEmpty(labelErrorMsg.Text);

            entryPassword.Visibility = false;
        }
        protected override void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("Dialogs.UserLogin.glade", "dlgUserLogin");

            form.Autoconnect(this);

            dlgUserLogin.Icon = FormHelper.LoadImage("Icons.User32.png").Pixbuf;
            btnOK.SetChildImage(FormHelper.LoadImage("Icons.Ok24.png"));
            btnCancel.SetChildImage(FormHelper.LoadImage("Icons.Cancel24.png"));

            Image image = FormHelper.LoadImage("Images.Login61.png");

            image.Show();
            algImage.Add(image);

            pnlChooseNumber = new ChooseNumberPanel(null, txtPassword, true, false);
            pnlChooseNumber.Show();
            algKeypad.Add(pnlChooseNumber);

            dlgUserLogin.Realized += dlgLogin_Realized;
            cboUserName.Changed   += cboUserName_Changed;
            btnChoose.Toggled     += btnChoose_Toggled;

            btnChoose.Active = BusinessDomain.AppConfiguration.LastKeypadOnLoginActive;

            base.InitializeForm();

            InitializeFormStrings();
            InitializeEntries();
            PresentationDomain.CardRecognized += PresentationDomain_CardRecognized;
        }
        public SelectRenamedClassDialog(IEnumerable <IType> classes)
        {
            XML glade = new XML(null, "gui.glade", "SelectRenamedClassDialog", null);

            glade.Autoconnect(this);

            store             = new ListStore(typeof(Xwt.Drawing.Image), typeof(string));
            treeClasses.Model = store;

            TreeViewColumn column = new TreeViewColumn();

            var pr = new CellRendererImage();

            column.PackStart(pr, false);
            column.AddAttribute(pr, "image", 0);

            CellRendererText crt = new CellRendererText();

            column.PackStart(crt, true);
            column.AddAttribute(crt, "text", 1);

            treeClasses.AppendColumn(column);

            foreach (var cls in classes)
            {
                var pic = ImageService.GetIcon(cls.GetStockIcon());
                store.AppendValues(pic, cls.FullName);
            }
        }
Beispiel #5
0
 public GladeWindow(Assembly assembly, string resourceName, string windowName)
 {
     xml = new XML(assembly, resourceName, windowName, null);
     xml.Autoconnect(this);
     window              = (Window)xml[windowName];
     window.DeleteEvent += window_DeleteEvent;
 }
Beispiel #6
0
        public LoginDialog(Window parent, string errorMsg)
            : base("Login", parent)
        {
            XML gxml = new XML(null, "MultiMC.GTKGUI.LoginDialog.glade",
                "loginTable", null);
            gxml.Autoconnect(this);

            labelErrorMsg.Text = errorMsg;

            Alignment loginAlign = new Alignment(0.5f, 0.5f, 1, 1);
            loginAlign.Add(loginTable);
            loginAlign.SetPadding(4, 4, 4, 4);
            this.VBox.Add(loginAlign);
            loginAlign.ShowAll();

            okButton = this.AddButton("_OK", ResponseType.Ok) as Button;
            cancelButton = this.AddButton("_Cancel", ResponseType.Cancel) as Button;

            this.Default = okButton;

            this.WidthRequest = 420;

            labelErrorMsg.Visible = !string.IsNullOrEmpty(labelErrorMsg.Text);

            entryPassword.Visibility = false;
        }
        public WebViewer()
            : base(WindowType.Toplevel)
        {
            xml = new XML (null, "MainWindow.glade", "mainBox", null);
            xml.Autoconnect (this);
            Gdk.Pixbuf pix = new Gdk.Pixbuf (null, "webnotes-16.png");

            //Window settings
            Title = "WebNotes";
            WindowPosition = WindowPosition.Center;
            Icon = pix;
            Resize (650,600);

            //Trayicon stuff
            trayIcon = new TrayIcon ("WebNotes");
            EventBox ebox = new EventBox ();
            ebox.ButtonPressEvent += ButtonPressed;
            Image image = new Image (pix);
            ebox.Add (image);
            trayIcon.Add (ebox);
            trayIcon.ShowAll ();

            //Gecko webcontrol
            wc = new WebControl ();
            wc.LoadUrl ("http://localhost:8000");
            geckoBox.Add (wc);

            optionMenu.Changed += OptionChanged;
            BuildMenu ();
            int firstPage = list.IndexOf ("WikiHome");
            if (firstPage != -1)
            optionMenu.SetHistory ((uint)firstPage);

            Add (mainBox);
        }
		public SelectRenamedClassDialog (IEnumerable<IType> classes)
		{
			XML glade = new XML (null, "gui.glade", "SelectRenamedClassDialog", null);
			glade.Autoconnect (this);
			
			store = new ListStore (typeof(Pixbuf), typeof(string));
			treeClasses.Model = store;
			
			TreeViewColumn column = new TreeViewColumn ();
		
			var pr = new CellRendererPixbuf ();
			column.PackStart (pr, false);
			column.AddAttribute (pr, "pixbuf", 0);
			
			CellRendererText crt = new CellRendererText ();
			column.PackStart (crt, true);
			column.AddAttribute (crt, "text", 1);
			
			treeClasses.AppendColumn (column);
			
			foreach (IType cls in classes) {
				Pixbuf pic = ImageService.GetPixbuf (cls.StockIcon);
				store.AppendValues (pic, cls.FullName);
			}
		}
    public GtkSharpVectorViewer(string[] args)
    {
        XML glade = new XML(null, "svg-viewer.glade", "MainWindow", null);

        glade.Autoconnect(this);

        glade["bgEventBox"].ModifyBg(StateType.Normal, glade["MainWindow"].Style.Background(Gtk.StateType.Active));

        svgWidget = new SvgImageWidget();

        //	mainPaned.Add2 (svgWidget);
        //	mainPaned.Pack2 (svgWidget, false, false);
        //	mainHBox.PackStart (svgWidget, true, true, 0);

        (glade["svgViewport"] as Viewport).Add(svgWidget);

        svgWidget.Show();

        testsStore          = new TreeStore(typeof(string));
        testsTreeView.Model = testsStore;
        testsTreeView.AppendColumn("Test Name", new CellRendererText(), "text", 0);

        if (args.Length > 0)
        {
            LoadUri(new Uri(args[0]));
        }

        AddW3CTests();
    }
		/// <summary>
		/// <see cref="ExpressionRuleCallWidget"/>'s constructor.
		/// </summary>
		/// <param name="container">
		/// A <see cref="IExpressionItemContainer"/>
		/// </param>
		public ExpressionGroupWidget(IExpressionItemContainer container) 
			: base(container)
		{
			// We load the glade widgets.
			Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
			                             "expressionGroupWidgetBase");
			
			gladeXml.Autoconnect(this);
			
			this.Add(expressionGroupWidgetBase);
			
			this.HeightRequest = expressionGroupWidgetBase.HeightRequest;
			
			// The menu is created.
			addItemMenu = new AddSubItemMenu(this);
			
			// We tell the widget to redraw itself when the size is changed,
			// fixs some graphical glitches.
			expGroupItemsScroller.Hadjustment.ValueChanged +=
				delegate(object sender, EventArgs args)
			{
				expGroupItemsScroller.QueueDraw();
			};
			
			this.ShowAll();
		}
    public GtkSharpVectorViewer(string[] args)
    {
        XML glade = new XML (null, "svg-viewer.glade", "MainWindow", null);
        glade.Autoconnect (this);

        glade["bgEventBox"].ModifyBg(StateType.Normal, glade["MainWindow"].Style.Background (Gtk.StateType.Active));

        svgWidget = new SvgImageWidget();

        //	mainPaned.Add2 (svgWidget);
        //	mainPaned.Pack2 (svgWidget, false, false);
        //	mainHBox.PackStart (svgWidget, true, true, 0);

        (glade["svgViewport"] as Viewport).Add(svgWidget);

        svgWidget.Show();

        testsStore = new TreeStore(typeof(string));
        testsTreeView.Model = testsStore;
        testsTreeView.AppendColumn("Test Name", new CellRendererText(), "text", 0);

        if (args.Length > 0) {
            LoadUri (new Uri(args[0]));
        }

        AddW3CTests ();
    }
        /// Create New Accept User Dialog
        public AcceptUser(PeerSocket peer)
        {
            XML xml = new XML(null, "AcceptUserDialog.glade", "dialog", null);
            xml.Autoconnect(this);

            // Get UserInfo
            UserInfo userInfo = peer.Info as UserInfo;

            // Initialize GUI
            this.labelTitle.Text = "<span size='x-large'><b>Accept User</b> (";
            if (userInfo.SecureAuthentication == true) {
                this.image.Pixbuf = StockIcons.GetPixbuf("SecureAuth");
                this.labelTitle.Text += "Secure";
                this.dialog.Title += " (Secure Authentication)";
            } else {
                this.image.Pixbuf = StockIcons.GetPixbuf("InsecureAuth");
                this.labelTitle.Text += "Insecure";
                this.dialog.Title += " (Insecure Authentication)";
            }
            this.labelTitle.Text += ")</span>";
            this.labelTitle.UseMarkup = true;

            entryName.Text = userInfo.Name;
            entryIP.Text = peer.GetRemoteIP().ToString();

            this.dialog.ShowAll();
        }
Beispiel #13
0
        protected override void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("Dialogs.EditNewPriceRule.glade", "dlgEditNewPriceRule");

            form.Autoconnect(this);

            dlgEditNewPriceRule.WidthRequest = 600;
            dlgEditNewPriceRule.Icon         = FormHelper.LoadImage("Icons.PriceRules16.png").Pixbuf;

            btnOK.SetChildImage(FormHelper.LoadImage("Icons.Ok24.png"));
            btnCancel.SetChildImage(FormHelper.LoadImage("Icons.Cancel24.png"));

            CreateListItems(treeViewConditions, Translator.GetString("Condition"), PriceRule.GetAllConditions(), (sender, e) => MarkCondition(e, treeViewConditions));
            CreateListItems(treeViewActions, Translator.GetString("Action"), PriceRule.GetAllActions(), (sender, e) => MarkAction(e));
            CreateListItems(treeViewExceptions, Translator.GetString("Exception"), PriceRule.GetAllExceptions(), (sender, e) => MarkCondition(e, treeViewExceptions));

            CreateListOperations();

            treeViewConditions.RowActivated += TreeViewConditions_RowActivated;
            treeViewActions.RowActivated    += TreeViewActions_RowActivated;
            treeViewExceptions.RowActivated += TreeViewExceptions_RowActivated;

            base.InitializeForm();

            InitializeFormStrings();
            InitializeEntries();
        }
 public void InitComponent()
 {
     gxml = new XML (null, "fastopen.glade", "window", null);
     gxml.Autoconnect (this);
     window.Icon = new Gdk.Pixbuf (null, "fastopen.png");
     AppContext.Init ();
 }
		/// <summary>
		/// <c>SymbolLabelInfoConfigDialog</c>'s constructor.
		/// </summary>
		/// <param name="parent">
		/// The dialog's parent window.
		/// </param>
		public SymbolLabelDialog(Window parent)
		{
			XML gxml = new XML(null, "gui.glade","symbolLabelDialog",null);
			
			gxml.Autoconnect(this);
			
			symbolLabelDialog.Modal = true;
			symbolLabelDialog.Resizable = false;
			symbolLabelDialog.TransientFor = parent;
			
			CellRendererText cellRenderer = new CellRendererText();			
			
			cellRenderer.Xalign = 0.5f;
			symbolLabelsTV.AppendColumn("Símbolo", cellRenderer,"text",0);
			symbolLabelsTV.AppendColumn("Etiqueta", new CellRendererText(),"text",1);
			
			symbolLabelsModel = new ListStore(typeof(string), 
			                                  typeof(string));
			
			symbolLabelsTV.Model = symbolLabelsModel;
			
			symbolLabelsTV.Selection.Changed += OnSymbolLabelsTVSelectionChanged;
			
			foreach (SymbolLabelInfo info in LibraryConfig.Instance.Symbols)
			{				
				symbolLabelsModel.AppendValues(info.Symbol, info.Label);
			}
			
			changes = false;
		}
        /// <summary>
        /// <c>SymbolLabelInfoConfigDialog</c>'s constructor.
        /// </summary>
        /// <param name="parent">
        /// The dialog's parent window.
        /// </param>
        public SymbolLabelDialog(Window parent)
        {
            XML gxml = new XML(null, "gui.glade", "symbolLabelDialog", null);

            gxml.Autoconnect(this);

            symbolLabelDialog.Modal        = true;
            symbolLabelDialog.Resizable    = false;
            symbolLabelDialog.TransientFor = parent;

            CellRendererText cellRenderer = new CellRendererText();

            cellRenderer.Xalign = 0.5f;
            symbolLabelsTV.AppendColumn("Símbolo", cellRenderer, "text", 0);
            symbolLabelsTV.AppendColumn("Etiqueta", new CellRendererText(), "text", 1);

            symbolLabelsModel = new ListStore(typeof(string),
                                              typeof(string));

            symbolLabelsTV.Model = symbolLabelsModel;

            symbolLabelsTV.Selection.Changed += OnSymbolLabelsTVSelectionChanged;

            foreach (SymbolLabelInfo info in LibraryConfig.Instance.Symbols)
            {
                symbolLabelsModel.AppendValues(info.Symbol, info.Label);
            }

            changes = false;
        }
Beispiel #17
0
 public GladeWindow(Assembly assembly, string resourceName, string windowName)
 {
     xml = new XML (assembly, resourceName, windowName, null);
     xml.Autoconnect (this);
     window = (Window)xml[windowName];
     window.DeleteEvent += window_DeleteEvent;
 }
 public void InitComponent()
 {
     gxml = new XML(null, "fastopen.glade", "window", null);
     gxml.Autoconnect(this);
     window.Icon = new Gdk.Pixbuf(null, "fastopen.png");
     AppContext.Init();
 }
        protected override void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("Dialogs.EditNewLocation.glade", "dlgEditNewLocation");

            form.Autoconnect(this);

            dlgEditNewLocation.Icon = FormHelper.LoadImage("Icons.Location16.png").Pixbuf;
            btnSaveAndNew.SetChildImage(FormHelper.LoadImage("Icons.Ok24.png"));
            btnSave.SetChildImage(FormHelper.LoadImage("Icons.Ok24.png"));
            btnCancel.SetChildImage(FormHelper.LoadImage("Icons.Cancel24.png"));

            gEditPanel = new LocationsGroupsEditPanel();
            algGroups.Add(gEditPanel);
            gEditPanel.Show();

            base.InitializeForm();

            InitializeFormStrings();
            InitializeEntries();
            btnGenerateCode.Clicked  += btnGenerateCode_Clicked;
            dlgEditNewLocation.Shown += dlgEditNewLocation_Shown;

            oldName          = txtName.Text;
            txtName.Changed += txtName_Changed;
        }
        public ConfirmWindowDeleteDialog(string windowName, string fileName, Stetic.ProjectItemInfo obj)
        {
            XML glade = new XML(null, "gui.glade", "ConfirmWindowDeleteDialog", null);

            glade.Autoconnect(this);

            if (obj is Stetic.WidgetInfo && ((Stetic.WidgetInfo)obj).IsWindow)
            {
                label.Text = GettextCatalog.GetString("Are you sure you want to delete the window '{0}'?", windowName);
            }
            else if (obj is Stetic.WidgetInfo)
            {
                label.Text = GettextCatalog.GetString("Are you sure you want to delete the widget '{0}'?", windowName);
            }
            else if (obj is Stetic.ActionGroupInfo)
            {
                label.Text = GettextCatalog.GetString("Are you sure you want to delete the action group '{0}'?", windowName);
            }
            else
            {
                label.Text = GettextCatalog.GetString("Are you sure you want to delete '{0}'?", windowName);
            }

            if (fileName != null)
            {
                checkbox.Label  = string.Format(checkbox.Label, fileName);
                checkbox.Active = true;
            }
            else
            {
                checkbox.Hide();
            }
        }
Beispiel #21
0
        /// Create New Accept User Dialog
        public AcceptUser(PeerSocket peer)
        {
            XML xml = new XML(null, "AcceptUserDialog.glade", "dialog", null);

            xml.Autoconnect(this);

            // Get UserInfo
            UserInfo userInfo = peer.Info as UserInfo;

            // Initialize GUI
            this.labelTitle.Text = "<span size='x-large'><b>Accept User</b> (";
            if (userInfo.SecureAuthentication == true)
            {
                this.image.Pixbuf     = StockIcons.GetPixbuf("SecureAuth");
                this.labelTitle.Text += "Secure";
                this.dialog.Title    += " (Secure Authentication)";
            }
            else
            {
                this.image.Pixbuf     = StockIcons.GetPixbuf("InsecureAuth");
                this.labelTitle.Text += "Insecure";
                this.dialog.Title    += " (Insecure Authentication)";
            }
            this.labelTitle.Text     += ")</span>";
            this.labelTitle.UseMarkup = true;

            entryName.Text = userInfo.Name;
            entryIP.Text   = peer.GetRemoteIP().ToString();

            this.dialog.ShowAll();
        }
		public SelectRenamedClassDialog (IEnumerable<INamedTypeSymbol> classes)
		{
			XML glade = new XML (null, "gui.glade", "SelectRenamedClassDialog", null);
			glade.Autoconnect (this);
			
			store = new ListStore (typeof(Xwt.Drawing.Image), typeof(string));
			treeClasses.Model = store;
			
			TreeViewColumn column = new TreeViewColumn ();
		
			var pr = new CellRendererImage ();
			column.PackStart (pr, false);
			column.AddAttribute (pr, "image", 0);
			
			CellRendererText crt = new CellRendererText ();
			column.PackStart (crt, true);
			column.AddAttribute (crt, "text", 1);

			treeClasses.AppendColumn (column);
			
			foreach (var cls in classes) {
				var pic = ImageService.GetIcon (cls.GetStockIcon ());
				store.AppendValues (pic, cls.GetFullName ());
			}
		}
Beispiel #23
0
        /// <summary>
        /// <see cref="ExpressionRuleCallWidget"/>'s constructor.
        /// </summary>
        /// <param name="container">
        /// A <see cref="IExpressionItemContainer"/>
        /// </param>
        public ExpressionGroupWidget(IExpressionItemContainer container)
            : base(container)
        {
            // We load the glade widgets.
            Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
                                         "expressionGroupWidgetBase");

            gladeXml.Autoconnect(this);

            this.Add(expressionGroupWidgetBase);

            this.HeightRequest = expressionGroupWidgetBase.HeightRequest;

            // The menu is created.
            addItemMenu = new AddSubItemMenu(this);

            // We tell the widget to redraw itself when the size is changed,
            // fixs some graphical glitches.
            expGroupItemsScroller.Hadjustment.ValueChanged +=
                delegate(object sender, EventArgs args)
            {
                expGroupItemsScroller.QueueDraw();
            };

            this.ShowAll();
        }
        protected override void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("Dialogs.EditUserRestrictions.glade", "dlgEditRestrictions");

            form.Autoconnect(this);

            Image icon = FormHelper.LoadImage("Icons.Security32.png");

            dlgEditRestrictions.Icon = icon.Pixbuf;
            algDialogIcon.Add(icon);
            icon.Show();

            btnOK.SetChildImage(FormHelper.LoadImage("Icons.Ok24.png"));
            btnCancel.SetChildImage(FormHelper.LoadImage("Icons.Cancel24.png"));
            btnApply.SetChildImage(FormHelper.LoadImage("Icons.Apply24.png"));
            btnReset.SetChildImage(FormHelper.LoadImage("Icons.Clear24.png"));

            dlgEditRestrictions.HeightRequest = 500;
            dlgEditRestrictions.WidthRequest  = 800;
            btnApply.Sensitive = false;

            base.InitializeForm();

            InitializeFormStrings();
            InitializeUsersGrid();
            InitializeAccessLevelsGrid();
            InitilizeTreeView();
        }
Beispiel #25
0
        public EditModsDialog(Window parent, Instance inst)
            : base("Edit Mods", parent)
        {
            this.inst = inst;

            XML gxml = new XML(null, "MultiMC.GTKGUI.EditModsDialog.glade",
                               "vboxEditMods", null);

            gxml.Autoconnect(this);

            this.VBox.PackStart(vboxEditMods);

            this.AddButton("_Cancel", ResponseType.Cancel);
            this.AddButton("_OK", ResponseType.Ok);

            WidthRequest  = 600;
            HeightRequest = 500;
            // the Jar page is active by default. FIXME: determine dynamically!
            currentMode = Mode.Jar;

            modStore         = new ListStore(typeof(string), typeof(Mod));
            jarModList.Model = modStore;
            jarModList.AppendColumn("Mod Name", new CellRendererText(), "text", 0);

            mlModStore      = new ListStore(typeof(string), typeof(Mod));
            mlModList.Model = mlModStore;
            mlModList.AppendColumn("Mod Name", new CellRendererText(), "text", 0);

            //mlModList.Selection.Mode = SelectionMode.Multiple;

            inst.InstMods.ModFileChanged += (o, args) => LoadModList();

            // Listen for key presses
            jarModList.KeyPressEvent += new KeyPressEventHandler(jarModList_KeyPressEvent);
            mlModList.KeyPressEvent  += new KeyPressEventHandler(mlModList_KeyPressEvent);

            // set up drag & drop
            jarModList.EnableModelDragDest(targetEntries, Gdk.DragAction.Default);
            jarModList.EnableModelDragSource(Gdk.ModifierType.Button1Mask, srcEntries, Gdk.DragAction.Move);
            jarModList.DragDataReceived += OnDragDataReceived;
            jarModList.DragDataGet      += (object o, DragDataGetArgs args) =>
            {
                TreeIter  iter;
                TreeModel model;
                if (!jarModList.Selection.GetSelected(out iter))
                {
                    return;
                }
                Gdk.Atom[] targets = args.Context.Targets;
                TreePath   tp      = modStore.GetPath(iter);
                int        idx     = tp.Indices[0];

                args.SelectionData.Set(targets[0], 0, System.Text.Encoding.UTF8.GetBytes(idx.ToString()));
            };

            Drag.DestSet(mlModList, DestDefaults.All, targetEntries, Gdk.DragAction.Default);
            mlModList.DragDataReceived += OnDragDataReceived;
            mlModList.EnableModelDragDest(targetEntries, Gdk.DragAction.Default);
        }
		/// <summary>
		/// <c>DatabaseInfoDialog</c>'s constructor.
		/// </summary>
		/// <param name="parent">
		/// The dialog's parent window.
		/// </param>
		public DatabaseInfoDialog(Window parent)
		{
			XML gxml = new XML(null, "gui.glade", "databaseInfoDialog", null);
			gxml.Autoconnect(this);
			
			this.databaseInfoDialog.TransientFor = parent;
			this.databaseInfoDialog.Modal = true;
		}
        protected override void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("Dialogs.ExchangeObjects.glade", "dlgExchangeObjects");

            form.Autoconnect(this);

            btnCancel.SetChildImage(FormHelper.LoadImage("Icons.Cancel24.png"));
            btnExchangeFile.Clicked += btnExchangeFile_Clicked;

            base.InitializeForm();

            algExchangeLocation.Visible = usesLocation;
            if (usesLocation)
            {
                Location loc = null;
                if (Location.TryGetLocked(ref loc))
                {
                    txtExchangeLocation.Sensitive = false;
                    btnExchangeLocation.Sensitive = false;
                }

                if (loc != null)
                {
                    SetLocation(loc);
                }

                txtExchangeLocation.KeyPressEvent    += txtExchangeLocation_KeyPress;
                txtExchangeLocation.ButtonPressEvent += txtExchangeLocation_ButtonPressEvent;
                txtExchangeLocation.Changed          += txtExchnangeLocation_Changed;
                btnExchangeLocation.Clicked          += btnExchangeLocation_Clicked;
            }

            InitializeFormStrings();
            LoadExchangers();

            chkExchangeFile.Active = BusinessDomain.AppConfiguration.LastExportToFile;
            chkExchangeFile.Toggle();
            if (Exchanger != null)
            {
                if (!Exchanger.UsesFile)
                {
                    chkOpenFile.Active = BusinessDomain.AppConfiguration.OpenExportedFile;
                    chkOpenFile.Toggle();
                }
                else
                {
                    chkOpenFile.Sensitive = chkOpenFile.Active = false;
                }
            }
            chkEmail.Active = BusinessDomain.AppConfiguration.LastExportToEmail;
            chkEmail.Toggle();
            txtEmail.Text        = BusinessDomain.AppConfiguration.LastExportEmail;
            txtEmailSubject.Text = BusinessDomain.AppConfiguration.LastExportEmailSubject;
            if (string.IsNullOrWhiteSpace(txtEmailSubject.Text))
            {
                txtEmailSubject.Text = string.Format(Translator.GetString("Export from {0}"), DataHelper.ProductName);
            }
        }
        /// <summary>
        /// <see cref="AddSubItemMenu"/>'s constructor.
        /// </summary>
        /// <param name="container">
        /// A <see cref="IExpressionItemContainer"/>
        /// Where the elements created by the menu items
        /// will be stored.
        /// </param>
        public AddSubItemMenu(IExpressionItemContainer container)
        {
            Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
                                         "addExpressionItemMenu");

            gladeXml.Autoconnect(this);

            this.container = container;
        }
Beispiel #29
0
        public LoadWebImage()
        {
            XML xml = new XML(null, "LoadWebImageDialog.glade", "dialog", null);
            xml.Autoconnect(this);

            this.image.Pixbuf = StockIcons.GetPixbuf("NyIVImage");

            this.dialog.ShowAll();
        }
        /// <summary>
        /// <c>DatabaseInfoDialog</c>'s constructor.
        /// </summary>
        /// <param name="parent">
        /// The dialog's parent window.
        /// </param>
        public DatabaseInfoDialog(Window parent)
        {
            XML gxml = new XML(null, "gui.glade", "databaseInfoDialog", null);

            gxml.Autoconnect(this);

            this.databaseInfoDialog.TransientFor = parent;
            this.databaseInfoDialog.Modal        = true;
        }
		/// <summary>
		/// <c>SymbolLabelEditorDialog</c>'s constructor.
		/// </summary>
		/// <param name="parent">
		/// This dialog parent's window.
		/// </param>
		public SymbolLabelListDialog(Window parent)
		{
			XML gxml = new XML(null, "gui.glade", "symbolLabelEditorDialog",null);			
			gxml.Autoconnect(this);
			
			symbolLabelEditorDialog.TransientFor = parent;
			
			symbolLabelEditorDialog.AddActionWidget(okBtn, ResponseType.Ok);
		}
		/// <summary>
		/// <see cref="AddSubItemMenu"/>'s constructor.
		/// </summary>
		/// <param name="container">
		/// A <see cref="IExpressionItemContainer"/> 
		/// Where the elements created by the menu items
		/// will be stored.
		/// </param>
		public AddSubItemMenu(IExpressionItemContainer container)
		{
			Glade.XML gladeXml =new XML("mathtextrecognizer.glade",
			                            "addExpressionItemMenu");
			
			gladeXml.Autoconnect(this);				
			
			this.container = container;
		}
Beispiel #33
0
        public EditModsDialog(Window parent, Instance inst)
            : base("Edit Mods", parent)
        {
            this.inst = inst;

            XML gxml = new XML(null, "MultiMC.GTKGUI.EditModsDialog.glade",
                "vboxEditMods", null);
            gxml.Autoconnect(this);

            this.VBox.PackStart(vboxEditMods);

            this.AddButton("_Cancel", ResponseType.Cancel);
            this.AddButton("_OK", ResponseType.Ok);

            WidthRequest = 600;
            HeightRequest = 500;
            // the Jar page is active by default. FIXME: determine dynamically!
            currentMode = Mode.Jar;

            modStore = new ListStore(typeof(string), typeof(Mod));
            jarModList.Model = modStore;
            jarModList.AppendColumn("Mod Name", new CellRendererText(), "text", 0);

            mlModStore = new ListStore(typeof(string), typeof(Mod));
            mlModList.Model = mlModStore;
            mlModList.AppendColumn("Mod Name", new CellRendererText(), "text", 0);

            //mlModList.Selection.Mode = SelectionMode.Multiple;

            inst.InstMods.ModFileChanged += (o, args) => LoadModList();

            // Listen for key presses
            jarModList.KeyPressEvent += new KeyPressEventHandler(jarModList_KeyPressEvent);
            mlModList.KeyPressEvent += new KeyPressEventHandler(mlModList_KeyPressEvent);

            // set up drag & drop
            jarModList.EnableModelDragDest(targetEntries,Gdk.DragAction.Default);
            jarModList.EnableModelDragSource(Gdk.ModifierType.Button1Mask,srcEntries,Gdk.DragAction.Move);
            jarModList.DragDataReceived += OnDragDataReceived;
            jarModList.DragDataGet += (object o, DragDataGetArgs args) =>
            {
                TreeIter iter;
                TreeModel model;
                if(!jarModList.Selection.GetSelected (out iter))
                    return;
                Gdk.Atom[] targets = args.Context.Targets;
                TreePath tp = modStore.GetPath(iter);
                int idx = tp.Indices[0];

                args.SelectionData.Set(targets[0],0,System.Text.Encoding.UTF8.GetBytes( idx.ToString() ));
            };

            Drag.DestSet(mlModList, DestDefaults.All, targetEntries, Gdk.DragAction.Default);
            mlModList.DragDataReceived += OnDragDataReceived;
            mlModList.EnableModelDragDest(targetEntries,Gdk.DragAction.Default);
        }
Beispiel #34
0
        /// <summary>
        /// <c>SymbolLabelEditorDialog</c>'s constructor.
        /// </summary>
        /// <param name="parent">
        /// This dialog parent's window.
        /// </param>
        public SymbolLabelListDialog(Window parent)
        {
            XML gxml = new XML(null, "gui.glade", "symbolLabelEditorDialog", null);

            gxml.Autoconnect(this);

            symbolLabelEditorDialog.TransientFor = parent;

            symbolLabelEditorDialog.AddActionWidget(okBtn, ResponseType.Ok);
        }
Beispiel #35
0
        public LoadWebImage()
        {
            XML xml = new XML(null, "LoadWebImageDialog.glade", "dialog", null);

            xml.Autoconnect(this);

            this.image.Pixbuf = StockIcons.GetPixbuf("NyIVImage");

            this.dialog.ShowAll();
        }
        /// Create new Dialog
        public SetPort()
        {
            XML xml = new XML(null, "SetPortDialog.glade", "dialog", null);
            xml.Autoconnect(this);

            Port = P2PManager.Port;

            this.image.Pixbuf = StockIcons.GetPixbuf("Channel");
            this.dialog.ShowAll();
        }
Beispiel #37
0
        /// <summary>
        /// <see cref="OutputSettingsDialog"/>'s constructor.
        /// </summary>
        /// <param name="parent">
        /// The <see cref="Window"/> this dialog is modal to.
        /// </param>
        public OutputSettingsDialog(Window parent)
        {
            Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
                                         "outputSettingsDialog");

            gladeXml.Autoconnect(this);

            this.outputSettingsDialog.TransientFor = parent;

            InitializeWidgets();
        }
Beispiel #38
0
        protected override void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("Dialogs.FiscalReports.glade", "dlgFiscalReports");

            form.Autoconnect(this);

            btnClose.SetChildImage(FormHelper.LoadImage("Icons.Cancel24.png"));

            base.InitializeForm();
            InitializeFormStrings();
        }
        private void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("Widgets.EditNewCompanyRecordPanel.glade", "nbkRoot");

            form.Autoconnect(this);

            Add(nbkRoot);

            InitializeFormStrings();
            InitializeEntries();
        }
        /// Create new Dialog
        public SetPort()
        {
            XML xml = new XML(null, "SetPortDialog.glade", "dialog", null);

            xml.Autoconnect(this);

            Port = P2PManager.Port;

            this.image.Pixbuf = StockIcons.GetPixbuf("Channel");
            this.dialog.ShowAll();
        }
        /// Create New Proxy Settings Dialog
        public ProxySettings()
        {
            XML xml = new XML(null, "ProxySettingsDialog.glade", "dialog", null);
            xml.Autoconnect(this);
            this.image.Pixbuf = StockIcons.GetPixbuf("Proxy");

            proxy = new Niry.GUI.Gtk2.ProxySettings();
            this.vbox.PackStart(proxy, true, true, 2);

            this.dialog.ShowAll();
        }
Beispiel #42
0
        /// <summary>
        /// <c>LearnSymbolDatabaseChooserDialog</c>'s constructor.
        /// </summary>
        /// <param name="parent">
        /// The dialog's parent dialog, to which it's modal.
        /// </param>
        /// <param name="databases">
        /// The databases the user can choose from.
        /// </param>
        public LearnSymbolDatabaseChooserDialog(Window parent,
                                                List <DatabaseFileInfo> databases)
        {
            XML gxml = new XML(null,
                               "mathtextrecognizer.glade",
                               "learnSymbolDatabaseChooserDialog",
                               null);

            gxml.Autoconnect(this);

            learnSymbolDatabaseChooserDialog.Modal        = true;
            learnSymbolDatabaseChooserDialog.Resizable    = false;
            learnSymbolDatabaseChooserDialog.TransientFor = parent;

            databaseHash = new Dictionary <string, DatabaseFileInfo>();

            optionsTooltips = new Tooltips();

            RadioButton groupRB = new RadioButton("group");

            foreach (DatabaseFileInfo databaseInfo in databases)
            {
                // We add a new option per database
                string      label    = System.IO.Path.GetFileName(databaseInfo.Path);
                RadioButton optionRB = new RadioButton(groupRB, label);

                optionRB.Clicked += new EventHandler(OnOptionRBClicked);
                optionsVB.Add(optionRB);

                MathTextDatabase database = databaseInfo.Database;


                optionsTooltips.SetTip(optionRB,
                                       String.Format("{0}\n{1}",
                                                     database.ShortDescription,
                                                     database.Description),
                                       "database description");

                databaseHash.Add(label, databaseInfo);
            }

            // We add the option of creating a new database.
            newRB          = new RadioButton(groupRB, "Crear nueva base de datos");
            newRB.Clicked += new EventHandler(OnOptionRBClicked);
            optionsVB.Add(newRB);
            optionsTooltips.SetTip(newRB,
                                   "Te permite crear una base de datos nueva",
                                   "new databse description");

            optionsTooltips.Enable();

            learnSymbolDatabaseChooserDialog.ShowAll();
        }
Beispiel #43
0
        public ProxySettings()
        {
            XML xml = new XML(null, "ProxySettingsDialog.glade", "dialog", null);

            xml.Autoconnect(this);
            this.image.Pixbuf = StockIcons.GetPixbuf("NyIVProxy");

            proxy = new Niry.GUI.Gtk2.ProxySettings();
            this.vbox.PackStart(proxy, true, true, 2);

            this.dialog.ShowAll();
        }
		public GladeApp(){
			//System.Console.WriteLine ("Hello GTK");
			//System.Console.Read ();
			Gtk.Application.Init ();
			
			Glade.XML gxml = new XML (null,@"textPad.FirstTextpad.glade","window1",null);
		
			gxml.Autoconnect (this);
			
			Gtk.Application.Run ();
			//return 0;
		}
		/// <summary>
		/// <see cref="OutputSettingsDialog"/>'s constructor.
		/// </summary>
		/// <param name="parent">
		/// The <see cref="Window"/> this dialog is modal to.
		/// </param>
		public OutputSettingsDialog(Window parent)
		{
			Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
			                             "outputSettingsDialog");
			
			gladeXml.Autoconnect(this);
			
			this.outputSettingsDialog.TransientFor =  parent;
			
			InitializeWidgets();
			
		}
		/// <summary>
		/// <c>LearnSymbolDatabaseChooserDialog</c>'s constructor.
		/// </summary>
		/// <param name="parent">
		/// The dialog's parent dialog, to which it's modal.
		/// </param>
		/// <param name="databases">
		/// The databases the user can choose from.
		/// </param>
		public LearnSymbolDatabaseChooserDialog(Window parent,
		                                        List<DatabaseFileInfo> databases)
		{
			XML gxml = new XML(null, 
			                   "mathtextrecognizer.glade", 
			                   "learnSymbolDatabaseChooserDialog",
			                   null);
			
			gxml.Autoconnect(this);
			
			learnSymbolDatabaseChooserDialog.Modal=true;
			learnSymbolDatabaseChooserDialog.Resizable = false;
			learnSymbolDatabaseChooserDialog.TransientFor = parent;
			
			databaseHash = new Dictionary<string,DatabaseFileInfo>();
			
			optionsTooltips = new Tooltips();
			
			RadioButton groupRB = new RadioButton("group");
			foreach(DatabaseFileInfo databaseInfo in databases)
			{
				// We add a new option per database
				string label = System.IO.Path.GetFileName(databaseInfo.Path);
				RadioButton optionRB = new RadioButton(groupRB, label);
				
				optionRB.Clicked += new EventHandler(OnOptionRBClicked);
				optionsVB.Add(optionRB);
				
				MathTextDatabase database = databaseInfo.Database;
			
				
				optionsTooltips.SetTip(optionRB, 
				                       String.Format("{0}\n{1}",
				                                     database.ShortDescription,
				                                     database.Description),
				                       "database description");
				
				databaseHash.Add(label, databaseInfo);
			}
			
			// We add the option of creating a new database.
			newRB = new RadioButton(groupRB, "Crear nueva base de datos");
			newRB.Clicked += new EventHandler(OnOptionRBClicked);
			optionsVB.Add(newRB);
			optionsTooltips.SetTip(newRB, 
			                       "Te permite crear una base de datos nueva",
			                       "new databse description");
			
			optionsTooltips.Enable();
			
			learnSymbolDatabaseChooserDialog.ShowAll();
		}
        protected virtual void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("WbpPrintPreview.glade", "hboPrintPreviewRoot");

            form.Autoconnect(this);

            btnSave.SetChildImage(FormHelper.LoadImage("Icons.Ok24.png"));
            btnClose.SetChildImage(FormHelper.LoadImage("Icons.Cancel24.png"));
            btnPrint.SetChildImage(FormHelper.LoadImage("Icons.Print24.png"));
            tcPages = new SizeChooser(maxAutoColumns, maxAutoRows,
                                      DataHelper.ResourcesAssembly,
                                      FormHelper.GetResourceName("Icons.Page24.png"));
            tcPages.SizeChanged += tcPages_SizeChanged;
            algPages.Add(tcPages);

            btnDocumentDesigner.SetChildImage(FormHelper.LoadImage("Icons.DesignDoc24.png"));
            btnExport.SetChildImage(FormHelper.LoadImage("Icons.Export24.png"));

            Image icon = FormHelper.LoadImage("Icons.Report32.png");

            algPrintPreviewIcon.Add(icon);
            icon.Show();

            Add(hboPrintPreviewRoot);
            hboPrintPreviewRoot.KeyPressEvent += WbpPrintPreview_KeyPressEvent;
            OuterKeyPressed += WbpPrintPreview_KeyPressEvent;

            cboZoom.Changed         += cboZoom_Changed;
            spbPage.ValueChanged    += spbPage_Changed;
            spbPage.Adjustment.Lower = 1d;

            CreatePreview();
            algPrintPreview.Add(currentPreview);

            hboPrintPreviewRoot.ShowAll();

            btnPrint.Sensitive          = BusinessDomain.AppConfiguration.IsPrinterAvailable(Printer);
            btnExport.Visible           = BusinessDomain.DocumentExporters.Count > 0;
            btnSave.Visible             = false;
            btnDocumentDesigner.Visible = documentDesigner != null;

            tbtnPortrait.Toggled -= tbtnPortrait_Toggled;
            tbtnLandscape.Active  = BusinessDomain.AppConfiguration.IsPrinterAvailable(Printer) && PrintDocument.FormToPrint.Landscape;

            tbtnPortrait.Active   = !tbtnLandscape.Active;
            tbtnPortrait.Toggled += tbtnPortrait_Toggled;

            tbtnPortrait.Image  = FormHelper.LoadImage("Icons.Portrait.png");
            tbtnLandscape.Image = FormHelper.LoadImage("Icons.Landscape.png");

            InitializeStrings();
        }
		/// <summary>
		/// <see cref="ExpressionItemOptionsDialog"/>'s constructor.
		/// </summary>
		public ExpressionItemOptionsDialog(Window parent, Type expressionType)
		{
			XML gladeXml = new XML("mathtextrecognizer.glade",
			                       "expressionItemOptionsDialog");
			
			gladeXml.Autoconnect(this);
			
			addItemMenu = new AddSubItemMenu(this);
			
			this.expressionItemOptionsDialog.TransientFor = parent;
			
			InitializeWidgets(expressionType);
		}
Beispiel #49
0
        public DeleteDialog(Window parent)
            : base("Really delete this instance?", parent)
        {
            XML gxml = new XML("MultiMC.GTKGUI.DeleteDialog.glade",
                               "vboxDeleteConf");

            gxml.Autoconnect(this);

            VBox.PackStart(vboxDeleteConf);

            AddButton("_Cancel", ResponseType.Cancel).HasDefault = true;
            AddButton("_OK", ResponseType.Ok);
        }
Beispiel #50
0
        protected override void InitializeForm()
        {
            XML form = FormHelper.LoadGladeXML("Dialogs.ChooseNumber.glade", "dlgChooseNumber");

            form.Autoconnect(this);

            //dlgChooseNumber.Icon = FormHelper.LoadImage ("Icons.Banknote24.png").Pixbuf;
            btnOK.SetChildImage(FormHelper.LoadImage("Icons.Ok24.png"));
            btnCancel.SetChildImage(FormHelper.LoadImage("Icons.Cancel24.png"));

            base.InitializeForm();
            InitializeFormStrings();
        }
        private void Init()
        {
            XML xml = new XML(null, gladeFile, "plannerWindow", null);

            xml.Autoconnect(this);
            canvas = new Canvas();
            canvas.SetSizeRequest((int)width, (int)height);
            canvas.SetScrollRegion(0, 0, width, height);
            table = new TimeTable(canvas.Root(),
                                  new TaskArea(cellWidth, cellHeight, cellWidth * 8, cellHeight * 14, 13, 7));
            vbox.Add(canvas);
            plannerWindow.ShowAll();
        }
		/// <summary>
		/// <c>SymbolLabelEditorDialog</c>'s constructor method.
		/// </summary>
		/// <param name="parent">
		/// The new dialog's parent window.
		/// </param>
		/// <param name="node">
		/// The node which label we want to edit.
		/// </param>
		public SymbolLabelEditorDialog(Window parent, SegmentedNode node)
		{
			XML gxml = new XML("mathtextrecognizer.glade",
			                   "symbolLabelEditorDialog");
			
			gxml.Autoconnect(this);
			
			symbolLabelEditorDialog.TransientFor = parent;
			
			InitializeWidgets(node);
			
			
			symbolLabelEditorDialog.ShowAll();
		}
Beispiel #53
0
    public Sample()
    {
        XML gui = new XML (null, "gui.glade", "main", null);
        gui.Autoconnect (this);

        canvas = new Dia.Canvas();
        canvas.AllowUndo = true;
        view = new CanvasView (canvas, true);
        scrolledwindow.Add (view);

        SetupTools();
        CreateItemsProgramatically();
        main.ShowAll();
    }
		/// <summary>
		/// <see cref="ExpressionRuleCallWidget"/>'s constructor.
		/// </summary>
		/// <param name="container">
		/// A <see cref="IExpressionItemContainer"/>
		/// </param>
		public ExpressionRuleCallWidget(IExpressionItemContainer container) 
			: base(container)
		{
			Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
			                             "expressionRuleWidgetBase");
			
			gladeXml.Autoconnect(this);
			
			this.Add(expressionRuleWidgetBase);
			
			this.HeightRequest = expressionRuleWidgetBase.HeightRequest;
			
			this.ShowAll();
		}
Beispiel #55
0
        public RestoreBackupDialog(Gtk.Window parent)
            : base("Saves", parent)
        {
            this.IconName = "document-revert";

            XML gxml = new XML(null, "MultiMC.GTKGUI.RestoreBackupDialog.glade", "restoreRoot", null);
            gxml.Toplevel = this;
            gxml.Autoconnect(this);

            this.VBox.PackStart(restoreRoot);

            this.WidthRequest = 620;
            this.HeightRequest = 380;

            // set default button states
            btnCancel.Sensitive = true;
            btnOK.Sensitive = false;

            // FIXME: store date/time properly so ordering works.
            backupsStore = new ListStore(typeof(string), typeof(DateTime), typeof(string), typeof(string));
            restoreView.Model = backupsStore;
            restoreView.AppendColumn("Backup name", new CellRendererText(), "text", 0);
            restoreView.AppendColumn("Date", new CellRendererText(), new TreeCellDataFunc(DateTimeCell));
            restoreView.AppendColumn("Hash", new CellRendererText(), "text", 2);
            restoreView.Selection.Mode = SelectionMode.Single;

            // this binds view and model columns together for sorting
            restoreView.Columns[0].SortColumnId = 0;
            restoreView.Columns[1].SortColumnId = 1;
            restoreView.Columns[2].SortColumnId = 2;
            // the date column needs a custom sorting function that can compare DateTime objects
            backupsStore.SetSortFunc(1,new TreeIterCompareFunc(DateTimeTreeIterCompareFunc));
            backupsStore.SetSortColumnId(1,SortType.Ascending); // sort by date
            restoreView.Selection.Changed += (sender, e) =>
            {
                if(restoreView.Selection.CountSelectedRows() != 0)
                {
                    btnOK.Sensitive = true;
                    TreeIter iter;
                    restoreView.Selection.GetSelected(out iter);
                    currentHash = backupsStore.GetValue(iter,3) as string;
                }
                else
                {
                    btnOK.Sensitive = false;
                }
            };
            ShowAll();
        }
Beispiel #56
0
        public TaskDialog(Task task = null)
        {
            XML gxml = new XML(null, "MultiMC.GTKGUI.TaskDialog.glade",
                "vboxTask", null);
            gxml.Autoconnect(this);

            this.Remove(this.VBox);
            this.Add(vboxTask);

            WidthRequest = 400;
            HeightRequest = 110;

            if (task != null)
                WindowUtils.ConnectTask(this, task);
        }
Beispiel #57
0
        public UpdateDialog(Window parent = null)
            : base("Update Available", parent)
        {
            XML gxml = new XML(null, "MultiMC.GTKGUI.UpdateDialog.glade",
                "vboxUpdateDialog", null);
            gxml.Autoconnect(this);

            this.VBox.PackStart(vboxUpdateDialog, true, true, 0);

            this.WidthRequest = 380;
            this.HeightRequest = 98;

            AddButton("_Yes", ResponseType.Yes);
            AddButton("_No", ResponseType.No);
        }
		/// <summary>
		/// <see cref="SyntacticalRuleEditorDialog"/>'s constructor.
		/// </summary>
		/// <param name="parent">
		/// The dialog's parent <see cref="Window"/>.
		/// </param>
		public SyntacticalRuleEditorDialog(SyntacticalRulesManagerDialog parent)
		{
			Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
			                             "syntacticalRuleEditorDialog");
			
			gladeXml.Autoconnect(this);
			
			manager = parent;
			
			this.syntacticalRuleEditorDialog.TransientFor = manager.Window;
			
			editing = false;
			
			InitializeWidgets();
		}
		public InitialStageWidget(MainRecognizerWindow window)
			: base(window)
		{
			Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
			                             "initialStageWidgetBase");
			
			gladeXml.Autoconnect(this);
			
			
			this.Add(initialStageWidgetBase);
			
			//blackboardModeBtn.NoShowAll = true;
			
			blackboardImage.Pixbuf = 
				ImageResources.LoadPixbuf("edu_miscellaneous32");
		}
		/// <summary>
		/// <c>LexicalRuleEditorDialog</c>'s constructor method.
		/// </summary>
		/// <param name="parent">
		/// The window this dialog will be modal to.
		/// </param>
		public LexicalRuleEditorDialog(Window parent)
		{
			XML gxml = new XML(null,
			                   "mathtextrecognizer.glade",
			                   "lexicalRuleEditorDialog",
			                   null);
			gxml.Autoconnect(this);
			
			
			lexicalRuleEditorDialog.TransientFor = parent;
				
			
			lexicalRuleEditorDialog.ShowAll();
			
			AddExpression("");
		}