Esempio n. 1
0
 internal static void ClickDialogButton(Button button)
 {
     GtkGuiActionRunner.RunDialogAction(() =>
     {
         button.Click();
     });
 }
Esempio n. 2
0
 internal static void SetText(Entry entry, string text)
 {
     GtkGuiActionRunner.RunGuiAction(() =>
     {
         entry.Text = text;
     });
 }
Esempio n. 3
0
        internal static bool IsSensitive(Widget widget)
        {
            bool result = false;

            GtkGuiActionRunner.RunGuiAction(() =>
            {
                result = widget.Sensitive;
            });

            return(result);
        }
Esempio n. 4
0
        internal static string GetTitle(Window window)
        {
            string result = string.Empty;

            GtkGuiActionRunner.RunGuiAction(() =>
            {
                result = window.Title;
            });

            return(result);
        }
Esempio n. 5
0
        internal static string GetText(Label label)
        {
            string result = string.Empty;

            GtkGuiActionRunner.RunGuiAction(() =>
            {
                result = label.Text;
            });

            return(result);
        }
Esempio n. 6
0
        internal static string GetText(Entry entry)
        {
            string result = string.Empty;

            GtkGuiActionRunner.RunGuiAction(() =>
            {
                result = entry.Text;
            });

            return(result);
        }
Esempio n. 7
0
        internal static int GetItemCount <T>(GtkListView <T> listView)
        {
            int result = -1;

            GtkGuiActionRunner.RunGuiAction(() =>
            {
                if (listView.View.Model == null)
                {
                    result = 0;
                    return;
                }
                ;

                result = listView.View.Model.IterNChildren();
            });

            return(result);
        }
Esempio n. 8
0
        internal static T GetItemAt <T>(GtkListView <T> listView, int index)
        {
            T result = default(T);

            GtkGuiActionRunner.RunGuiAction(() =>
            {
                TreeView tree = listView.View;
                TreeIter treeIter;
                if (!tree.Model.IterNthChild(out treeIter, index))
                {
                    return;
                }

                result = (T)tree.Model.GetValue(treeIter, 0);
            });

            return(result);
        }