Пример #1
0
        private void OnDolbyConnectionChanged(DolbyCP750 dolby, EventArgs args)
        {
            this.Invoke((MethodInvoker)delegate
            {
                if (dolbyStatus.IsDisposed)
                    return;

                if (dolby.Disconnected)
                    dolbyStatus.Text = "Disconnected";

                else
                    dolbyStatus.Text = "Connected";

                updateIcon();
            });
        }
 public Connector(DolbyCP750 dolby)
 {
     this.dolby_ = dolby;
 }
Пример #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // Setup Dolby CP750 wrapper
            dolby_ = new DolbyCP750();
            dolby_.DisconnectedEvent += OnDolbyConnectionChanged;

            // Access the jnior box!
            jnior_ = new Jnior();
            jnior_.AddConnectionCallback(new jnior_dll_calls.StatusCallback(OnJniorConnectionNotify));
            jnior_.AddLoginCallback(new jnior_dll_calls.StatusCallback(OnJniorLoginNotify));
            jnior_.AddMonitorCallback(new jnior_dll_calls.MonitorCallback(OnJniorMonitorNotify));

            // Connect to Dolby
            dolby_.Connect();

            // Instantiate the writer
            ConsoleRedirection.TextBoxStreamWriter _writer = new ConsoleRedirection.TextBoxStreamWriter(textBox1);
            // Redirect the out Console stream
            Console.SetOut(_writer);

            // Connect to jnior
            ConnectJnior();
        }
 public CommandSender(DolbyCP750 dolby)
 {
     this.dolby_ = dolby;
 }