Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.56 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.IO; // Mi serve per lo StreamReader
  6.  
  7. namespace GraphicInterface_1._0
  8. {
  9.     public class riconosci_helper
  10.     {
  11.     }
  12.  
  13.     public static void riconosci_function(bool loadedImage_flag, String selectedDictionary, Bitmap loadedImage)
  14.     {
  15.                 //Controllo che l'immagine sia stata caricata e il template selezionato
  16.             if (loadedImage_flag == false)
  17.             {
  18.                 MessageBox.Show("Caricare un'immagine.");
  19.             }
  20.             else if (selectedDictionary == "")
  21.             {
  22.                 MessageBox.Show("Selezionare dizionario.");
  23.             }
  24.             else
  25.             {
  26.                 try
  27.                 {
  28.                     //Qui mando a Erik l'immagine e il dizionario
  29.                     //(loadedImage, selectedDictionary)
  30.                     MessageBox.Show("Mandare immagine e dizionario a Erik");
  31.  
  32.                     // Create an instance of StreamReader to read from a file.
  33.                     // The using statement also closes the StreamReader.
  34.                     using (StreamReader sr = new StreamReader(Constants.fileErik))
  35.                     {
  36.                         textBox1.Text = sr.ReadToEnd();
  37.                     }
  38.  
  39.                 }
  40.                 catch (Exception err)
  41.                 {
  42.                     // Let the user know what went wrong.
  43.                     MessageBox.Show("The file could not be read:\n" + err.Message);
  44.                 }
  45.             }
  46.  
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement