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();
         }
     }
 }
예제 #2
0
 public ViewDelegate(HDEditorDialog state)
 {
     this.state = state;
 }
예제 #3
0
 public ViewDataSource(HDEditorDialog state)
 {
     this.state = state;
 }