private void abmProducto_Load(object sender, EventArgs e) { estado = ABM.Nada; categorias = Devuelve.Categorias(); proveedores = Devuelve.Proveedores(); auxProduct = new Producto(); foreach (Proveedor pr in proveedores) { cbProveedor.Items.Add(pr.Nombre); } cbCatModifProd.Items.Add("Todo"); foreach (Categoria c in categorias) { cbCatModifProd.Items.Add(c.Descripcion); cbCategoria.Items.Add(c.Descripcion); } cbTalleModificPr.Items.Add("Todo"); foreach (String p in Enum.GetNames(typeof(eTalle))) { cbTalleModificPr.Items.Add(p); cbTalle.Items.Add(p); } cbTalleModificPr.SelectedIndex = 0; cbCatModifProd.SelectedIndex = 0; }
public static void Main(string[] args) { var terrainFilePaths = new string[] { "./layers/grid.csv", "./layers/gradient.csv", "./layers/landscape.csv" }; // var terrainFilePaths = new string[] { "./layers/landscape.csv", "./layers/landscape.csv", "./layers/grid.csv" }; var fitnessVals = new List <List <float> >(); foreach (string terrainFilePath in terrainFilePaths) { FileUtils.ChangeTerrainFilePath(terrainFilePath); List <List <float> > trainGenomes = null; if (terrainFilePath != terrainFilePaths[0]) { trainGenomes = FileUtils.ReadGenomesFromFile(".\\output\\genomes.csv"); } HillClimberFCM fcm = new HillClimberFCM(population: 96, numberOfValues: 486, STEPS, OUTPUT_FILENAME, FITNESS_COLUMNNAME, trainGenomes); ABM abm = new ABM(modelDescription: GetModelDescription()); abm.Train(fcm, 10, 200, true, args); // var genomes = FileUtils.ReadGenomesFromFile(".\\output\\good.csv"); fcm = new HillClimberFCM(population: 96, numberOfValues: 486, STEPS, OUTPUT_FILENAME, FITNESS_COLUMNNAME, trainGenomes); fitnessVals.Add(abm.Test(fcm, 1, args)); } }
public dlgABMBase(ABM CRUDType, System.Data.DataRow row) { InitializeComponent(); _CRUDType = CRUDType; _row = row; }
private void aBMToolStripMenuItem_Click(object sender, EventArgs e) { ABM frmABM = new ABM(); frmABM.MdiParent = this; frmABM.Show(); }
private void ctrlABM1_Alta(object sender) { auxCliente = new Cliente(); estado = ABM.Alta; pnlBuscaProducto.Enabled = false; pnlEditaProducto.Enabled = true; limpia(); }
protected void Button1_Click(object sender, EventArgs e) { string SQL = "INSERT INTO articulo (Art_Descripcion, Art_CodBarra,Art_Stock, Art_NumPartOrg, Art_Familia, Art_PrecioDolar) VALUES ('Prueba de turbo','035478',2,'66666','GRUPO', 25.03)"; ABM SQL2 = new ABM(); label_estado.Text = SQL2.UpdateArticuloStock(2, 8); }
public static void Main(string[] args) { var testGenmoes = FileUtils.ReadGenomesFromFile(".\\output\\genomes.csv"); HillClimberFCM fcm = new HillClimberFCM(population: 96, numberOfValues: 486, STEPS, OUTPUT_FILENAME, FITNESS_COLUMNNAME, testGenmoes); ModelDescription description = new ModelDescription(); description.AddLayer <Terrain>(); description.AddAgent <Animal, Terrain>(); ABM abm = new ABM(modelDescription: description); abm.Train(fcm, 30, 45, true, args); testGenmoes = FileUtils.ReadGenomesFromFile(".\\output\\genomes.csv"); fcm = new HillClimberFCM(population: 96, numberOfValues: 486, STEPS, OUTPUT_FILENAME, FITNESS_COLUMNNAME, testGenmoes); abm.Test(fcm, 2, args); }
private void ctrlABM1_Cancelar(object sender) { switch (estado) { case ABM.Alta: { pnlEditaProducto.Enabled = false; limpia(); } break; case ABM.Modificacion: { pnlBuscaProducto.Enabled = false; pnlEditaProducto.Enabled = false; limpia(); } break; case ABM.Baja: { pnlBuscaProducto.Enabled = false; } break; default: break; } estado = ABM.Nada; }
public static extern IntPtr SHAppBarMessage(ABM dwMessage, [In] ref APPBARDATA pData);
private static extern IntPtr SHAppBarMessage( ABM dwMessage, ref APPBARDATA pData);
public static extern uint SHAppBarMessage(ABM dwMessage, ref APPBARDATA pData);
public static IntPtr SHAppBarMessage(ABM message, ref APPBARDATA data) { return NativeMethods.SHAppBarMessage((uint)message, ref data); }
private void abmProveedor_Load(object sender, EventArgs e) { estado = ABM.Nada; auxProvee = new Proveedor(); refresca(); }
private void ctrlABM1_Modificacion(object sender) { estado = ABM.Modificacion; auxProvee = new Proveedor(); pnlBuscaProducto.Enabled = true; }
private void ctrlABM1_Aceptar(object sender, ref bool cancela) { switch(estado) { case ABM.Alta: { if (validaForm()) { if (controlaRep(tbNombreProducto.Text, cbTalle.Text)) { creaProducto(); Agrega.Producto(auxProduct); MessageBox.Show("Producto creado satisfactoriamente", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information); cancela = true; pnlEditaProducto.Enabled = false; limpia(); refresca(); } } } break; case ABM.Modificacion: { if (validaForm()) { creaProducto(); Actualiza.Producto(auxProduct); MessageBox.Show("Producto modificado satisfactoriamente", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information); cancela = true; pnlBuscaProducto.Enabled = false; pnlEditaProducto.Enabled = false; refresca(); } } break; case ABM.Baja: { if (dgvProductosEdit.RowCount < 1 || dgvProductosEdit.CurrentRow == null) MessageBox.Show("Debe selecionar un producto", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); else { Elimina.Producto(Devuelve.Producto((int)dgvProductosEdit.CurrentRow.Cells["IdProducto"].Value)); refresca(); cancela = true; pnlBuscaProducto.Enabled = false; MessageBox.Show("Producto eliminardo satisfactoriamente", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information); } } break; default: break; } estado = ABM.Nada; }
private void ctrlABM1_Aceptar(object sender, ref bool cancela) { switch (estado) { case ABM.Alta: { if (validaForm()) { if (controlaRep(tbNombre.Text, tbApellido.Text, tbEmail.Text, tbDomicilio.Text)) { creaCliente(); if (auxCliente.Telefonos.Count > 0) Agrega.Telefono(auxCliente.Telefonos[0]); else auxCliente.Telefonos.Clear(); Agrega.Cliente(auxCliente); MessageBox.Show("Cliente creado satisfactoriamente", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information); cancela = true; pnlEditaProducto.Enabled = false; limpia(); refresca(); } } } break; case ABM.Modificacion: { if (validaForm()) { creaCliente(); if (auxCliente.Telefonos.Count > 0) Agrega.Telefono(auxCliente.Telefonos[0]); Actualiza.Cliente(auxCliente); MessageBox.Show("Cliente modificado satisfactoriamente", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information); cancela = true; pnlBuscaProducto.Enabled = false; pnlEditaProducto.Enabled = false; limpia(); refresca(); } } break; case ABM.Baja: { if (dgvClientesEdit.RowCount < 1 || dgvClientesEdit.CurrentRow == null) MessageBox.Show("Debe selecionar un cliente", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); else { Elimina.Cliente(Devuelve.Cliente((int)dgvClientesEdit.CurrentRow.Cells["Id"].Value)); refresca(); cancela = true; pnlBuscaProducto.Enabled = false; MessageBox.Show("Cliente eliminado satisfactoriamente", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information); } } break; default: break; } estado = ABM.Nada; }
public static IntPtr SHAppBarMessage(ABM message, ref APPBARDATA data) { return(NativeMethods.SHAppBarMessage((uint)message, ref data)); }
public bool validaForm() { bool estado = false; if (tbNombre.Text != String.Empty && tbApellido.Text != String.Empty) { if (tbEmail.Text != String.Empty && tbDomicilio.Text != String.Empty) { estado = true; } } if (!estado) MessageBox.Show("Faltan campos por llenar", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Error); return estado; }
public static extern UInt32 SHAppBarMessage(ABM dwMessage, ref AppBarData pData);
private void ctrlABM1_Baja(object sender) { estado = ABM.Baja; pnlBuscaProducto.Enabled = true; }
private static void Postfix(ref Player __instance, ref Vector3 ___m_moveDir, ref Vector3 ___m_lookDir, ref GameObject ___m_placementGhost, Transform ___m_eye) { if ((Configuration.Current.Player.IsEnabled && Configuration.Current.Player.queueWeaponChanges) && (ZInput.GetButtonDown("Hide") || ZInput.GetButtonDown("JoyHide"))) { if (__instance.InAttack() && (__instance.GetRightItem() != null || __instance.GetLeftItem() != null)) { // The game ignores this keypress, so queue it and take care of it when able (Player_FixedUpdate_Patch). EquipPatchState.shouldHideItemsAfterAttack = true; } } if (!__instance.m_nview.IsValid() || !__instance.m_nview.IsOwner()) { return; } if (Configuration.Current.AdvancedEditingMode.IsEnabled) { AEM.PlayerInstance = __instance; AEM.run(); } if (Configuration.Current.AdvancedBuildingMode.IsEnabled) { ABM.Run(ref __instance); } if (Configuration.Current.Hotkeys.IsEnabled) { ApplyDodgeHotkeys(ref __instance, ref ___m_moveDir, ref ___m_lookDir); } if (Configuration.Current.GameClock.IsEnabled) { String hours_str = ""; String minutes_str = ""; String amPM_str = ""; Hud hud = Hud.instance; Text timeText; if (timeObj == null) { MessageHud msgHud = MessageHud.instance; timeObj = new GameObject(); timeObj.transform.SetParent(hud.m_statusEffectListRoot.transform.parent); timeObj.AddComponent <RectTransform>(); timeText = timeObj.AddComponent <Text>(); float rRatio = Mathf.Clamp01((float)Configuration.Current.GameClock.textRedChannel / 255f); float gRatio = Mathf.Clamp01((float)Configuration.Current.GameClock.textGreenChannel / 255f); float bRatio = Mathf.Clamp01((float)Configuration.Current.GameClock.textBlueChannel / 255f); float aRatio = Mathf.Clamp01((float)Configuration.Current.GameClock.textTransparencyChannel / 255f); timeText.color = new Color(rRatio, gRatio, bRatio, aRatio); timeText.font = msgHud.m_messageCenterText.font; timeText.fontSize = Configuration.Current.GameClock.textFontSize; timeText.enabled = true; timeText.alignment = TextAnchor.MiddleCenter; timeText.horizontalOverflow = HorizontalWrapMode.Overflow; } else { timeText = timeObj.GetComponent <Text>(); } EnvMan env = EnvMan.instance; if (savedEnvSeconds != env.m_totalSeconds) { float minuteFrac = Mathf.Lerp(0, 24, env.GetDayFraction()); float hr24 = Mathf.Floor(minuteFrac); minuteFrac = minuteFrac - hr24; float minutes = Mathf.Lerp(0, 60, minuteFrac); int hours_int = Mathf.FloorToInt(hr24); int minutes_int = Mathf.FloorToInt(minutes); if (Configuration.Current.GameClock.useAMPM) { amPM_str = (hours_int < 12) ? " AM" : " PM"; if (hours_int > 12) { hours_int -= 12; } } if (hours_int < 10) { hours_str = "0" + hours_int; } if (minutes_int < 10) { minutes_str = "0" + minutes_int; } if (hours_int >= 10) { hours_str = hours_int.ToString(); } if (minutes_int >= 10) { minutes_str = minutes_int.ToString(); } timeText.text = hours_str + ":" + minutes_str + amPM_str; var staminaBarRec = hud.m_staminaBar2Root.transform as RectTransform; var statusEffictBarRec = hud.m_statusEffectListRoot.transform as RectTransform; timeObj.GetComponent <RectTransform>().position = new Vector2(staminaBarRec.position.x, statusEffictBarRec.position.y); timeObj.SetActive(true); savedEnvSeconds = env.m_totalSeconds; } } }
private void ctrlABM1_Modificacion(object sender) { estado = ABM.Modificacion; auxCliente = new Cliente(); pnlBuscaProducto.Enabled = true; }
internal static IntPtr Shell32SHAppBarMessage(ABM dwMessage, [In] ref APPBARDATA pData) { return(SHAppBarMessage(dwMessage, ref pData)); }
private void abmCliente_Load(object sender, EventArgs e) { estado = ABM.Nada; auxCliente = new Cliente(); refresca(); }
public bool validaForm() { bool estado = false; if (tbNombreProducto.Text != String.Empty && ntbPrecioCosto.Text != String.Empty) { if (cbProveedor.SelectedItem != null) { if (cbCategoria.SelectedItem != null && cbTalle.SelectedItem != null) { estado = true; } } } if(!estado) MessageBox.Show("Faltan campos por llenar", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Error); return estado; }