コード例 #1
0
        private void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                if (disposing)
                {
                    this.avr?.Close();
                }

                this.avr = null;

                this.disposed = true;
            }
        }
コード例 #2
0
        public override void Connect()
        {
            this.disposed = false;

            this.avr = new AvrClient()
            {
                Host = this.Host,
                Port = this.Port,
            };
            this.avr.Disconnected    += ClientDisconnected;
            this.avr.PropertyChanged += ClientPropertyChanged;

            try {
                this.avr.Connect();
                OnConnected();
            } catch {
                this.ControllerStatus = ControllerStatus.Error;
                OnError(string.Format(CultureInfo.InvariantCulture, Properties.Resources.FMT_NETWORK_TIMEOUT, "processor"));
            }
        }