public void Clear() { LinuxTreeViewItem.Clear(); treeView_linux_directory.Items.Clear(); listView_linux_files.Items.Clear(); listView_work_files.Items.Clear(); SelectedConfigLocalPath = "Not Selected"; }
public int Refresh() { if (WindowMain.current == null) { return(-1); } //if(ssh != null && ssh.IsConnected) // ssh.Disconnect(); //if(sftp != null && sftp.IsConnected) // sftp.Disconnect(); // 삭제 //treeView_linux_directory.Items.Clear(); //listView_linux_files.Items.Clear(); LinuxTreeViewItem.Clear(); treeView_linux_directory.Items.Clear(); listView_linux_files.Items.Clear(); listView_work_files.Items.Clear(); // 추가 //string home_dir = sftp.WorkingDirectory; // root 의 path 는 null 로 초기화 string working_dir = SSHController.WorkingDirectory; if (working_dir == null) { return(-1); } LinuxTreeViewItem.root = new LinuxTreeViewItem("/", null, "/", true, null); treeView_linux_directory.Items.Add(LinuxTreeViewItem.root); LinuxTreeViewItem.root.RefreshChild(working_dir, false); Cofile.current.RefreshListView(LinuxTreeViewItem.Last_Refresh); Log.PrintLog("[refresh]", "UserControls.Cofile.Refresh"); return(0); //LinuxTreeViewItem.ReconnectServer(); }