void Handle_ButtonTouchUpInside(object sender, EventArgs e)
 {
     if (_ValueList == null)
     {
         if (_Property.PropertyType == typeof(string))
         {
             _TextBoxDialog            = new TextBoxDialog();
             _TextBoxDialog.HeaderText = DisplayTitle;
             _TextBoxDialog.Value      = (string)Value;
             _TextBoxDialog.SingleLine = !_Multiline;
             _TextBoxDialog.OKClicked += Handle_TextBoxDialogOKClicked;
             _DialogParent.AddSubview(_TextBoxDialog.View);
         }
         else if (_Property.PropertyType == typeof(int) || _Property.PropertyType == typeof(int?))
         {
             NumberModifyPopover pop = new NumberModifyPopover();
             pop.ShowOnView(_Button);
             if (_Property.PropertyType == typeof(int?))
             {
                 pop.Value = (int?)Value;
             }
             else
             {
                 pop.Value = (int)Value;
             }
             pop.ValueType       = DisplayTitle;
             pop.Title           = DisplayTitle;
             pop.Data            = _PropertyObject;
             pop.Nullable        = (_Property.PropertyType == typeof(int?));
             pop.NumberModified += HandlePopNumberModified;
         }
         else if (_Property.PropertyType == typeof(DieRoll))
         {
             _HDDialog            = new HDEditorDialog();
             _HDDialog.HeaderText = DisplayTitle;
             _HDDialog.DieRoll    = (DieRoll)Value;
             DialogParent.AddSubview(_HDDialog.View);
             _HDDialog.OKClicked += Handle_HDDialogOKClicked;
         }
         else if (_Property.PropertyType == typeof(bool))
         {
             Value = !(bool)Value;
             UpdateButton();
         }
     }
 }
Ejemplo n.º 2
0
 public ViewDelegate(HDEditorDialog state)
 {
     this.state = state;
 }
Ejemplo n.º 3
0
 public ViewDataSource(HDEditorDialog state)
 {
     this.state = state;
 }