private void shaderToolStripMenuItem_Click(object sender, EventArgs e) { ICommand command = new shadow(m_PageLayControl); command.OnCreate(m_mapControl.Object); command.OnClick(); }
public OrderProductResult ManageOrderVendorProduct(MarketplaceOrderItem orderItem) { var orderProducts = new List <orderproduct>(); var vendorProducts = new List <vendorproduct>(); var shadowProduct = new shadow(); OrderProductResult result; using (var context = new EisInventoryContext()) { // let's get all its vendor products via its links vendorProducts = context.vendorproductlinks .Where(x => x.EisSKU == orderItem.SKU && x.IsActive) .Select(x => x.vendorproduct) .ToList(); // let's determine if this product is a shadow sku; WHY NOT USE THE SKUType of product? O.o shadowProduct = context.shadows.FirstOrDefault(x => x.ShadowSKU == orderItem.SKU && x.IsConnected); } if (shadowProduct != null) { // let's take out the compatible vendor products that has available stock and sort by price asc var compatibleVendorProducts = vendorProducts .Where(x => x.Quantity > 0 && (shadowProduct.FactorQuantity % x.MinPack) == 0) .OrderBy(x => x.SupplierPrice) .ToList(); // iterate and determine the qualified vendor products orderProducts = createOrderProducts(compatibleVendorProducts, orderItem.OrderItemId, orderItem.QtyOrdered, shadowProduct.FactorQuantity); result = new OrderProductResult { ItemPack = shadowProduct.FactorQuantity }; } else { // let's take out the compatible vendor products that has available stock and sort by price asc var compatibleVendorProducts = vendorProducts .Where(x => x.Quantity > 0 && x.MinPack == 1) .OrderBy(x => x.SupplierPrice) .ToList(); // iterate and determine the qualified vendor products orderProducts = createOrderProducts(compatibleVendorProducts, orderItem.OrderItemId, orderItem.QtyOrdered, 1); result = new OrderProductResult { ItemPack = 1 }; } // save the order products to the database addOrderProducts(orderProducts); // update the vendor product's quantity UpdateVendorProductInventory(orderProducts, false); result.OrderProducts = Mapper.Map <List <OrderProduct> >(orderProducts); result.OrderItem = orderItem; return(result); }
public override void OnInspectorGUI() { DrawDefaultInspector(); shadow myScript = (shadow)target; if (GUILayout.Button("Checker On")) { myScript.TurnShadowOff(); } if (GUILayout.Button("Checker Off")) { myScript.TurnShadowOn(); } }
public List <Ability> buildDeck() { Initiative aggressiveNegotiation = new aggressiveNegotiation(); Initiative aggressiveNegotiation2 = new aggressiveNegotiation(); Initiative archer = new archer(); Initiative archer2 = new archer(); Initiative beanstalkRoyalties = new beanstalkRoyalties(); Initiative beanstalkRoyalties2 = new beanstalkRoyalties(); Initiative beanstalkRoyalties3 = new beanstalkRoyalties(); Initiative enigma = new enigma(); Initiative enigma2 = new enigma(); Initiative enigma3 = new enigma(); Initiative hadriansWall = new hadriansWall(); Initiative hadriansWall2 = new hadriansWall(); Initiative hedgeFund = new hedgeFund(); Initiative hedgeFund2 = new hedgeFund(); Initiative hedgeFund3 = new hedgeFund(); Initiative hostileTakeover = new hostileTakeover(); Initiative hostileTakeover2 = new hostileTakeover(); Initiative hostileTakeover3 = new hostileTakeover(); Initiative hunter = new hunter(); Initiative hunter2 = new hunter(); Initiative iceWall = new iceWall(); Initiative iceWall2 = new iceWall(); Initiative iceWall3 = new iceWall(); Initiative melangeMining = new melangeMining(); Initiative melangeMining2 = new melangeMining(); Initiative padCampaign = new padCampaign(); Initiative padCampaign2 = new padCampaign(); Initiative padCampaign3 = new padCampaign(); Initiative postedBounty = new postedBounty(); Initiative postedBounty2 = new postedBounty(); Initiative priorityRequisition = new priorityRequisition(); Initiative priorityRequisition2 = new priorityRequisition(); Initiative priorityRequisition3 = new priorityRequisition(); Initiative privateSecurity = new privateSecurity(); Initiative privateSecurity2 = new privateSecurity(); Initiative privateSecurity3 = new privateSecurity(); Initiative researchStation = new researchStation(); Initiative researchStation2 = new researchStation(); Initiative scorchedEarth = new scorchedEarth(); Initiative scorchedEarth2 = new scorchedEarth(); Initiative securitySubcontract = new securitySubcontract(); Initiative shadow = new shadow(); Initiative shadow2 = new shadow(); Initiative shadow3 = new shadow(); Initiative shipment = new shipment(); Initiative shipment2 = new shipment(); Initiative wallofStatic = new wallOfStatic(); Initiative wallofStatic2 = new wallOfStatic(); Initiative wallofStatic3 = new wallOfStatic(); List <Ability> cards = new List <Ability>(); List <Ability> shuffle = new List <Ability>(); int rando = 0; cards.Add(aggressiveNegotiation); cards.Add(aggressiveNegotiation2); cards.Add(archer); cards.Add(archer2); cards.Add(beanstalkRoyalties); cards.Add(beanstalkRoyalties2); cards.Add(beanstalkRoyalties3); cards.Add(enigma); cards.Add(enigma2); cards.Add(enigma3); cards.Add(hadriansWall); cards.Add(hadriansWall2); cards.Add(hedgeFund); cards.Add(hedgeFund2); cards.Add(hedgeFund3); cards.Add(hostileTakeover); cards.Add(hostileTakeover2); cards.Add(hostileTakeover3); cards.Add(hunter); cards.Add(hunter2); cards.Add(iceWall); cards.Add(iceWall2); cards.Add(iceWall3); cards.Add(melangeMining); cards.Add(melangeMining2); cards.Add(padCampaign); cards.Add(padCampaign2); cards.Add(padCampaign3); cards.Add(postedBounty); cards.Add(postedBounty2); cards.Add(priorityRequisition); cards.Add(priorityRequisition2); cards.Add(priorityRequisition3); cards.Add(privateSecurity); cards.Add(privateSecurity2); cards.Add(privateSecurity3); cards.Add(researchStation); cards.Add(researchStation2); cards.Add(scorchedEarth); cards.Add(scorchedEarth2); cards.Add(securitySubcontract); cards.Add(shadow); cards.Add(shadow2); cards.Add(shadow3); cards.Add(shipment); cards.Add(shipment2); cards.Add(wallofStatic); cards.Add(wallofStatic2); cards.Add(wallofStatic3); int count = cards.Count; for (int i = 0; i < count; i++) { rando = Random.Range(0, cards.Count - 1); shuffle.Add(cards[rando]); cards.RemoveAt(rando); } return(shuffle); }
public List<Ability> buildDeck() { Initiative aggressiveNegotiation = new aggressiveNegotiation(); Initiative aggressiveNegotiation2 = new aggressiveNegotiation(); Initiative archer = new archer(); Initiative archer2 = new archer(); Initiative beanstalkRoyalties = new beanstalkRoyalties(); Initiative beanstalkRoyalties2 = new beanstalkRoyalties(); Initiative beanstalkRoyalties3 = new beanstalkRoyalties(); Initiative enigma = new enigma(); Initiative enigma2 = new enigma(); Initiative enigma3 = new enigma(); Initiative hadriansWall = new hadriansWall(); Initiative hadriansWall2 = new hadriansWall(); Initiative hedgeFund = new hedgeFund(); Initiative hedgeFund2 = new hedgeFund(); Initiative hedgeFund3 = new hedgeFund(); Initiative hostileTakeover = new hostileTakeover(); Initiative hostileTakeover2 = new hostileTakeover(); Initiative hostileTakeover3 = new hostileTakeover(); Initiative hunter = new hunter(); Initiative hunter2 = new hunter(); Initiative iceWall = new iceWall(); Initiative iceWall2 = new iceWall(); Initiative iceWall3 = new iceWall(); Initiative melangeMining = new melangeMining(); Initiative melangeMining2 = new melangeMining(); Initiative padCampaign = new padCampaign(); Initiative padCampaign2 = new padCampaign(); Initiative padCampaign3 = new padCampaign(); Initiative postedBounty = new postedBounty(); Initiative postedBounty2 = new postedBounty(); Initiative priorityRequisition = new priorityRequisition(); Initiative priorityRequisition2 = new priorityRequisition(); Initiative priorityRequisition3 = new priorityRequisition(); Initiative privateSecurity = new privateSecurity(); Initiative privateSecurity2 = new privateSecurity(); Initiative privateSecurity3 = new privateSecurity(); Initiative researchStation = new researchStation(); Initiative researchStation2 = new researchStation(); Initiative scorchedEarth = new scorchedEarth(); Initiative scorchedEarth2 = new scorchedEarth(); Initiative securitySubcontract = new securitySubcontract(); Initiative shadow = new shadow(); Initiative shadow2 = new shadow(); Initiative shadow3 = new shadow(); Initiative shipment = new shipment(); Initiative shipment2 = new shipment(); Initiative wallofStatic = new wallOfStatic(); Initiative wallofStatic2 = new wallOfStatic(); Initiative wallofStatic3 = new wallOfStatic(); List<Ability> cards = new List<Ability>(); List<Ability> shuffle = new List<Ability>(); int rando = 0; cards.Add(aggressiveNegotiation); cards.Add(aggressiveNegotiation2); cards.Add(archer); cards.Add(archer2); cards.Add(beanstalkRoyalties); cards.Add(beanstalkRoyalties2); cards.Add(beanstalkRoyalties3); cards.Add (enigma); cards.Add (enigma2); cards.Add (enigma3); cards.Add(hadriansWall); cards.Add(hadriansWall2); cards.Add(hedgeFund); cards.Add(hedgeFund2); cards.Add(hedgeFund3); cards.Add(hostileTakeover); cards.Add(hostileTakeover2); cards.Add(hostileTakeover3); cards.Add(hunter); cards.Add(hunter2); cards.Add(iceWall); cards.Add(iceWall2); cards.Add(iceWall3); cards.Add(melangeMining); cards.Add(melangeMining2); cards.Add (padCampaign); cards.Add (padCampaign2); cards.Add (padCampaign3); cards.Add(postedBounty); cards.Add(postedBounty2); cards.Add(priorityRequisition); cards.Add(priorityRequisition2); cards.Add(priorityRequisition3); cards.Add(privateSecurity); cards.Add(privateSecurity2); cards.Add(privateSecurity3); cards.Add(researchStation); cards.Add(researchStation2); cards.Add(scorchedEarth); cards.Add(scorchedEarth2); cards.Add(securitySubcontract); cards.Add(shadow); cards.Add(shadow2); cards.Add(shadow3); cards.Add(shipment); cards.Add(shipment2); cards.Add(wallofStatic); cards.Add(wallofStatic2); cards.Add(wallofStatic3); int count = cards.Count; for (int i = 0; i < count; i++) { rando = Random.Range (0, cards.Count - 1); shuffle.Add (cards[rando]); cards.RemoveAt (rando); } return shuffle; }