private void ModifierMethodComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string methodName;

            if (AllowEvents == false)
            {
                return;
            }

            methodName = ModifierMethodComboBox.SelectedItem.ToString();
            SelectedModifierMethodId = ModifierMethodModel.GetIdFromMethodName(methodName);
            if (methodName == "AbilityBonus" || methodName == "AbilitySwap" || methodName == "Attribute")
            {
                PullFromComboBox.Visible = true;
                PullFromLabel.Visible    = true;
                FillPullFromComboBox();
                PullFromComboBox.SelectedIndex = 0;
            }
            else
            {
                PullFromComboBox.Visible = false;
                PullFromLabel.Visible    = false;
            }
            CheckToEnableOkButton();
        }
        public EditModifierDialogClass()
        {
            InitializeComponent();

            this.NewFlag = true;
            this.SelectedModifierType     = 0;
            this.SelectedModifierMethodId = ModifierMethodModel.GetIdFromMethodName("Normal");
            this.SelectedModifierId       = Guid.Empty;
            this.SelectedBonusTypeId      = Guid.Empty;
            this.SelectedPullFromId       = Guid.Empty;
            this.SelectedRequirementId    = Guid.Empty;
            this.SelectedStanceId         = Guid.Empty;
            this.SelectedComparison       = "=";
            this.SelectedModifierValue    = 0;
            this.SelectedRequirementValue = 0;

            //Set our list/trackers to empty lists
            ModifierMethodNames = new List <string>();
            ModifierNames       = new List <string>();
            BonusTypeNames      = new List <string>();
            PullFromNames       = new List <string>();
            RequirementNames    = new List <string>();
            StanceNames         = new List <string>();



            AllowEvents = true;
        }
Example #3
0
        public ModifierDialogClass(bool recordIsNew, Guid modifierId, Guid requirementId, Guid modifierMethodId, Guid bonusTypeId, Guid pullFromId,
                                   Guid stanceId, byte modifierType = 0, double modifierValue = 0, string requirementComparison = "", double requirementValue = 0)
        {
            InitializeComponent();
            DefaultWidth  = 551;
            DefaultHeight = 358;

            //lets set our member variables
            isNewRecord          = recordIsNew;
            SelectedModifierType = modifierType;
            SelectedModifierId   = modifierId;
            if (modifierMethodId == Guid.Empty)
            {
                SelectedModifierId = ModifierMethodModel.GetIdFromMethodName("Normal");
            }
            else
            {
                SelectedModifierMethodId = modifierMethodId;
            }
            SelectedBonusTypeId      = bonusTypeId;
            SelectedPullFromId       = pullFromId;
            SelectedModifierValue    = modifierValue;
            SelectedRequirementId    = requirementId;
            SelectedComparison       = requirementComparison;
            SelectedRequirementValue = requirementValue;
            SelectedStanceId         = stanceId;

            //Set our Lists to Empty
            CategoryNames       = new List <string>();
            ModifierMethodNames = new List <string>();
            ModifierNames       = new List <string>();
            BonusTypeNames      = new List <string>();
            PullFromNames       = new List <string>();
            StanceNames         = new List <string>();
        }