Пример #1
0
        private void InteractionActionPropertyChanged(object sender, MetaPropArgs e)
        {
            switch (GameObjectType)
            {
            case WoWGameObjectType.SpellFocus:
                Properties["SpellFocus"].Show = true;
                break;

            default:
                Properties["SpellFocus"].Show = false;
                break;
            }
            switch (InteractType)
            {
            case InteractActionType.GameObject:
                Properties["GameObjectType"].Show = true;
                break;

            case InteractActionType.NPC:
                Properties["GameObjectType"].Show = false;
                break;

            default:
                Properties["GameObjectType"].Show = true;
                break;
            }
            RefreshPropertyGrid();
        }
Пример #2
0
        static private void DynamicPropertyChanged(object sender, MetaPropArgs e)
        {
            var dynamicProperty = e.Value as DynamicProperty <T>;

            if (dynamicProperty == null)
            {
                return;
            }
            var prevDynamicProperty = e.PreviousValue as DynamicProperty <T>;

            if (prevDynamicProperty == null)
            {
                return;
            }
            if (prevDynamicProperty.AttachedComposite != null)
            {
                dynamicProperty.AttachedComposite = prevDynamicProperty.AttachedComposite;
            }
            if (!string.IsNullOrEmpty(prevDynamicProperty.Name))
            {
                dynamicProperty.Name = prevDynamicProperty.Name;
            }
            if (!string.IsNullOrEmpty(prevDynamicProperty.CompileError))
            {
                dynamicProperty.CompileError = prevDynamicProperty.CompileError;
            }
        }
Пример #3
0
        private void ItemSelectionChanged(object sender, MetaPropArgs e)
        {
            switch (ItemSelection)
            {
            case ItemSelectionType.IDs:
                Properties["ItemID"].Show      = true;
                Properties["Category"].Show    = false;
                Properties["SubCategory"].Show = false;
                Properties["ItemQuality"].Show = false;
                break;

            case ItemSelectionType.Category:
                Properties["ItemID"].Show      = false;
                Properties["Category"].Show    = true;
                Properties["SubCategory"].Show = true;
                Properties["ItemQuality"].Show = false;
                break;

            case ItemSelectionType.Quality:
                Properties["ItemID"].Show      = false;
                Properties["Category"].Show    = false;
                Properties["SubCategory"].Show = false;
                Properties["ItemQuality"].Show = true;
                break;
            }
            RefreshPropertyGrid();
        }
 void LocationChanged(object sender, MetaPropArgs e)
 {
     _loc = Util.StringToWoWPoint((string)((MetaProp)sender).Value);
     Properties["Location"].PropertyChanged -= LocationChanged;
     Properties["Location"].Value            = string.Format("{0}, {1}, {2}", _loc.X, _loc.Y, _loc.Z);
     Properties["Location"].PropertyChanged += LocationChanged;
     RefreshPropertyGrid();
 }
Пример #5
0
 private void LocationChanged(object sender, MetaPropArgs e)
 {
     _loc = Util.StringToWoWPoint(Location);
     Properties["Location"].PropertyChanged -= LocationChanged;
     Properties["Location"].Value            = string.Format(CultureInfo.InvariantCulture, "{0}, {1}, {2}", _loc.X, _loc.Y, _loc.Z);
     Properties["Location"].PropertyChanged += LocationChanged;
     RefreshPropertyGrid();
 }
        void CategoryChanged(object sender, MetaPropArgs e)
        {
            object subCategory = Callbacks.GetSubCategory(Category);

            Properties["SubCategory"] = new MetaProp("SubCategory", subCategory.GetType(),
                                                     new DisplayNameAttribute("Item SubCategory"));
            SubCategory = subCategory;
            RefreshPropertyGrid();
        }
Пример #7
0
 private void CompileErrorPropertyChanged(object sender, MetaPropArgs e)
 {
     if (CompileError != "")
     {
         Properties["CompileError"].Show = true;
         MainForm.Instance.RefreshActionTree(this);
     }
     else
         Properties["CompileError"].Show = false;
     RefreshPropertyGrid();
     _lastError = CompileError;
 }
