예제 #1
0
        private void button1_Click( object sender, EventArgs e )
        {
            if( CurrentCritterType == null )
                return;

            if( LoadedFast )
            {
                DialogResult result = MessageBox.Show(
                    "Current target has been opened with simple animation verification" + Environment.NewLine
                    + Environment.NewLine
                    + "It is advised to disable that option before generating" + Environment.NewLine
                    + "completion report or it may contain invalid informations" + Environment.NewLine
                    + Environment.NewLine
                    + "Do you wish to turn off simple verification and reopen current target?",
                    CritterBrowser.Self,
                    MessageBoxButtons.YesNo,
                    MessageBoxIcon.Warning,
                    MessageBoxDefaultButton.Button1 );

                if( result == DialogResult.Yes )
                {
                    Settings.Set( "FastCheckFRM", false );
                    frmCheckerConfig config = frmCheckerPrepare( LoadedMode, LoadedTarget );
                    config.ShowCompletion = CurrentCritterType.Name;
                    frmChecker.RunWorkerAsync( config );

                    return;
                }
            }

            frmCompletion completion = new frmCompletion( this, CurrentCritterType );
            completion.ShowDialog( this );
        }
예제 #2
0
        /// <summary>
        /// File->Export event.
        /// </summary>
        private void menuFileExport_Click( object sender, EventArgs e )
        {
            if( CurrentCritterType == null )
                return;

            DialogResult result = DialogResult.Cancel;

            frmExport export = new frmExport( CurrentCritterType.Name );
            result = export.ShowDialog( this );
            if( result != DialogResult.OK )
                return;

            saveFile.FileName = CurrentCritterType.Name + ".zip";
            result = saveFile.ShowDialog( this );
            if( result != DialogResult.OK )
                return;

            ZipStorer zip = ZipStorer.Create( saveFile.FileName, "" );
            AddCritterType( zip, CurrentCritterType );

            if( export.checkCompletion.Checked )
            {
                frmCompletion completion = new frmCompletion( this );
                zip.AddText( ZipStorer.Compression.Deflate, completion.CompletionText( CurrentCritterType, true ), CurrentCritterType.Name + ".txt", DateTime.Now, "" );
            }

            zip.Close();
        }