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

void org::kbinani::cadencii::FormMain::changeTrackNameCore (  ) [inline]

トラックの名前変更を行います。

Definition at line 6043 of file FormMain.cs.

References org::kbinani::cadencii::AppManager::editHistory, org::kbinani::vsq::VsqCommand::generateCommandTrackChangeName(), org::kbinani::cadencii::AppManager::getSelected(), org::kbinani::cadencii::AppManager::getVsqFile(), org::kbinani::cadencii::EditHistoryModel::register(), org::kbinani::cadencii::AppManager::showModalDialog(), and org::kbinani::vsq::VsqFile::Track.

        {
            InputBox ib = null;
            try{
                int selected = AppManager.getSelected();
                VsqFileEx vsq = AppManager.getVsqFile();
                ib = new InputBox( _( "Input new name of track" ) );
                ib.setResult( vsq.Track.get( selected ).getName() );
                ib.setLocation( getFormPreferedLocation( ib ) );
                BDialogResult dr = AppManager.showModalDialog( ib, this );
                if( dr == BDialogResult.OK ){
                    String ret = ib.getResult();
                    CadenciiCommand run = new CadenciiCommand(
                        VsqCommand.generateCommandTrackChangeName( selected, ret ) );
                    AppManager.editHistory.register( vsq.executeCommand( run ) );
                    setEdited( true );
                    refreshScreen();
                }
            }catch( Exception ex ){
            }finally{
                if( ib != null ){
                    ib.close();
                }
            }

/*            if ( mTextBoxTrackName != null ) {
#if !JAVA
                if ( !mTextBoxTrackName.IsDisposed ) {
                    mTextBoxTrackName.Dispose();
                }
#endif
                mTextBoxTrackName = null;
            }
#if JAVA
            mTextBoxTrackName = new LyricTextBox( this );
#else
            mTextBoxTrackName = new LyricTextBox();
#endif
            mTextBoxTrackName.setVisible( false );
            int selector_width = trackSelector.getSelectorWidth();
            int x = AppManager.keyWidth + (AppManager.getSelected() - 1) * selector_width;
            mTextBoxTrackName.setLocation( x, trackSelector.getHeight() - TrackSelector.OFFSET_TRACK_TAB + 1 );
            mTextBoxTrackName.setText( AppManager.getVsqFile().Track.get( AppManager.getSelected() ).getName() );
#if JAVA
            mTextBoxTrackName.keyUpEvent.add( new BKeyEventHandler( this, "mTextBoxTrackName_KeyUp" ) );
#else
            mTextBoxTrackName.BorderStyle = System.Windows.Forms.BorderStyle.None;
            mTextBoxTrackName.KeyUp += new System.Windows.Forms.KeyEventHandler( mTextBoxTrackName_KeyUp );
            mTextBoxTrackName.Parent = trackSelector;
#endif
            mTextBoxTrackName.setSize( selector_width, TrackSelector.OFFSET_TRACK_TAB );
            mTextBoxTrackName.setVisible( true );
            mTextBoxTrackName.requestFocus();
            mTextBoxTrackName.selectAll();*/
        }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index