public GetMailAction() { //CheckNewMail Properties["ItemID"] = new MetaProp( "ItemID", typeof(string), new DisplayNameAttribute(Strings["Action_Common_ItemEntries"])); Properties["MinFreeBagSlots"] = new MetaProp( "MinFreeBagSlots", typeof(int), new DisplayNameAttribute( Strings["Action_Common_MinFreeBagSlots"])); Properties["CheckNewMail"] = new MetaProp( "CheckNewMail", typeof(bool), new DisplayNameAttribute( Strings["Action_GetMailAction_CheckNewMail"])); Properties["GetMailType"] = new MetaProp( "GetMailType", typeof(GetMailActionType), new DisplayNameAttribute(Strings["Action_GetMailAction_Name"])); Properties["AutoFindMailBox"] = new MetaProp( "AutoFindMailBox", typeof(bool), new DisplayNameAttribute( Strings["Action_Common_AutoFindMailbox"])); Properties["Location"] = new MetaProp( "Location", typeof(string), new EditorAttribute( typeof(LocationEditor), typeof(UITypeEditor)), new DisplayNameAttribute(Strings["Action_Common_Location"])); Properties["MaxCODAmount"] = new MetaProp( "MaxCODAmount", typeof(GoldEditor), new TypeConverterAttribute(typeof(GoldEditorConverter)), new DisplayNameAttribute(Strings["Action_Common_MaxCODPrice"])); ItemID = ""; CheckNewMail = true; MaxCODAmount = new GoldEditor("0g0s0c"); GetMailType = GetMailActionType.AllItems; AutoFindMailBox = true; _loc = WoWPoint.Zero; Location = _loc.ToInvariantString(); MinFreeBagSlots = 0; Properties["GetMailType"].PropertyChanged += GetMailActionPropertyChanged; Properties["AutoFindMailBox"].PropertyChanged += AutoFindMailBoxChanged; Properties["ItemID"].Show = false; Properties["Location"].Show = false; Properties["Location"].PropertyChanged += LocationChanged; }
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, System.Type destinationType) { if (destinationType == typeof(System.String) && value is GoldEditor) { GoldEditor ge = (GoldEditor)value; return(ge.ToString()); } return(base.ConvertTo(context, culture, value, destinationType)); }
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string) { GoldEditor ge = new GoldEditor(); if (!ge.SetValues((string)value)) { throw new ArgumentException("Can not convert '" + (string)value + "' to type GoldEditor"); } return(ge); } return(base.ConvertFrom(context, culture, value)); }
public CancelAuctionAction() { Properties["ItemID"] = new MetaProp("ItemID", typeof(string), new DisplayNameAttribute(Strings["Action_Common_ItemEntries"])); Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute(Strings["Action_Common_AutoFindAH"])); Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(LocationEditor), typeof(UITypeEditor)), new DisplayNameAttribute(Strings["Action_Common_Location"])); Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute(Strings["Action_Common_UseCategory"])); Properties["Category"] = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute(Strings["Action_Common_ItemCategory"])); Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute( Strings["Action_Common_ItemSubCategory"])); Properties["MinBuyout"] = new MetaProp("MinBuyout", typeof(GoldEditor), new TypeConverterAttribute(typeof(GoldEditorConverter)), new DisplayNameAttribute(Strings["Action_Common_MinBuyout"])); Properties["IgnoreStackSizeBelow"] = new MetaProp("IgnoreStackSizeBelow", typeof(uint), new DisplayNameAttribute( Strings["Action_Common_IgnoreStackSizeBelow"])); ItemID = "0"; AutoFindAh = true; _loc = WoWPoint.Zero; Location = _loc.ToInvariantString(); UseCategory = false; Category = WoWItemClass.TradeGoods; SubCategory = WoWItemTradeGoodsClass.None; MinBuyout = new GoldEditor("0g0s0c"); IgnoreStackSizeBelow = 1u; Properties["AutoFindAh"].PropertyChanged += AutoFindAHChanged; Properties["Location"].PropertyChanged += LocationChanged; Properties["UseCategory"].PropertyChanged += UseCategoryChanged; Properties["Category"].PropertyChanged += CategoryChanged; Properties["Category"].Show = false; Properties["SubCategory"].Show = false; Properties["Location"].Show = false; }
public BuyItemFromAhAction() { Properties["ItemID"] = new MetaProp("ItemID", typeof(string), new DisplayNameAttribute(Strings["Action_Common_ItemEntries"])); Properties["MaxBuyout"] = new MetaProp("MaxBuyout", typeof(GoldEditor), new TypeConverterAttribute(typeof(GoldEditorConverter)), new DisplayNameAttribute(Strings["Action_Common_MaxBuyout"])); Properties["Amount"] = new MetaProp("Amount", typeof(DynamicProperty <int>), new TypeConverterAttribute( typeof(DynamicProperty <int> .DynamivExpressionConverter)), new DisplayNameAttribute(Strings["Action_Common_Amount"])); Properties["ItemListType"] = new MetaProp("ItemListType", typeof(ItemType), new DisplayNameAttribute(Strings["Action_Common_Buy"])); Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute(Strings["Action_Common_AutoFindAH"])); Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool), new DisplayNameAttribute( Strings["Action_Common_BuyAdditively"])); Properties["BidOnItem"] = new MetaProp("BidOnItem", typeof(bool), new DisplayNameAttribute( Strings["Action_BuyItemFromAhAction_BidOnItem"])); Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(LocationEditor), typeof(UITypeEditor)), new DisplayNameAttribute(Strings["Action_Common_Location"])); ItemID = ""; Amount = new DynamicProperty <int>("Amount", this, "1"); ItemListType = ItemType.Item; AutoFindAh = true; _loc = WoWPoint.Zero; Location = _loc.ToInvariantString(); MaxBuyout = new GoldEditor("100g0s0c"); BidOnItem = false; BuyAdditively = true; Properties["AutoFindAh"].PropertyChanged += AutoFindAHChanged; Properties["ItemListType"].PropertyChanged += BuyItemFromAhActionPropertyChanged; Properties["Location"].PropertyChanged += LocationChanged; Properties["Amount"].Show = true; Properties["Location"].Show = false; }
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string) { GoldEditor ge = new GoldEditor(); if (!ge.SetValues((string)value)) throw new ArgumentException("Can not convert '" + (string)value + "' to type GoldEditor"); return ge; } return base.ConvertFrom(context, culture, value); }
public SellItemOnAhAction() { Properties["ItemID"] = new MetaProp( "ItemID", typeof(string), new DisplayNameAttribute(Strings["Action_Common_ItemEntries"])); Properties["RunTime"] = new MetaProp( "RunTime", typeof(RunTimeType), new DisplayNameAttribute(Strings["Action_SellItemOnAhAction_AuctionDuration"])); Properties["MinBuyout"] = new MetaProp( "MinBuyout", typeof(GoldEditor), new TypeConverterAttribute(typeof(GoldEditorConverter)), new DisplayNameAttribute(Strings["Action_Common_MinBuyout"])); Properties["MaxBuyout"] = new MetaProp( "MaxBuyout", typeof(GoldEditor), new TypeConverterAttribute(typeof(GoldEditorConverter)), new DisplayNameAttribute(Strings["Action_Common_MaxBuyout"])); Properties["Amount"] = new MetaProp( "Amount", typeof(DynamicProperty <int>), new TypeConverterAttribute(typeof(DynamicProperty <int> .DynamivExpressionConverter)), new DisplayNameAttribute(Strings["Action_Common_Amount"])); Properties["StackSize"] = new MetaProp( "StackSize", typeof(uint), new DisplayNameAttribute(Strings["Action_Common_StackSize"])); Properties["IgnoreStackSizeBelow"] = new MetaProp( "IgnoreStackSizeBelow", typeof(uint), new DisplayNameAttribute(Strings["Action_Common_IgnoreStackSizeBelow"])); Properties["AmountType"] = new MetaProp( "AmountType", typeof(AmountBasedType), new DisplayNameAttribute(Strings["Action_Common_Sell"])); Properties["AutoFindAh"] = new MetaProp( "AutoFindAh", typeof(bool), new DisplayNameAttribute(Strings["Action_Common_AutoFindAH"])); Properties["Location"] = new MetaProp( "Location", typeof(string), new EditorAttribute(typeof(LocationEditor), typeof(UITypeEditor)), new DisplayNameAttribute(Strings["Action_Common_Location"])); Properties["BidPrecent"] = new MetaProp( "BidPrecent", typeof(float), new DisplayNameAttribute(Strings["Action_SellItemOnAhAction_BidPercent"])); Properties["UndercutPrecent"] = new MetaProp( "UndercutPrecent", typeof(double), new DisplayNameAttribute(Strings["Action_SellItemOnAhAction_UndercutPercent"])); Properties["UseCategory"] = new MetaProp( "UseCategory", typeof(bool), new DisplayNameAttribute(Strings["Action_Common_UseCategory"])); Properties["Category"] = new MetaProp( "Category", typeof(WoWItemClass), new DisplayNameAttribute(Strings["Action_Common_ItemCategory"])); Properties["SubCategory"] = new MetaProp( "SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute(Strings["Action_Common_ItemSubCategory"])); Properties["PostIfBelowMinBuyout"] = new MetaProp( "PostIfBelowMinBuyout", typeof(bool), new DisplayNameAttribute(Strings["Action_SellItemOnAhAction_PostIfBelowMinBuyout"])); Properties["PostPartialStacks"] = new MetaProp( "PostPartialStacks", typeof(bool), new DisplayNameAttribute(Strings["Action_SellItemOnAhAction_PostPartialStacks"])); ItemID = ""; MinBuyout = new GoldEditor("0g10s0c"); MaxBuyout = new GoldEditor("100g0s0c"); RunTime = RunTimeType._24_Hours; Amount = new DynamicProperty <int>("Amount", this, "10"); StackSize = 20u; IgnoreStackSizeBelow = 1u; AmountType = AmountBasedType.Everything; AutoFindAh = true; BidPrecent = 95f; UndercutPrecent = 0.1; _loc = WoWPoint.Zero; Location = _loc.ToInvariantString(); UseCategory = true; Category = WoWItemClass.TradeGoods; SubCategory = WoWItemTradeGoodsClass.None; PostIfBelowMinBuyout = true; PostPartialStacks = true; Properties["AutoFindAh"].PropertyChanged += AutoFindAHChanged; Properties["AmountType"].PropertyChanged += SellItemToAhActionPropertyChanged; Properties["Location"].PropertyChanged += LocationChanged; Properties["UseCategory"].PropertyChanged += UseCategoryChanged; Properties["Category"].PropertyChanged += CategoryChanged; Properties["ItemID"].Show = false; Properties["Amount"].Show = false; Properties["Location"].Show = false; }