Пример #8
0
 private void CastOnItemChanged(object sender, MetaPropArgs e)
 {
     if (CastOnItem)
     {
         Properties["ItemType"].Show = true;
         Properties["ItemId"].Show   = true;
     }
     else
     {
         Properties["ItemType"].Show = false;
         Properties["ItemId"].Show   = false;
     }
     RefreshPropertyGrid();
 }
Пример #9
0
 private void AutoFindBankChanged(object sender, MetaPropArgs e)
 {
     if (AutoFindBank)
     {
         Properties["Location"].Show = false;
         Properties["NpcEntry"].Show = false;
     }
     else
     {
         Properties["Location"].Show = true;
         Properties["NpcEntry"].Show = true;
     }
     RefreshPropertyGrid();
 }
Пример #10
0
 private void CompileErrorPropertyChanged(object sender, MetaPropArgs e)
 {
     if (CompileError != "" || (CompileError == "" && _lastError != ""))
     {
         MainForm.Instance.RefreshActionTree(this);
         Properties["CompileError"].Show = true;
     }
     else
     {
         Properties["CompileError"].Show = false;
     }
     RefreshPropertyGrid();
     _lastError = CompileError;
 }
 void BuyItemFromAhActionPropertyChanged(object sender, MetaPropArgs e)
 {
     if (ItemListType == ItemType.MaterialList)
     {
         Properties["ItemID"].Show        = false;
         Properties["Amount"].Show        = false;
         Properties["BuyAdditively"].Show = false;
     }
     else
     {
         Properties["ItemID"].Show        = true;
         Properties["Amount"].Show        = true;
         Properties["BuyAdditively"].Show = true;
     }
     RefreshPropertyGrid();
 }
Пример #12
0
        private void SellItemActionPropertyChanged(object sender, MetaPropArgs e)
        {
            switch (SellItemType)
            {
            case SellItemActionType.Specific:
                Properties["Count"].Show  = true;
                Properties["ItemID"].Show = true;
                break;

            default:
                Properties["Count"].Show  = false;
                Properties["ItemID"].Show = false;
                break;
            }
            RefreshPropertyGrid();
        }
 void UseCategoryChanged(object sender, MetaPropArgs e)
 {
     if (UseCategory)
     {
         Properties["ItemID"].Show      = false;
         Properties["Category"].Show    = true;
         Properties["SubCategory"].Show = true;
     }
     else
     {
         Properties["ItemID"].Show      = true;
         Properties["Category"].Show    = false;
         Properties["SubCategory"].Show = false;
     }
     RefreshPropertyGrid();
 }
Пример #14
0
        private void BuyItemActionPropertyChanged(object sender, MetaPropArgs e)
        {
            switch (BuyItemType)
            {
            case BuyItemActionType.Material:
                Properties["ItemID"].Show        = false;
                Properties["Count"].Show         = false;
                Properties["BuyAdditively"].Show = false;
                break;

            case BuyItemActionType.SpecificItem:
                Properties["ItemID"].Show        = true;
                Properties["Count"].Show         = true;
                Properties["BuyAdditively"].Show = true;
                break;
            }
            RefreshPropertyGrid();
        }
Пример #15
0
        private void GetItemfromBankActionPropertyChanged(object sender, MetaPropArgs e)
        {
            switch (GetItemfromBankType)
            {
            case BankWithdrawlItemType.SpecificItem:
                Properties["Amount"].Show             = true;
                Properties["ItemID"].Show             = true;
                Properties["WithdrawAdditively"].Show = true;
                break;

            case BankWithdrawlItemType.Materials:
                Properties["Amount"].Show             = false;
                Properties["ItemID"].Show             = false;
                Properties["WithdrawAdditively"].Show = false;
                break;
            }
            RefreshPropertyGrid();
        }
