Inheritance: IModalTerminalTask, IDisposable
Esempio n. 1
0
 private void Exit()
 {
     if (_modemTask != null)
     {
         _modemTask.Abort();
         _modemTask = null;
     }
     _executing            = false;
     _okButton.Enabled     = true;
     _fileNameBox.Enabled  = true;
     _selectButton.Enabled = true;
     _protocolBox.Enabled  = true;
     _directionBox.Enabled = true;
 }
Esempio n. 2
0
 private bool StartSend()
 {
     try {
         if (GetCurrentProtocol() == XZModemPlugin.Protocol.XModem)
         {
             _modemTask = new XModemSender(this, _fileNameBox.Text);
         }
         else
         {
             _modemTask = new ZModemSender(this, _fileNameBox.Text);
         }
         return(true);
     }
     catch (Exception ex) {
         GUtil.Warning(this, ex.Message);
         return(false);
     }
 }
Esempio n. 3
0
        public void AsyncReset()
        {
            if (_closed)
            {
                return;
            }

            if (this.InvokeRequired)
            {
                Invoke((Action)AsyncReset);
                return;
            }

            _modemTask            = null;
            _executing            = false;
            _okButton.Enabled     = true;
            _cancelButton.Enabled = true;
            _fileNameBox.Enabled  = true;
            _selectButton.Enabled = true;
            _protocolBox.Enabled  = true;
            _directionBox.Enabled = true;
            _progressText.Text    = "";
        }
Esempio n. 4
0
 private bool StartSend()
 {
     try {
         if (GetCurrentProtocol() == XZModemPlugin.Protocol.XModem)
             _modemTask = new XModemSender(this, _fileNameBox.Text);
         else
             _modemTask = new ZModemSender(this, _fileNameBox.Text);
         return true;
     }
     catch (Exception ex) {
         GUtil.Warning(this, ex.Message);
         return false;
     }
 }
Esempio n. 5
0
 private void Exit()
 {
     if (_modemTask != null) {
         _modemTask.Abort();
         _modemTask = null;
     }
     _executing = false;
     _okButton.Enabled = true;
     _fileNameBox.Enabled = true;
     _selectButton.Enabled = true;
     _protocolBox.Enabled = true;
     _directionBox.Enabled = true;
 }
Esempio n. 6
0
        public void AsyncReset()
        {
            if (_closed) {
                return;
            }

            if (this.InvokeRequired) {
                Invoke((Action)AsyncReset);
                return;
            }

            _modemTask = null;
            _executing = false;
            _okButton.Enabled = true;
            _cancelButton.Enabled = true;
            _fileNameBox.Enabled = true;
            _selectButton.Enabled = true;
            _protocolBox.Enabled = true;
            _directionBox.Enabled = true;
            _progressText.Text = "";
        }