예제 #1
0
 public Creation_Form(string name, List <Shop> s, MainForm form)
 {
     InitializeComponent();
     ShopList.Initialize();
     Text     = name;
     main     = form;
     formType = Creation.CreationFormType.Shop;
     foreach (Shop current in s)
     {
         ShopItems.AddRange(current.Items);
     }
     itemList.Items.AddRange(ShopItems.ToArray());
     sortBox.Items.Clear();
     sortBox.Items.AddRange(new string[]
     {
         "Alphabetize",
         "Highest Margin"
     });
     sortBox_SelectedIndexChanged(sortBox, null);
 }
예제 #2
0
 public Creation_Form(string name, Creation.CreationFormType type, MainForm form)
 {
     InitializeComponent();
     formType = type;
     Text     = name;
     main     = form;
     foreach (Item current in MainForm.AllItems)
     {
         bool flag = type == Creation.CreationFormType.GereralStore;
         if (flag)
         {
             MasterList.Add(new Creation(new List <Item>
             {
                 current
             }, new List <Item>
             {
                 CreationLists.GI("Coins", current.generalStore)
             }, type));
         }
         else
         {
             bool flag2 = type == Creation.CreationFormType.HighAlch;
             if (flag2)
             {
                 MasterList.Add(new Creation(new List <Item>
                 {
                     current,
                     CreationLists.GI("Nature rune", 1)
                 }, new List <Item>
                 {
                     CreationLists.GI("Coins", current.highAlch)
                 }, type));
             }
             else
             {
                 bool flag3 = type == Creation.CreationFormType.LowAlch;
                 if (flag3)
                 {
                     MasterList.Add(new Creation(new List <Item>
                     {
                         current,
                         CreationLists.GI("Nature rune", 1)
                     }, new List <Item>
                     {
                         CreationLists.GI("Coins", current.lowAlch)
                     }, type));
                 }
                 else
                 {
                     bool flag4 = type == Creation.CreationFormType.KaramjaStore;
                     if (flag4)
                     {
                         MasterList.Add(new Creation(new List <Item>
                         {
                             current
                         }, new List <Item>
                         {
                             CreationLists.GI("Coins", current.karamjaStore)
                         }, type));
                     }
                 }
             }
         }
     }
     sortBox_SelectedIndexChanged(sortBox, null);
 }