private void txtClientePortatil_Leave(object sender, EventArgs e) { if (StringType.StrCmp(((TextBox)this.txtClientePortatil).Text, "", false) == 0) { return; } this.BuscarClientePortatil(IntegerType.FromString(((TextBox)this.txtClientePortatil).Text)); }
private static void InserirNoInicioDaLista() { Console.Clear(); Console.WriteLine("Digite o valor: "); var valor = Console.ReadLine(); valores.Insert(0, IntegerType.FromString(valor)); Console.WriteLine("Valor Inserido"); Console.WriteLine("Pressione enter pra voltar ao menu"); Console.ReadLine(); }
static void EntradaDeDados() { string valor = ""; while (!valor.ToUpper().Contains('S')) { Console.WriteLine("Digite o valor e pressione enter ou S para ir ao menu:"); valor = Console.ReadLine(); if (!valor.ToUpper().Contains('S')) { valores.Add(IntegerType.FromString(valor)); } } }
private static void convertFile(string[] args) { int i = 1; Boolean stop = false; if (args.Length < 5) { Console.WriteLine("Arguments illegaux pour --convert, pour convertir utiliser '-c [-v <verboselevel>] <sourceformat> <sourcepath> <destformat> <destpath>'"); stop = true; } else if (args[i].Equals("-v") || args[i].Equals("--verbose")) { if (args.Length < 7) { Console.WriteLine("Arguments illegaux pour --convert, pour convertir utiliser '-c [-v <verboselevel>] <sourceformat> <sourcepath> <destformat> <destpath>'"); stop = true; } else { switch (args[i + 1]) { case "1": verbose = IntegerType.FromString(args[i + 1]); i += 2; break; case "2": verbose = IntegerType.FromString(args[i + 1]); i += 2; break; case "3": verbose = IntegerType.FromString(args[i + 1]); i += 2; break; default: Console.WriteLine("Niveau de verbose invalide pour --verbose, les niveaux disponibles sont 1, 2 ou 3"); stop = true; break; } } } if (!stop) { Conversion.convertFile(args[i], args[i + 1], args[i + 2], args[i + 3], verbose); } }
private static void RetorneApenasNumeroInformado() { Console.Clear(); var valorInformado = Console.ReadLine(); var valorRetornado = valores.Find(valor => valor == IntegerType.FromString(valorInformado)); if (valorRetornado != 0) { Console.WriteLine($"Valor encontrado: {valorRetornado}"); } else { Console.WriteLine("Valor não encontrado"); } Console.WriteLine("Pressione enter pra voltar ao menu"); Console.ReadLine(); }
public static void FormatArgs(List <string> args) { for (var i = 0; i < args.Count; i++) { if (args[i].StartsWith("$")) { try { var index = IntegerType.FromString(args[i].Substring(1)); args[i] = Console.PreviousList[index - 1]; // Starts at 1 rather than 0 } catch (Exception e) { } } } }
private void LoadConfig(string cwd) { _config.Load(cwd); _processSleepSeconds = IntegerType.FromString(_config.SelectSingleNode(_configBase + "processSleepSeconds").InnerText); _ipAddress = _config.SelectSingleNode(_configBase + "ipAddress").InnerText; _port = IntegerType.FromString(_config.SelectSingleNode(_configBase + "port").InnerText); _username = _config.SelectSingleNode(_configBase + "username").InnerText; _password = _config.SelectSingleNode(_configBase + "password").InnerText; _dbConnectionString = _config.SelectSingleNode(_configBase + "dbConnectionString").InnerText; _outputLocationPath = _config.SelectSingleNode(_configBase + "outputLocationPath").InnerText; _deleteVideos = _config.SelectSingleNode(_configBase + "deleteVideos").InnerText == "true"; _audioSilenceRemove = _config.SelectSingleNode(_configBase + "audioSilenceRemove").InnerText == "true"; _audiodBThreshold = _config.SelectSingleNode(_configBase + "audiodBThreshold").InnerText; _audioExportPath = _config.SelectSingleNode(_configBase + "audioExportPath").InnerText; _cameraName = _config.SelectSingleNode(_configBase + "cameraName").InnerText; }
private Studies GetStudies(string name, SqlCommand command) { command.CommandText = "select * from Studies WHERE Name like @name"; command.Parameters.AddWithValue("name", name); var dataRow = command.ExecuteReader(); if (dataRow.Read()) { Studies studies = new Studies(); studies.IdStudy = IntegerType.FromString(dataRow["IdStudy"].ToString()); studies.Name = dataRow["Name"].ToString(); dataRow.Close(); return(studies); } dataRow.Close(); throw new NotFoundException(); }
private void cmbAceptar_Click(object sender, EventArgs e) { if (StringType.StrCmp(this.editCantMeses.Text, Strings.Space(0), false) == 0) { Interaction.MsgBox("Debe indicar cantidad de meses", 0x10, "Operador"); this.editCantMeses.Focus(); } else { this.editCantMeses.Enabled = false; this.cmbAceptar.Enabled = false; this.cmbSalir.Enabled = false; Variables.gCantMeses = IntegerType.FromString(this.editCantMeses.Text); frmConsInv1_1 inv_ = new frmConsInv1_1(); this.Hide(); inv_.Show(); } }
private void BuscarCliente() { this.Cursor = Cursors.WaitCursor; Consulta.cCliente cCliente = new Consulta.cCliente(0, IntegerType.FromString(((TextBox)this.txtCliente).Text)); cCliente.CargaDatos(); if (StringType.StrCmp(((Consulta.ConsultaBase3)cCliente).Cliente, "", false) != 0) { this.lblCliente.Text = ((Consulta.ConsultaBase3)cCliente).Cliente; this.lblRuta.Text = ((Consulta.ConsultaBase3)cCliente).Ruta; } else { this.LimpiarCliente(); int num = (int)MessageBox.Show(new Mensaje(3).Mensaje, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Hand); this.ActiveControl = (Control)this.txtCliente; ((TextBoxBase)this.txtCliente).Clear(); } this.Cursor = Cursors.Default; }
private Enrollment GetOrAddEnrollmentToTransaction(SqlCommand command, Studies studies) { command.Parameters.Clear(); command.CommandText = "select IdEnrollment, Semester, IdStudy, StartDate from Enrollment where Semester=1 AND IdStudy = @IdStudy"; command.Parameters.Add("@IdStudy", SqlDbType.Int); command.Parameters["@IdStudy"].Value = studies.IdStudy; using (var dataRow = command.ExecuteReader()) { if (dataRow.Read()) { var enrollment = new Enrollment(); enrollment.IdEnrollment = IntegerType.FromString(dataRow["IdEnrollment"].ToString()); enrollment.Semester = IntegerType.FromString(dataRow["Semester"].ToString()); enrollment.IdStudy = IntegerType.FromString(dataRow["IdStudy"].ToString()); enrollment.StartDate = Convert.ToDateTime(dataRow["StartDate"].ToString()); return(enrollment); } } command.CommandText = "insert into Enrollment (IdEnrollment, Semester, IdStudy, StartDate) VALUES ((SELECT MAX(IdEnrollment) FROM Enrollment) + 1, 1, @idStudy, CURRENT_TIMESTAMP); "; command.ExecuteNonQuery(); return(GetOrAddEnrollmentToTransaction(command, studies)); }
private void ToolBarButton12_Click(object sender, EventArgs e) { ToolStripButton button = sender as ToolStripButton; if (button == null) { return; } object tag = button.Tag; if (ObjectType.ObjTst(tag, (object)"Test", false) == 0) { if (StringType.StrCmp(this.Map_TileID.Text, string.Empty, false) == 0) { return; } this.ImageTest = !this.ImageTest; this.PictureBox1.Refresh(); this.LandImage.Image = Art.GetLand(IntegerType.FromString(this.Map_TileID.Text)) != null ? (Image)Art.GetLand(IntegerType.FromString(this.Map_TileID.Text)) : (Image)null; } }
private void Btn_Static_Click(object sender, EventArgs e) { try { int index = IntegerType.FromString(this.Static_TileID.Text); this.StaticItems.Value = index; if (Art.GetStatic(index) == null) { this.StaticImage.Image = (Image)null; } else { this.StaticImage.Image = (Image)Art.GetStatic(index); } } catch (Exception ex) { ProjectData.SetProjectError(ex); int num = (int)Interaction.MsgBox((object)this.ErrorMessage(this.Static_TileID.Text, "1", "16535"), MsgBoxStyle.OkOnly, (object)null); ProjectData.ClearProjectError(); } }
public Studies GetStudies(string name) { String db = "Data Source=db-mssql;Initial Catalog=s16481;Integrated Security=True"; using (SqlConnection connection = new SqlConnection(db)) using (SqlCommand command = new SqlCommand()) { command.Connection = connection; command.CommandText = "select * from Studies WHERE Name like @name"; command.Parameters.AddWithValue("name", name); connection.Open(); var dataRow = command.ExecuteReader(); if (dataRow.Read()) { Studies studies = new Studies(); studies.IdStudy = IntegerType.FromString(dataRow["IdStudy"].ToString()); studies.Name = dataRow["Name"].ToString(); return(studies); } return(null); } }
private void Btn_Land_Hex_Click(object sender, EventArgs e) { try { int index = IntegerType.FromString(this.Map_TileID_Hex.Text); this.LandItems.Value = index; this.Map_TileID.Text = index.ToString(); if (Art.GetLand(index) == null) { this.LandImage.Image = (Image)null; } else { this.LandImage.Image = (Image)Art.GetLand(index); } } catch (Exception ex) { ProjectData.SetProjectError(ex); int num = (int)Interaction.MsgBox((object)this.ErrorMessage(this.Map_TileID_Hex.Text, "&H0000", "&H3FFF"), MsgBoxStyle.OkOnly, (object)null); ProjectData.ClearProjectError(); } }
static void Main(string[] args) { int[] numeros = new int[4]; for (int i = 0; i < 4; i++) { Console.WriteLine("Digitar o número {0}", i + 1); numeros[i] = IntegerType.FromString(Console.ReadLine()); } var soma = 0; for (int i = 0; i < numeros.Length; i++) { var resto = numeros[i] % 2; if (resto == 0) { soma += numeros[i]; } } Console.WriteLine("A soma dos números pares é: " + soma); Console.ReadLine(); }
public void FromString(string value, int expected) { Assert.Equal(expected, IntegerType.FromString(value)); }
public string CantidadEnLetras() { int num4 = 0; int num5; int num6; int num7; int num3 = 0; string str = ""; string str2 = Strings.Format(this._Cantidad, "f3"); int num9 = str2.Length - 4; int num = num9 % 3; if (((num9 / 3) == 0) | (num != 0)) { if (num == 1) { num4 = IntegerType.FromString(StringType.FromChar(str2[0])); str = this.Leer(num4) + " "; num3 = 1; } if (num == 2) { num4 = IntegerType.FromString(StringType.FromChar(str2[0])); num5 = IntegerType.FromString(StringType.FromChar(str2[1])); num6 = (num4 * 10) + num5; if (StringType.StrCmp(this.Leer(num6), "", false) == 0) { num7 = num4 * 10; str = this.Leer(num7) + " y " + this.Leer(num5) + " "; } else if (StringType.StrCmp(this.Leer(num6), "cero", false) != 0) { str = this.Leer(num6) + " "; } num3 = 2; } } if (((num9 / 3) == 1) & (num3 != 0)) { str = str + "mil "; } if ((((num9 / 3) == 2) & (num3 != 0)) & (num4 == 1)) { str = str + "millon "; } else if (((num9 / 3) == 2) & (num3 != 0)) { str = str + "millones "; } int num10 = num9 / 3; for (int i = 1; i <= num10; i++) { string cadena = StringType.FromChar(str2[num3]) + StringType.FromChar(str2[num3 + 1]) + StringType.FromChar(str2[num3 + 2]); num4 = this.Convertir(cadena); if (StringType.StrCmp(this.Leer(num4), "", false) == 0) { num5 = IntegerType.FromString(StringType.FromChar(str2[num3])) * 100; if ((StringType.StrCmp(this.Leer(num5), "cero", false) != 0) & (num5 == 100)) { str = str + this.Leer(num5) + "to "; } else if (StringType.StrCmp(this.Leer(num5), "cero", false) != 0) { str = str + this.Leer(num5) + " "; } num6 = IntegerType.FromString(StringType.FromChar(str2[num3 + 1])) * 10; num7 = IntegerType.FromString(StringType.FromChar(str2[num3 + 2])); int numero = num6 + num7; if (StringType.StrCmp(this.Leer(numero), "", false) == 0) { str = str + this.Leer(num6) + " y " + this.Leer(num7) + " "; } else if (StringType.StrCmp(this.Leer(numero), "cero", false) != 0) { str = str + this.Leer(numero) + " "; } } else if (StringType.StrCmp(this.Leer(num4), "cero", false) != 0) { str = str + this.Leer(num4) + " "; } if ((((num9 / 3) == 2) & (i == 1)) & (num4 != 0)) { str = str + "mil "; } if ((((num9 / 3) == 3) & (i == 1)) & (num4 != 0)) { str = str + "millones "; } if ((((num9 / 3) == 3) & (i == 2)) & (num4 != 0)) { str = str + "mil "; } num3 += 3; } return((str + "pesos " + StringType.FromChar(str2[num3 + 1]) + StringType.FromChar(str2[num3 + 2]) + "/100 MN").ToUpper()); }
public static DateTime HHMMSSToTime(long time) { DateTime time3; object obj1 = time.ToString(); time3 = new DateTime(0x6d9, 1, 1, IntegerType.FromString(Microsoft.VisualBasic.Strings.Left(StringType.FromObject(obj1), 2)), IntegerType.FromString(Microsoft.VisualBasic.Strings.Mid(StringType.FromObject(obj1), 3, 2)), IntegerType.FromString(Microsoft.VisualBasic.Strings.Mid(StringType.FromObject(obj1), 5, 2))); return(time3); }
public static DateTime YYYYMMDDToDate(long day) { DateTime time3; object obj1 = day.ToString(); time3 = new DateTime(IntegerType.FromString(Microsoft.VisualBasic.Strings.Left(StringType.FromObject(obj1), 4)), IntegerType.FromString(Microsoft.VisualBasic.Strings.Mid(StringType.FromObject(obj1), 5, 2)), IntegerType.FromString(Microsoft.VisualBasic.Strings.Mid(StringType.FromObject(obj1), 7, 2))); return(time3); }
private void RegistrarInformacion() { if (BooleanType.FromString(this.cboPrestacion.Inicial)) { ClienteFactor.cClienteComisionista clienteComisionista = new ClienteFactor.cClienteComisionista(2); clienteComisionista.Consulta(IntegerType.FromString(((TextBox)this.txtCliente).Text), this.dtpFInicio.Value.Year, this.dtpFInicio.Value.Month, Globals.GetInstance._Usuario); if (Decimal.Compare(Decimal.Add(new Decimal(IntegerType.FromString(((TextBox)this.txtMonto).Text)), clienteComisionista.MontoDeduccion), clienteComisionista.MontoComision) < 0) { ClienteFactor.cClienteDeduccion clienteDeduccion = new ClienteFactor.cClienteDeduccion(0, IntegerType.FromString(((TextBox)this.txtCliente).Text), 0, this.cboPrestacion.Identificador, new Decimal(IntegerType.FromString(((TextBox)this.txtMonto).Text)), this.dtpFInicio.Value, Globals.GetInstance._Usuario); this.DatosSalvados = true; this.Close(); } else { int num = (int)MessageBox.Show("El monto supera las comisiones del mes anterior Comisiones:" + StringType.FromDecimal(clienteComisionista.MontoComision) + " Deducciones: " + StringType.FromDecimal(clienteComisionista.MontoDeduccion), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } else { ClienteFactor.cClienteDeduccion clienteDeduccion = new ClienteFactor.cClienteDeduccion(0, IntegerType.FromString(((TextBox)this.txtCliente).Text), 0, this.cboPrestacion.Identificador, new Decimal(IntegerType.FromString(((TextBox)this.txtMonto).Text)), this.dtpFInicio.Value, Globals.GetInstance._Usuario); this.DatosSalvados = true; if (StringType.StrCmp(clienteDeduccion._Status, "AUTORIZADO", false) == 0) { this.ImprimirReporte((int)Globals.GetInstance._Sucursal, clienteDeduccion._Cliente, clienteDeduccion._Secuencia); } this.Close(); } }
/// <summary> /// ToolSettings.cs \\ Load map-unrelated user settings /// </summary> public bool loadUserSettings() { string AppPath = System.AppDomain.CurrentDomain.BaseDirectory; string toolSettings = AppPath + "\\CoD4CompileTools.settings"; if (StringType.StrCmp(FileSystem.Dir(toolSettings, FileAttribute.Normal), "", false) == 0) { return(false); } File.SetAttributes(AppPath + "\\CoD4CompileTools.settings", FileAttributes.Normal); StreamReader streamReader = new StreamReader((Stream)File.OpenRead(toolSettings)); while (streamReader.Peek() != -1) { string String1 = streamReader.ReadLine(); int count = Strings.InStr(String1, ",", CompareMethod.Binary); if (count == 0) { return(false); } string sLeft = String1.Remove(checked (count - 1), checked (String1.Length - count + 1)); string str2 = String1.Remove(0, count); if (StringType.StrCmp(sLeft, "tree", false) == 0) { Variables.strTreePath = str2; this.updateLocalPaths(); this.fillMapList(); } else if (StringType.StrCmp(sLeft, "mapname", false) == 0) { int num1 = -1; int num2 = 0; int num3 = checked (lstMapFiles.Items.Count - 1); int index = num2; while (index <= num3) { if (ObjectType.ObjTst(lstMapFiles.Items[index], (object)str2, false) == 0) { num1 = index; } checked { ++index; } } if (num1 >= 0) { lstMapFiles.SelectedIndex = num1; } } else if (StringType.StrCmp(sLeft, "developer", false) == 0) { chkDeveloper.IsChecked = BooleanType.FromString(str2); } else if (StringType.StrCmp(sLeft, "developerscript", false) == 0) { chkDeveloperScript.IsChecked = BooleanType.FromString(str2); } else if (StringType.StrCmp(sLeft, "cheats", false) == 0) { chkCheats.IsChecked = BooleanType.FromString(str2); } else if (StringType.StrCmp(sLeft, "tab", false) == 0) { compileTab.SelectedIndex = IntegerType.FromString(str2); } else if (StringType.StrCmp(sLeft, "chkCustomCommandLine", false) == 0) { chkCustomCommandLine.IsChecked = BooleanType.FromString(str2); } else if (StringType.StrCmp(sLeft, "moveToUsermaps", false) == 0) { Variables.copyToUsermaps = BooleanType.FromString(str2); } else if (StringType.StrCmp(sLeft, "txtCustomCommandLine", false) == 0) { txtCustomCommandLine.Text = str2; } else if (StringType.StrCmp(sLeft, "exeGameMp", false) == 0) { Variables.strGameMpName = str2; } else if (StringType.StrCmp(sLeft, "exeRadiant", false) == 0) { Variables.strRadiantName = str2; } // GLSL->HLSL Syntax Converter else if (StringType.StrCmp(sLeft, "sgen_width", false) == 0) { Variables.SyntaxConverterWidth = DoubleType.FromString(str2); } else if (StringType.StrCmp(sLeft, "sgen_height", false) == 0) { Variables.SyntaxConverterHeight = DoubleType.FromString(str2); } else if (StringType.StrCmp(sLeft, "sgen_font", false) == 0) { Variables.SyntaxConverterFontSize = DoubleType.FromString(str2); } else if (StringType.StrCmp(sLeft, "sgen_optimise", false) == 0) { Variables.SyntaxConverterOptimise = BooleanType.FromString(str2); } } streamReader.Close(); return(true); }
public ClsDragon(XmlElement xmlInfo) { this.m_GroupID = IntegerType.FromString("&H" + xmlInfo.GetAttribute("GroupID")); this.m_TerrainID = ByteType.FromString("&H" + xmlInfo.GetAttribute("Terrain")); this.m_AltitudeID = ByteType.FromString("&H" + xmlInfo.GetAttribute("Alt")); }
public void FromString_NotSupported(string value, int expected) { Assert.Throws <InvalidCastException>(() => IntegerType.FromString(value)); }
private int ExisteClientePortatil() { this.Cursor = Cursors.WaitCursor; int num1 = 0; try { SqlCommand sqlCommand = new SqlCommand("spPTLClienteZonaEconomica", Globals.GetInstance.cnSigamet); sqlCommand.Parameters.Add("@Configuracion", SqlDbType.SmallInt).Value = (object)1; sqlCommand.Parameters.Add("@Cliente", SqlDbType.Int).Value = (object)this._Cliente; sqlCommand.Parameters.Add("@ZonaEconomica", SqlDbType.TinyInt).Value = (object)((ComboBase)this.cboZonaEconomica).Identificador; sqlCommand.Parameters.Add("@Ruta", SqlDbType.SmallInt).Value = (object)((ComboBase)this.cboRuta).Identificador; sqlCommand.Parameters.Add("@ClientePortatil", SqlDbType.Int).Value = (object)IntegerType.FromString(((TextBox)this.txtClientePortatil).Text); sqlCommand.CommandType = CommandType.StoredProcedure; Globals.GetInstance.cnSigamet.Open(); SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(CommandBehavior.CloseConnection); while (sqlDataReader.Read()) { num1 = IntegerType.FromObject(sqlDataReader[1]); } Globals.GetInstance.cnSigamet.Close(); } catch (Exception ex) { ProjectData.SetProjectError(ex); int num2 = (int)MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Hand); ProjectData.ClearProjectError(); } this.Cursor = Cursors.Default; return(num1); }
public void FromString_ThrowsOverflowException(string value) { Assert.Throws <OverflowException>(() => IntegerType.FromString(value)); }
public void FromString_ThrowsInvalidCastException(string value) { Assert.Throws <InvalidCastException>(() => IntegerType.FromString(value)); }
private void ModificarDatos() { this.Cursor = Cursors.WaitCursor; try { SqlCommand sqlCommand = new SqlCommand("spPTLClienteZonaEconomica", Globals.GetInstance.cnSigamet); sqlCommand.Parameters.Add("@Configuracion", SqlDbType.SmallInt).Value = (object)0; sqlCommand.Parameters.Add("@Cliente", SqlDbType.Int).Value = (object)this._Cliente; sqlCommand.Parameters.Add("@ZonaEconomica", SqlDbType.TinyInt).Value = (object)((ComboBase)this.cboZonaEconomica).Identificador; sqlCommand.Parameters.Add("@Ruta", SqlDbType.SmallInt).Value = (object)((ComboBase)this.cboRuta).Identificador; if (StringType.StrCmp(((TextBox)this.txtClientePortatil).Text, "", false) != 0) { sqlCommand.Parameters.Add("@ClientePortatil", SqlDbType.Int).Value = (object)IntegerType.FromString(((TextBox)this.txtClientePortatil).Text); } sqlCommand.CommandType = CommandType.StoredProcedure; Globals.GetInstance.cnSigamet.Open(); sqlCommand.ExecuteReader(CommandBehavior.CloseConnection); Globals.GetInstance.cnSigamet.Close(); } catch (Exception ex) { ProjectData.SetProjectError(ex); int num = (int)MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Hand); ProjectData.ClearProjectError(); } this.Cursor = Cursors.Default; this.Close(); }
private void cmbAceptar_Click(object sender, EventArgs e) { if ((StringType.StrCmp(this.editDiasDif.Text, Strings.Space(0), false) != 0) && !Information.IsNumeric(this.editDiasDif.Text)) { Interaction.MsgBox("Diferencia entre fechas debe ser num\x00e9rico", MsgBoxStyle.Critical, "Operador"); this.editDiasDif.Focus(); } else { this.cmbAceptar.Enabled = false; this.cmbSalir.Enabled = false; if (StringType.StrCmp(this.cbProveedor.Text, Strings.Space(0), false) != 0) { Variables.gCodProv = StringType.FromObject(this.cbProveedor.SelectedValue); Variables.gNomProv = this.cbProveedor.Text; } else { Variables.gCodProv = ""; Variables.gNomProv = ""; } if (StringType.StrCmp(this.cbAlmacen.Text, Strings.Space(0), false) != 0) { Variables.gCodAlmacen = StringType.FromObject(this.cbAlmacen.SelectedValue); Variables.gNomAlmacen = this.cbAlmacen.Text; } else { Variables.gCodAlmacen = ""; Variables.gNomAlmacen = ""; } if (StringType.StrCmp(this.cbMetEnv.Text, Strings.Space(0), false) != 0) { Variables.gCodMetEnt = StringType.FromObject(this.cbMetEnv.SelectedValue); Variables.gDescMetEnt = this.cbMetEnv.Text; } else { Variables.gCodMetEnt = ""; Variables.gDescMetEnt = ""; } Variables.gNoDespachado = this.chkNoDesp.Checked; if (StringType.StrCmp(this.editDiasDif.Text, Strings.Space(0), false) == 0) { Variables.gDiasDif = 0; } else { Variables.gDiasDif = IntegerType.FromString(this.editDiasDif.Text); } new frmRepOCConfPend1().ShowDialog(); this.cbProveedor.Text = ""; this.cbProveedor.SelectedValue = ""; this.cbAlmacen.Text = ""; this.cbAlmacen.SelectedValue = ""; this.cbMetEnv.Text = ""; this.cbMetEnv.SelectedValue = ""; this.chkNoDesp.Checked = false; this.editDiasDif.Text = ""; this.cmbAceptar.Enabled = true; this.cmbSalir.Enabled = true; this.cbProveedor.Text = ""; this.cbProveedor.SelectedValue = ""; this.cbAlmacen.Text = ""; this.cbAlmacen.SelectedValue = ""; this.cbMetEnv.Text = ""; this.cbMetEnv.SelectedValue = ""; } }
private void PictureBox1_Paint(object sender, PaintEventArgs e) { Graphics graphics1 = e.Graphics; this.LandImage.Image = (Image)null; this.StaticImage.Image = (Image)null; this.Box_Description.Text = this.iTransition.Description; this.Lbl_HashKey.Text = this.iTransition.HashKey; this.BoxFileName.Text = this.iTransition.File; this.iTransition.GetStaticTiles.Display(this.StaticTileList); this.iTransition.GetMapTiles.Display(this.MapTileList); graphics1.Clear(Color.LightGray); Graphics graphics2 = graphics1; Bitmap land1 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(0)).TileID); Point point1 = new Point(61, 15); Point point2 = point1; graphics2.DrawImage((Image)land1, point2); Graphics graphics3 = graphics1; Bitmap land2 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(1)).TileID); point1 = new Point(84, 38); Point point3 = point1; graphics3.DrawImage((Image)land2, point3); Graphics graphics4 = graphics1; Bitmap land3 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(2)).TileID); point1 = new Point(107, 61); Point point4 = point1; graphics4.DrawImage((Image)land3, point4); Graphics graphics5 = graphics1; Bitmap land4 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(3)).TileID); point1 = new Point(38, 38); Point point5 = point1; graphics5.DrawImage((Image)land4, point5); if (this.ImageTest) { Graphics graphics6 = graphics1; Bitmap land5 = Art.GetLand(IntegerType.FromString(this.Map_TileID.Text)); point1 = new Point(61, 61); Point point6 = point1; graphics6.DrawImage((Image)land5, point6); } else { Graphics graphics6 = graphics1; Bitmap land5 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(4)).TileID); point1 = new Point(61, 61); Point point6 = point1; graphics6.DrawImage((Image)land5, point6); } Graphics graphics7 = graphics1; Bitmap land6 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(5)).TileID); point1 = new Point(84, 84); Point point7 = point1; graphics7.DrawImage((Image)land6, point7); Graphics graphics8 = graphics1; Bitmap land7 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(6)).TileID); point1 = new Point(15, 61); Point point8 = point1; graphics8.DrawImage((Image)land7, point8); Graphics graphics9 = graphics1; Bitmap land8 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(7)).TileID); point1 = new Point(38, 84); Point point9 = point1; graphics9.DrawImage((Image)land8, point9); Graphics graphics10 = graphics1; Bitmap land9 = Art.GetLand((int)this.iGroups.TerrianGroup((int)this.iTransition.GetKey(8)).TileID); point1 = new Point(61, 107); Point point10 = point1; graphics10.DrawImage((Image)land9, point10); Graphics graphics11 = graphics1; Pen pen1 = new Pen(Color.Red, 1f); point1 = new Point(82, 60); Point pt1_1 = point1; Point point11 = new Point(60, 82); Point pt2_1 = point11; graphics11.DrawLine(pen1, pt1_1, pt2_1); Graphics graphics12 = graphics1; Pen pen2 = new Pen(Color.Red, 1f); point11 = new Point(60, 83); Point pt1_2 = point11; point1 = new Point(82, 105); Point pt2_2 = point1; graphics12.DrawLine(pen2, pt1_2, pt2_2); Graphics graphics13 = graphics1; Pen pen3 = new Pen(Color.Red, 1f); point11 = new Point(83, 105); Point pt1_3 = point11; point1 = new Point(105, 83); Point pt2_3 = point1; graphics13.DrawLine(pen3, pt1_3, pt2_3); Graphics graphics14 = graphics1; Pen pen4 = new Pen(Color.Red, 1f); point11 = new Point(105, 82); Point pt1_4 = point11; point1 = new Point(83, 60); Point pt2_4 = point1; graphics14.DrawLine(pen4, pt1_4, pt2_4); }