Inheritance: IModalTerminalTask, IDisposable
Ejemplo 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;
 }
Ejemplo 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);
     }
 }
Ejemplo 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    = "";
        }
Ejemplo 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;
     }
 }
Ejemplo 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;
 }
Ejemplo 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 = "";
        }