Пример #16
0
        void MoveToActionPropertyChanged(object sender, MetaPropArgs e)
        {
            switch (MoveType)
            {
            case MoveToType.Location:
                Properties["Entry"].Show    = false;
                Properties["Location"].Show = true;
                Properties["Pathing"].Show  = true;
                break;

            case MoveToType.NpcByID:
                Properties["Entry"].Show    = true;
                Properties["Location"].Show = false;
                Properties["Pathing"].Show  = false;
                break;

            default:
                Properties["Entry"].Show    = false;
                Properties["Location"].Show = false;
                Properties["Pathing"].Show  = false;
                break;
            }
            RefreshPropertyGrid();
        }
Пример #17
0
 void ItemTargetChanged(object sender, MetaPropArgs e)
 {
     Properties["ItemId"].Show = ItemTarget == ItemTargetType.Specific;
     RefreshPropertyGrid();
 }
Пример #18
0
 private void InteractionActionPropertyChanged(object sender, MetaPropArgs e)
 {
     switch (GameObjectType)
     {
         case WoWGameObjectType.SpellFocus:
             Properties["SpellFocus"].Show = true;
             break;
         default:
             Properties["SpellFocus"].Show = false;
             break;
     }
     switch (InteractType)
     {
         case InteractActionType.GameObject:
             Properties["GameObjectType"].Show = true;
             break;
         case InteractActionType.NPC:
             Properties["GameObjectType"].Show = false;
             break;
         default:
             Properties["GameObjectType"].Show = true;
             break;
     }
     RefreshPropertyGrid();
 }
Пример #19
0
 private void WithdrawChanged(object sender, MetaPropArgs e)
 {
     Properties["Amount"].Show = Withdraw == DepositWithdrawAmount.Amount;
     RefreshPropertyGrid();
 }
Пример #20
0
 void LocationChanged(object sender, MetaPropArgs e)
 {
     _loc = Util.StringToWoWPoint((string)((MetaProp)sender).Value);
     Properties["Location"].PropertyChanged -= LocationChanged;
     Properties["Location"].Value = string.Format("{0}, {1}, {2}", _loc.X, _loc.Y, _loc.Z);
     Properties["Location"].PropertyChanged += LocationChanged;
     RefreshPropertyGrid();
 }
 void AutoFindAHChanged(object sender, MetaPropArgs e)
 {
     Properties["Location"].Show = !AutoFindAh;
     RefreshPropertyGrid();
 }
Пример #22
0
 void OnEntryChanged(object sender, MetaPropArgs e)
 {
     CheckTradeskillList();
 }
Пример #23
0
 private void DynamicPropertyChanged(object sender, MetaPropArgs e)
 {
     ((IDynamicProperty)e.Value).AttachedComposite = this;
     DynamicCodeCompiler.CodeWasModified           = true;
 }
Пример #24
0
 private void ItemTargetChanged(object sender, MetaPropArgs e)
 {
     Properties["ItemId"].Show = ItemTarget == ItemTargetType.Specific;
     RefreshPropertyGrid();
 }
Пример #25
0
 private void ActionTypeChanged(object sender, MetaPropArgs e)
 {
     Properties["ItemQuality"].Show = ActionType == DeActionType.Disenchant;
     RefreshPropertyGrid();
 }
Пример #26
0
 private void GetMailActionPropertyChanged(object sender, MetaPropArgs e)
 {
     Properties["ItemID"].Show = GetMailType != GetMailActionType.AllItems;
     RefreshPropertyGrid();
 }
Пример #27
0
 private void WithdrawChanged(object sender, MetaPropArgs e)
 {
     Properties["Amount"].Show = Withdraw == DepositWithdrawAmount.Amount;
     RefreshPropertyGrid();
 }
Пример #28
0
 private void GetItemfromBankActionPropertyChanged(object sender, MetaPropArgs e)
 {
     switch (GetItemfromBankType)
     {
         case BankWithdrawlItemType.SpecificItem:
             Properties["Amount"].Show = true;
             Properties["ItemID"].Show = true;
             Properties["WithdrawAdditively"].Show = true;
             break;
         case BankWithdrawlItemType.Materials:
             Properties["Amount"].Show = false;
             Properties["ItemID"].Show = false;
             Properties["WithdrawAdditively"].Show = false;
             break;
     }
     RefreshPropertyGrid();
 }
