public INeuralNetwork GetNetwork()
        {
            if (!IsXML) { return null; }

            // in this case we have to use a temp file
            string tempFileName = System.IO.Path.GetTempFileName();
            FileStream fileStream = File.Create(tempFileName);
            fileStream.Write(_buffer, 0, _buffer.Length);
            fileStream.Close();

            NetworkSerializer serializer = new NetworkSerializer();

            //TODO: to be noted, this is not the interface here
            INeuralNetwork network = new NeuralNetwork();
            serializer.LoadNetwork(tempFileName, ref network);

            // cleans up
            File.Delete(tempFileName);

            return network;
        }
        /// <summary>
        /// Loads the network data from file.
        /// </summary>
        public void LoadFromFile(string fileFilter)
        {
            NetworkSerializer serializer = new NetworkSerializer();

            OpenFileDialog dialog = new OpenFileDialog();
            dialog.SupportMultiDottedExtensions = true;
            dialog.Filter = fileFilter;

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    serializer.LoadNetwork(dialog.FileName, ref _network);
                    MessageBox.Show("File " + dialog.FileName + " loaded",
                                    "File Loaded",
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                }
                catch (Exception ex)
                {
                    StaticClasses.ShowError("Error: Invalid File? " + ex.Message);
                }
            }
        }