Example #1
0
 partial void ModButtonTouchUpInside(Foundation.NSObject sender)
 {
     _NumberPop       = new NumberModifyPopover();
     _NumberPop.Title = "Die Modifier";
     _NumberPop.Data  = "Die Modifier";
     _NumberPop.Value = _Mod;
     _NumberPop.ShowOnView(ModButton);
     _NumberPop.NumberModified += Handle_NumberPopNumberModified;
 }
Example #2
0
        void HandleTempHPButtonTouchUpInside(object sender, EventArgs e)
        {
            NumberModifyPopover pop = new NumberModifyPopover();

            pop.ShowOnView((UIView)sender);
            pop.Value           = Character.TemporaryHP;
            pop.ValueType       = "TempHP";
            pop.ValueFormat     = "Temporary HP: {0}";
            pop.NumberModified += HandleTempHPPopNumberModified;
        }
Example #3
0
        void HandleNonlethalButtonTouchUpInside(object sender, EventArgs e)
        {
            NumberModifyPopover pop = new NumberModifyPopover();

            pop.ShowOnView((UIView)sender);
            pop.Value           = Character.NonlethalDamage;
            pop.ValueType       = "Nonlethal";
            pop.ValueFormat     = "Nonlethal: {0}";
            pop.NumberModified += HandleNonlethalPopNumberModified;
        }
Example #4
0
        void HandleModButtonTouchUpInside(object sender, EventArgs e)
        {
            NumberModifyPopover pop = new NumberModifyPopover();

            pop.ShowOnView((UIView)sender);
            pop.Value           = Character.Monster.Init;
            pop.ValueType       = "Init";
            pop.ValueFormat     = "Init Mod: {0}";
            pop.NumberModified += HandleInitPopNumberModified;
        }
Example #5
0
        private void InitButtonTouchUpInside(object sender, EventArgs e)
        {
            GradientButton b  = (GradientButton)sender;
            Character      ch = (Character)b.Data;

            if (ch != null)
            {
                NumberModifyPopover pop = new NumberModifyPopover();
                pop.ShowOnView((UIView)sender);
                pop.Value           = ch.CurrentInitiative;
                pop.ValueType       = "CurrentInit";
                pop.Data            = ch;
                pop.ValueFormat     = "Initiative: {0}";
                pop.NumberModified += HandleInitPopNumberModified;
            }
        }
 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();
         }
     }
 }