コード例 #1
0
        public PluginPage()
        {
            // The InitializeComponent() call is required for Windows Forms designer support.
            InitializeComponent();

            //the actual pluginhost
            FPluginHost = new TPluginHost();
            FPluginHost.OnPinCountChanged += new PinCountChangedHandler(PinCountChangedCB);
            FPluginHost.OnBeforeEvaluate  += new EvaluateHandler(BeforeEvaluateCB);
            FPluginHost.OnAfterEvaluate   += new EvaluateHandler(AfterEvaluateCB);
            FPluginHost.OnLog             += new LogHandler(LogCB);
            FPluginHost.FPS = (int)FrameRateIO.Value;

            InputsPanel.Visible = false;
            InputsPanel.PinList = FPluginHost.Inputs;

            FSliceCountControls = new List <NumericUpDown>();

            OutputsPanel.Visible = false;
            OutputsPanel.PinList = FPluginHost.Outputs;

            //initialize UDP/OSC
            FOSCAddress = "/" + OSCMessageIO.Text;
            try
            {
                FOSCTransmitter = new OSCTransmitter(TargetHostIO.Text, (int)TargetPortIO.Value);
                FOSCTransmitter.Connect();
            }
            catch (Exception e)
            {
                DebugLog.Items.Add("UDP: failed to open port " + (int)TargetPortIO.Value);
                DebugLog.Items.Add("UDP: " + e.Message);
            }

            try
            {
                FOSCReceiver = new OSCReceiver((int)ReceivePortIO.Value);
                StartListeningOSC();
            }
            catch (Exception e)
            {
                DebugLog.Items.Add("UDP: failed to open port " + (int)ReceivePortIO.Value);
                DebugLog.Items.Add("UDP: " + e.Message);
            }
        }
コード例 #2
0
 private void DisposePanel()
 {
     StopListeningOSC();
     FPluginHost.ReleasePlugin();
     FPluginHost = null;
 }