Example #1
0
        public static bool ShowSelectDialog(this Form form, ref int selectIndex, IList items, string title, string description, UIStyle style = UIStyle.Blue, bool topMost = false)
        {
            UISelectForm frm = new UISelectForm();

            frm.TopMost = topMost;
            frm.Style   = style;
            frm.SetItems(items);
            frm.SelectedIndex = selectIndex;
            if (title.IsValid())
            {
                frm.Title = title;
            }
            if (description.IsValid())
            {
                frm.Description = description;
            }
            frm.ShowDialog();

            bool result = frm.IsOK;

            if (frm.IsOK)
            {
                selectIndex = frm.SelectedIndex;
            }

            frm.Dispose();
            return(result);
        }
Example #2
0
        public static bool ShowSelectDialog(this Form form, ref int selectIndex, IList items, UIStyle style = UIStyle.Blue)
        {
            UISelectForm frm = new UISelectForm();

            frm.Style = style;
            frm.SetItems(items);
            frm.SelectedIndex = selectIndex;
            frm.ShowDialog();

            bool result = frm.IsOK;

            if (frm.IsOK)
            {
                selectIndex = frm.SelectedIndex;
            }

            frm.Dispose();
            return(result);
        }