示例#1
0
 public Form1()
 {
     InitializeComponent();
     if (File.Exists("BPNNBrain.net"))
     {
         an = (ActivationNetwork)ActivationNetwork.Load("BPNNBrain.net");
     }
     else if (File.Exists("SOMBrain.net"))
     {
         dn = (DistanceNetwork)DistanceNetwork.Load("SOMBrain.ann");
     }
 }
示例#2
0
 //Going to Find Form
 private void btnFind_Click(object sender, EventArgs e)
 {
     //validate existence of files
     if (System.IO.File.Exists(savedDNNetwork))
     {
         //Load Networks
         dn = (DistanceNetwork)DistanceNetwork.Load(savedDNNetwork);
         //Go to Form
         var form = new findForm(dn);
         form.ShowDialog();
     }
     else
     {
         MessageBox.Show($"{savedDNNetwork} not Found");
     }
 }
示例#3
0
        public MainForm()
        {
            InitializeComponent();

            picturesPath = Application.StartupPath + @"\pictures";

            listAllImages = new List <String>();

            // Check BPNNBrain.net file
            if (File.Exists("BPNNBrain.net"))
            {
                // Load BPNNBrain.net file
                Network.loadActivationNetwork = (ActivationNetwork)ActivationNetwork.Load("BPNNBrain.net");
            }

            // Check SOMBrain.net file
            if (File.Exists("SOMBrain.net"))
            {
                // Load SOMBrain.net file
                Network.loadDistanceNetwork = (DistanceNetwork)DistanceNetwork.Load("SOMBrain.net");
            }

            // Check pictures directory
            if (Directory.Exists(picturesPath))
            {
                // Load All Images
                listAllImages = LoadImages();

                // It means that user added some art
                if (Network.checkAddArt)
                {
                    checkListAllImages = true;
                }
                else
                {
                    checkListAllImages = false;
                }
            }
        }