Ejemplo n.º 1
0
        private void CheckFileExists()
        {
            string filename = mSaveFileNameTextBox.Text;
            int    result   = ARMaxNativeMethods.InitMaxSave();

            if (result != 0)
            {
                throw new Exception("Could not load initialize ARMax DLL!");
            }
            result = ARMaxNativeMethods.LoadSave(filename);
            if (result != 0)
            {
                throw new Exception("Could not load file:" + filename);
            }
            result = ARMaxNativeMethods.FileExistsInSavePos(mFileExistsTextBox.Text);
            if (result > 0)
            {
                mFileExistsLabel.Text = "File Exists";
            }
            else
            {
                mFileExistsLabel.Text = "File Does Not Exist";
            }

            ARMaxNativeMethods.FreeMaxSave();
        }