Пример #29
0
 private void SellItemToAhActionPropertyChanged(object sender, MetaPropArgs e)
 {
     Properties["Amount"].Show = AmountType != AmountBasedType.Everything;
     RefreshPropertyGrid();
 }
Пример #30
0
 private void AutoFindBankChanged(object sender, MetaPropArgs e)
 {
     if (AutoFindBank)
     {
         Properties["Location"].Show = false;
         Properties["NpcEntry"].Show = false;
     }
     else
     {
         Properties["Location"].Show = true;
         Properties["NpcEntry"].Show = true;
     }
     RefreshPropertyGrid();
 }
Пример #31
0
 private void OnCounterChanged(object sender, MetaPropArgs e)
 {
     RefreshPropertyGrid();
 }
Пример #32
0
 private void DynamicPropertyChanged(object sender, MetaPropArgs e)
 {
     ((IDynamicProperty) e.Value).AttachedComposite = this;
     DynamicCodeCompiler.CodeWasModified = true;
 }
Пример #33
0
 private void ProfileSettingsPropertyChanged(object sender, MetaPropArgs e)
 {
     ProfessionbuddyBot.Instance.ProfileSettings[((MetaProp)sender).Name] = ((MetaProp)sender).Value;
 }
 private void SellJunkItemActionPropertyChanged(object sender, MetaPropArgs e)
 {
     switch (SellItemType)
     {
         case SellJunkItemActionType.Specific:
             Properties["Count"].Show = true;
             Properties["ItemID"].Show = true;
             break;
         default:
             Properties["Count"].Show = false;
             Properties["ItemID"].Show = false;
             break;
     }
     RefreshPropertyGrid();
 }
 void BuyItemFromAhActionPropertyChanged(object sender, MetaPropArgs e)
 {
     if (ItemListType == ItemType.MaterialList)
     {
         Properties["ItemID"].Show = false;
         Properties["Amount"].Show = false;
         Properties["BuyAdditively"].Show = false;
     }
     else
     {
         Properties["ItemID"].Show = true;
         Properties["Amount"].Show = true;
         Properties["BuyAdditively"].Show = true;
     }
     RefreshPropertyGrid();
 }
Пример #36
0
 void UseCategoryChanged(object sender, MetaPropArgs e)
 {
     if (UseCategory)
     {
         Properties["ItemID"].Show = false;
         Properties["Category"].Show = true;
         Properties["SubCategory"].Show = true;
     }
     else
     {
         Properties["ItemID"].Show = true;
         Properties["Category"].Show = false;
         Properties["SubCategory"].Show = false;
     }
     RefreshPropertyGrid();
 }
Пример #37
0
 private void AutoFindAHChanged(object sender, MetaPropArgs e)
 {
     Properties["Location"].Show = !AutoFindAh;
     RefreshPropertyGrid();
 }
Пример #38
0
 private void LocationChanged(object sender, MetaPropArgs e)
 {
     _loc = Util.StringToWoWPoint(Location);
     Properties["Location"].PropertyChanged -= LocationChanged;
     Properties["Location"].Value = string.Format(CultureInfo.InvariantCulture, "{0}, {1}, {2}", _loc.X, _loc.Y, _loc.Z);
     Properties["Location"].PropertyChanged += LocationChanged;
     RefreshPropertyGrid();
 }
Пример #39
0
 private void SellItemToAhActionPropertyChanged(object sender, MetaPropArgs e)
 {
     Properties["Amount"].Show = AmountType != AmountBasedType.Everything;
     RefreshPropertyGrid();
 }
Пример #40
0
 private void SellChanged(object sender, MetaPropArgs e)
 {
     Properties["Sell"].Show = Sell == DepositWithdrawAmount.Amount;
     RefreshPropertyGrid();
 }
Пример #41
0
 private void CastSpellActionPropertyChanged(object sender, MetaPropArgs e)
 {
     IsDone = false;
     Pb.UpdateMaterials();
 }
Пример #42
0
 void ActionTypeChanged(object sender, MetaPropArgs e)
 {
     Properties["ItemQuality"].Show = ActionType == DeActionType.Disenchant;
     RefreshPropertyGrid();
 }
