Пример #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);
                }
            });
        }