cadencii.VSTiDriverBase.createPluginUi C# (CSharp) Method

createPluginUi() private method

private createPluginUi ( ) : void
return void
        private void createPluginUi()
        {
            boolean hasUi = (aEffect.aeffect.flags & VstAEffectFlags.effFlagsHasEditor) == VstAEffectFlags.effFlagsHasEditor;
            if ( !hasUi ) {
                return;
            }
            if ( ui == null ) {
                ui = new FormPluginUi();
            }
            if ( !isUiOpened ) {
                // Editorを持っているかどうかを確認
                if ( (aEffect.aeffect.flags & VstAEffectFlags.effFlagsHasEditor) == VstAEffectFlags.effFlagsHasEditor ) {
                    try {
                        // プラグインの名前を取得
                        String product = getStringCore( AEffectXOpcodes.effGetProductString, 0, VstStringConstants.kVstMaxProductStrLen );
                        ui.Text = product;
                        ui.Location = new System.Drawing.Point( 0, 0 );
                        unsafe {
                            aEffect.Dispatch( AEffectOpcodes.effEditOpen, 0, 0, ui.Handle, 0.0f );
                        }
                        //Thread.Sleep( 250 );
                        updatePluginUiRect();
                        ui.ClientSize = new System.Drawing.Size( uiWindowRect.width, uiWindowRect.height );
                        ui.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
                        isUiOpened = true;
                    } catch ( Exception ex ) {
                        serr.println( "vstidrv#open; ex=" + ex );
                        isUiOpened = false;
                    }
                }
            }
            return;
        }