Пример #43
0
 void Code_PropertyChanged(object sender, MetaPropArgs e)
 {
     DynamicCodeCompiler.CodeWasModified = true;
 }
Пример #44
0
 private void CustomAction_PropertyChanged(object sender, MetaPropArgs e)
 {
     DynamicCodeCompiler.CodeWasModified = true;
 }
Пример #45
0
 private void CustomAction_PropertyChanged(object sender, MetaPropArgs e)
 {
     DynamicCodeCompiler.CodeWasModified = true;
 }
Пример #46
0
 void CastSpellActionPropertyChanged(object sender, MetaPropArgs e)
 {
     IsDone = false;
     Pb.UpdateMaterials();
 }
Пример #47
0
 private void GetMailActionPropertyChanged(object sender, MetaPropArgs e)
 {
     Properties["ItemID"].Show = GetMailType != GetMailActionType.AllItems;
     RefreshPropertyGrid();
 }
Пример #48
0
 void CastOnItemChanged(object sender, MetaPropArgs e)
 {
     if (CastOnItem)
     {
         Properties["ItemType"].Show = true;
         Properties["ItemId"].Show = true;
     }
     else
     {
         Properties["ItemType"].Show = false;
         Properties["ItemId"].Show = false;
     }
     RefreshPropertyGrid();
 }
 void PutItemInBankActionPropertyChanged(object sender, MetaPropArgs e)
 {
     Properties["GuildTab"].Show = Bank != BankType.Personal;
     RefreshPropertyGrid();
 }
Пример #50
0
 void OnCounterChanged(object sender, MetaPropArgs e)
 {
     RefreshPropertyGrid();
 }
Пример #51
0
 void MoveToActionPropertyChanged(object sender, MetaPropArgs e)
 {
     switch (MoveType)
     {
         case MoveToType.Location:
             Properties["Entry"].Show = false;
             Properties["Location"].Show = true;
             Properties["Pathing"].Show = true;
             break;
         case MoveToType.NpcByID:
             Properties["Entry"].Show = true;
             Properties["Location"].Show = false;
             Properties["Pathing"].Show = false;
             break;
         default:
             Properties["Entry"].Show = false;
             Properties["Location"].Show = false;
             Properties["Pathing"].Show = false;
             break;
     }
     RefreshPropertyGrid();
 }
Пример #52
0
 private void OnEntryChanged(object sender, MetaPropArgs e)
 {
     CheckTradeskillList();
 }
Пример #53
0
 void AutoFindMailBoxChanged(object sender, MetaPropArgs e)
 {
     Properties["Location"].Show = !AutoFindMailBox;
     RefreshPropertyGrid();
 }
Пример #54
0
 private void BuyItemActionPropertyChanged(object sender, MetaPropArgs e)
 {
     switch (BuyItemType)
     {
         case BuyItemActionType.Material:
             Properties["ItemID"].Show = false;
             Properties["Count"].Show = false;
             Properties["BuyAdditively"].Show = false;
             break;
         case BuyItemActionType.SpecificItem:
             Properties["ItemID"].Show = true;
             Properties["Count"].Show = true;
             Properties["BuyAdditively"].Show = true;
             break;
     }
     RefreshPropertyGrid();
 }
Пример #55
0
 void CategoryChanged(object sender, MetaPropArgs e)
 {
     object subCategory = Callbacks.GetSubCategory(Category);
     Properties["SubCategory"] = new MetaProp("SubCategory", subCategory.GetType(),
         new DisplayNameAttribute("Item SubCategory"));
     SubCategory = subCategory;
     RefreshPropertyGrid();
 }
Пример #56
0
 private void AutoFindMailBoxChanged(object sender, MetaPropArgs e)
 {
     Properties["Location"].Show = !AutoFindMailBox;
     RefreshPropertyGrid();
 }
 private void SellChanged(object sender, MetaPropArgs e)
 {
     Properties["Sell"].Show = Sell == DepositWithdrawAmount.Amount;
     RefreshPropertyGrid();
 }