private void Awake() { if (instance == null) { instance = this; } }
public void Start() { text = QuantityView.transform.GetChild(0).GetComponent <Text>(); text.text = "1"; buyController = this; SetNonActive(); }
void Start() { // panel = GameObject.Find("EquipmentBuyPanel"); buyControllerScript = panel.GetComponent <BuyController>(); equipmentImage = _equipmentImage.GetComponent <Image>(); equipmentImage.sprite = lanceStatusData.GetLanceImage(); price.GetComponent <Text>().text = lanceStatusData.GetEquipmentPrice().ToString() + "円"; }
private void btn_buy_Click(object sender, RibbonControlEventArgs e) { try { BuyController controller = new BuyController(this); controller.Do(); } catch (Exception ex) { LogHelper.WriteLog(typeof(frmPay), ex); } }
public MainWindow() { InitializeComponent(); this.productController = new ProductController(this); this.inventoryController = new InventoryController(this); this.salesController = new SalesController(this); this.buyController = new BuyController(this); this.WindowStartupLocation = WindowStartupLocation.CenterScreen; this.Initializer(); }
public void SaveBuy(BuyController buyController) { string key = buyController.buyName; if (buyController.isBought == true) { PlayerPrefs.SetInt(key + "_isBought", 1); } else { PlayerPrefs.SetInt(key + "_isBought", 0); } }
public void LoadBuy(BuyController buyController) { string key = buyController.buyName; if (PlayerPrefs.GetInt(key + "_isBought") == 1) { buyController.isBought = true; } else { buyController.isBought = false; } }
private void ButtonPress() { //press e to buy food if (Input.GetKeyDown(KeyCode.E)) { if (Physics.Raycast(transform.position, transform.forward, out hit, pickupDistance)) { GameObject hitInfo = hit.collider.gameObject; if (hitInfo.tag == "buy button") { BuyController bController = hitInfo.GetComponent <BuyController>(); bController.pressed = true; } } } }
public BuyControllerTest() { _service = new BuyServiceFake(); _controller = new BuyController(_service); }
public BuySellControllersTest() { _buyController = new BuyController(_shareRepositoryMock.Object, _tradeRepositoryMock.Object, _portRepositoryMock.Object); _sellController = new SellController(_shareRepositoryMock.Object, _tradeRepositoryMock.Object, _portRepositoryMock.Object); }
public static void ActivatePanels(this UserType u, TabControl tabs, SqlCommand connection, User user) { if (u == UserType.Administrador) { //ABM rol TabPage abmRol = new TabPage("ABM rol"); TabPage abmClients = new TabPage("ABM clientes"); TabPage abmProviders = new TabPage("ABM proveedores"); TabPage facturar = new TabPage("Facturacion Proveedor"); TabPage listado = new TabPage("Listado estadistico"); DataLister d = new DataLister(); DataLister clientList = new DataLister(); DataLister providersList = new DataLister(); FacturacionView facturacionView = new FacturacionView(user); Listado listadoView = new Listado(); d.TopLevel = false; d.Visible = true; d.FormBorderStyle = FormBorderStyle.None; d.Dock = DockStyle.Fill; clientList.TopLevel = false; clientList.Visible = true; clientList.FormBorderStyle = FormBorderStyle.None; clientList.Dock = DockStyle.Fill; providersList.TopLevel = false; providersList.Visible = true; providersList.FormBorderStyle = FormBorderStyle.None; providersList.Dock = DockStyle.Fill; facturacionView.TopLevel = false; facturacionView.Visible = true; facturacionView.FormBorderStyle = FormBorderStyle.None; facturacionView.Dock = DockStyle.Fill; listadoView.Visible = true; listadoView.TopLevel = false; listadoView.FormBorderStyle = FormBorderStyle.None; listadoView.Dock = DockStyle.Fill; AbmRolController filters = new AbmRolController(new RolRepo(), d); AbmClientsController clients = new AbmClientsController(new ClientRepo(), clientList); AbmProvidersContoller providers = new AbmProvidersContoller(new ProviderRepo(), providersList); abmRol.Controls.Add(d); abmClients.Controls.Add(clientList); abmProviders.Controls.Add(providersList); facturar.Controls.Add(facturacionView); listado.Controls.Add(listadoView); tabs.TabPages.Add(abmRol); tabs.TabPages.Add(abmClients); tabs.TabPages.Add(abmProviders); tabs.TabPages.Add(facturar); tabs.TabPages.Add(listado); } if (u == UserType.Cliente) { TabPage credito = new TabPage("Carga credito"); TabPage oferta = new TabPage("Comprar oferta"); CreditCharge d = new CreditCharge(user); DataLister ofertasListado = new DataLister(); d.TopLevel = false; d.Visible = true; d.FormBorderStyle = FormBorderStyle.None; d.Dock = DockStyle.Fill; ofertasListado.TopLevel = false; ofertasListado.Visible = true; ofertasListado.FormBorderStyle = FormBorderStyle.None; ofertasListado.Dock = DockStyle.Fill; credito.Controls.Add(d); void inner(object sender, EventArgs e) { ofertasListado.DataLister_GotFocus(null, null); d.CreditCharge_GotFocus(null, null); } tabs.Selected += inner; oferta.Controls.Add(ofertasListado); BuyController buy = new BuyController(new OfferRepo(), ofertasListado, user.GetClient()); tabs.TabPages.Add(credito); tabs.TabPages.Add(oferta); } if (u == UserType.Proveedor) { TabPage cargar = new TabPage("Carga oferta"); TabPage bajar = new TabPage("Entrega/Consumo cupon"); DataRetriver cargador = new DataRetriver(new OfferRepo(), null, DataRetriverCancelActions.CLEAN); BajaCupon baja = new BajaCupon(user); cargador.TopLevel = false; cargador.Visible = true; cargador.FormBorderStyle = FormBorderStyle.None; cargador.Dock = DockStyle.Fill; baja.TopLevel = false; baja.Visible = true; baja.FormBorderStyle = FormBorderStyle.None; baja.Dock = DockStyle.Fill; cargar.Controls.Add(cargador); bajar.Controls.Add(baja); tabs.TabPages.Add(cargar); tabs.TabPages.Add(bajar); } }