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

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

選択されている音符の表情を編集するためのダイアログを起動し、編集を行います。

Definition at line 5113 of file FormMain.cs.

References org::kbinani::vsq::VsqEvent::clone(), org::kbinani::cadencii::AppManager::editHistory, org::kbinani::vsq::VsqCommand::generateCommandEventChangeIDContaints(), org::kbinani::cadencii::AppManager::getSelected(), org::kbinani::cadencii::VsqFileEx::getTrackRendererKind(), org::kbinani::cadencii::AppManager::getVsqFile(), org::kbinani::vsq::VsqEvent::InternalID, org::kbinani::cadencii::AppManager::itemSelection, org::kbinani::cadencii::SelectedEventEntry::original, org::kbinani::cadencii::EditHistoryModel::register(), org::kbinani::cadencii::AppManager::showModalDialog(), and org::kbinani::vsq::VsqFile::Track.

        {
            SelectedEventEntry item = AppManager.itemSelection.getLastEvent();
            if ( item == null ) {
                return;
            }

            VsqEvent ev = item.original;
            SynthesizerType type = SynthesizerType.VOCALOID2;
            int selected = AppManager.getSelected();
            VsqFileEx vsq = AppManager.getVsqFile();
            RendererKind kind = VsqFileEx.getTrackRendererKind( vsq.Track.get( selected ) );
            if ( kind == RendererKind.VOCALOID1 ) {
                type = SynthesizerType.VOCALOID1;
            }
            FormNoteExpressionConfig dlg = null;
            try {
                dlg = new FormNoteExpressionConfig( type, ev.ID.NoteHeadHandle );
                dlg.setPMBendDepth( ev.ID.PMBendDepth );
                dlg.setPMBendLength( ev.ID.PMBendLength );
                dlg.setPMbPortamentoUse( ev.ID.PMbPortamentoUse );
                dlg.setDEMdecGainRate( ev.ID.DEMdecGainRate );
                dlg.setDEMaccent( ev.ID.DEMaccent );

                dlg.setLocation( getFormPreferedLocation( dlg ) );
                BDialogResult dr = AppManager.showModalDialog( dlg, this );
                if ( dr == BDialogResult.OK ) {
                    VsqEvent edited = (VsqEvent)ev.clone();
                    edited.ID.PMBendDepth = dlg.getPMBendDepth();
                    edited.ID.PMBendLength = dlg.getPMBendLength();
                    edited.ID.PMbPortamentoUse = dlg.getPMbPortamentoUse();
                    edited.ID.DEMdecGainRate = dlg.getDEMdecGainRate();
                    edited.ID.DEMaccent = dlg.getDEMaccent();
                    edited.ID.NoteHeadHandle = dlg.getEditedNoteHeadHandle();
                    CadenciiCommand run = new CadenciiCommand(
                        VsqCommand.generateCommandEventChangeIDContaints( selected, ev.InternalID, edited.ID ) );
                    AppManager.editHistory.register( vsq.executeCommand( run ) );
                    setEdited( true );
                    refreshScreen();
                }
            } catch ( Exception ex ) {
                Logger.write( typeof( FormMain ) + ".editNoteExpressionProperty; ex=" + ex + "\n" );
            } finally {
                if ( dlg != null ) {
                    try {
                        dlg.close();
                    } catch ( Exception ex2 ) {
                        Logger.write( typeof( FormMain ) + ".editNoteExpressionProperty; ex=" + ex2 + "\n" );
                    }
                }
            }
        }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index