Inheritance: Gtk.Dialog
Beispiel #1
0
    protected virtual void OnCommandFontSize(object sender, System.EventArgs e)
    {
        EntryDialog dialog = new EntryDialog ();
        int         value = 0;

        if (dialog.Run () == (int) Gtk.ResponseType.Ok && dialog.EntryValue != string.Empty) {
            if (int.TryParse (dialog.EntryValue, out value) == true) {
                UndoableCommand size = new UndoableCommand (new ChangeAttributeCommand ("Font size",
                    FigureAttribute.FontSize, value, this));
                size.Execute ();
            }
        }
        dialog.Destroy ();
    }
Beispiel #2
0
    protected virtual void OnCommandFontFamily(object sender, System.EventArgs e)
    {
        EntryDialog dialog = new EntryDialog ();

        if (dialog.Run () == (int) Gtk.ResponseType.Ok && dialog.EntryValue != string.Empty) {
            UndoableCommand size = new UndoableCommand (new ChangeAttributeCommand ("Font family",
                FigureAttribute.FontFamily, dialog.EntryValue, this));
            size.Execute ();
        }
        dialog.Destroy ();
    }