Logo Search packages:      
Sourcecode: cadencii version File versions  Download package

boolean org::kbinani::cadencii::FormMain::handleFormClosing (  ) [inline]

ウィンドウが閉じようとしているときの処理を行う 戻り値がtrueの場合,ウィンドウが閉じるのをキャンセルする処理が必要

Returns:

Definition at line 10464 of file FormMain.cs.

References org::kbinani::cadencii::AppManager::editorConfig, org::kbinani::cadencii::AppManager::getFileName(), org::kbinani::cadencii::AppManager::saveConfig(), org::kbinani::cadencii::AppManager::showModalDialog(), and org::kbinani::cadencii::EditorConfig::WindowMaximized.

        {
            if ( isEdited() ) {
                String file = AppManager.getFileName();
                if ( file.Equals( "" ) ) {
                    file = "Untitled";
                } else {
                    file = PortUtil.getFileName( file );
                }
                BDialogResult ret = AppManager.showMessageBox( _( "Save this sequence?" ),
                                                               _( "Affirmation" ),
                                                               org.kbinani.windows.forms.Utility.MSGBOX_YES_NO_CANCEL_OPTION,
                                                               org.kbinani.windows.forms.Utility.MSGBOX_QUESTION_MESSAGE );
                if ( ret == BDialogResult.YES ) {
                    if ( AppManager.getFileName().Equals( "" ) ) {
                        int dr = AppManager.showModalDialog( saveXmlVsqDialog, false, this );
                        if ( dr == BFileChooser.APPROVE_OPTION ) {
                            AppManager.saveTo( saveXmlVsqDialog.getSelectedFile() );
                        } else {
                            return true;
                        }
                    } else {
                        AppManager.saveTo( AppManager.getFileName() );
                    }

                } else if ( ret == BDialogResult.CANCEL ) {
                    return true;
                }
            }
            AppManager.editorConfig.WindowMaximized = (getExtendedState() == BForm.MAXIMIZED_BOTH);
            AppManager.saveConfig();
            UtauWaveGenerator.clearCache();
            VConnectWaveGenerator.clearCache();

#if ENABLE_MIDI
            if ( mMidiIn != null ) {
                mMidiIn.close();
            }
#endif
#if !JAVA
            bgWorkScreen.Dispose();
#endif
            return false;
        }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index