コード例 #1
0
ファイル: text.cs プロジェクト: OldNet/Gabriel.Cat.Utilitats
        public text Remove(string textToRemove)
        {
            text tRemoved = this;

            tRemoved.Replace(textToRemove, "");
            return(tRemoved);
        }
コード例 #2
0
ファイル: text.cs プロジェクト: OldNet/Gabriel.Cat.Utilitats
        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);
        }
コード例 #3
0
ファイル: Producte.cs プロジェクト: OldNet/Gabriel.Cat.Estoc
 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 = "";
     }
 }