Ejemplo n.º 1
0
 public static string Input(string heading, string defaultt = "", InputDialogType type = InputDialogType.ALPHANUM, InputDialogOption option = InputDialogOption.NONE, int autoclose = 0)
 {
     return(Utils.Call <string>("xbmcgui.Dialog().input('" + Utils.RemoveDiacritics(heading) + "','" + defaultt + "', type=" + (int)type + ", option=" + (int)option + ")"));
 }
Ejemplo n.º 2
0
 private void SetOptions(InputDialogOption options)
 {
     this.FOptions = options;
     this.txtValue.Enabled = (options & InputDialogOption.ReadOnly) == 0;
     this.lblCaption.Enabled = this.txtValue.Enabled;
 }
        private string Write33_InputDialogOption(InputDialogOption v)
        {
            switch (v)
            {
                case InputDialogOption.AllowEmptyValue:
                    return "AllowEmptyValue";

                case InputDialogOption.AllowSameValue:
                    return "AllowSameValue";

                case InputDialogOption.ReadOnly:
                    return "ReadOnly";
            }
            return XmlSerializationWriter.FromEnum((long) v, new string[] { "AllowEmptyValue", "AllowSameValue", "ReadOnly" }, new long[] { 1L, 2L, 4L }, "Nomad.Dialogs.InputDialogOption");
        }
Ejemplo n.º 4
0
 public static bool Input(IWin32Window owner, string label, string caption, ref string value, InputDialogOption options)
 {
     using (InputDialog dialog = new InputDialog())
     {
         Form form = owner as Form;
         if (form != null)
         {
             form.AddOwnedForm(dialog);
         }
         dialog.lblCaption.Text = label;
         dialog.Text = caption;
         dialog.Value = value;
         dialog.SetOptions(options);
         if (dialog.ShowDialog(owner) == DialogResult.OK)
         {
             value = dialog.Value;
             return true;
         }
         return false;
     }
 }