示例#1
0
        private void OpenConnect(Host host)
        {
            var conneInfo = CreateConnectionInfo(host);

            _sshClient = new SshClient(conneInfo);
            _sshClient.Connect();
            _vm.AddOutput("Connected");
        }
示例#2
0
        private void OpenConnect(Host host)
        {
            var conneInfo = CreateConnectionInfo(host);

            _sshClient = new SshClient(conneInfo);
            _sshClient.Connect();
            _vm.AddOutput("Connected");

            _vm.HasConnected = true;
            project          = new XrayProject(_sshClient, Record.Settings, WriteShell);
        }
示例#3
0
        public TerminalWindow(Record project)
        {
            InitializeComponent();

            _vm         = new Terminal(project.Host);
            DataContext = _vm;

            _vm.AddOutput("Connect ...");
            Task.Factory.StartNew(() =>
            {
                try
                {
                    OpenConnect(_vm.Host);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            });
        }
示例#4
0
        public TerminalWindow(Record record)
        {
            InitializeComponent();
            ResizeMode            = ResizeMode.NoResize;
            WindowStartupLocation = WindowStartupLocation.CenterScreen;

            this.Record = record;
            _vm         = new Terminal(record.Host);
            DataContext = _vm;

            _vm.AddOutput("Connect ...");
            Task.Factory.StartNew(() =>
            {
                try
                {
                    OpenConnect(_vm.Host);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            });
        }