コード例 #1
0
 private void remoteShellToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (Client c in GetSelectedClients())
     {
         FrmRemoteShell frmRs = FrmRemoteShell.CreateNewOrGetExisting(c);
         frmRs.Show();
         frmRs.Focus();
     }
 }
コード例 #2
0
        private void openDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string path = _currentDir;

            if (lstDirectory.SelectedItems.Count == 1)
            {
                var      item = lstDirectory.SelectedItems[0];
                FileType type = (FileType)item.Tag;

                if (type == FileType.Directory)
                {
                    path = GetAbsolutePath(item.SubItems[0].Text);
                }
            }

            FrmRemoteShell frmRs = FrmRemoteShell.CreateNewOrGetExisting(_connectClient);

            frmRs.Show();
            frmRs.Focus();
            frmRs.RemoteShellHandler.SendCommand($"cd \"{path}\"");
        }