public text Remove(string textToRemove) { text tRemoved = this; tRemoved.Replace(textToRemove, ""); return(tRemoved); }
public text Replace(string[,] oldNewStrings) { text tReplaced = this; for (int y = 0; y < oldNewStrings.GetLength(DimensionMatriz.Fila); y++) { tReplaced.Replace(oldNewStrings[0, y], oldNewStrings[1, y]); } return(tReplaced); }
private void RedueixIDessa(string rutaImatge) { if (File.Exists(rutaImatge)) { var img = new System.Drawing.Bitmap(rutaImatge); var imgR = gabriel.cat.Imagen.Escala(img, Convert.ToDecimal((img.Height % 100) / 100.0)); if (!Directory.Exists(Environment.CurrentDirectory + "\\imatges")) { Directory.CreateDirectory(Environment.CurrentDirectory + "\\imatges"); } rutaImatge = "\\imatges\\" + PrimaryKey + ".png"; imgR.Save(Environment.CurrentDirectory + rutaImatge, System.Drawing.Imaging.ImageFormat.Png); Gabriel.Cat.text rt = rutaImatge; rt.Replace('\\', ';'); this.rutaImatge = rt; } else { rutaImatge = ""; } }