⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modelviewstate.cs

📁 ftp上传的c#程序. ftp上传的c#程序.
💻 CS
字号:
namespace FTP.Model.DataStructures 
{
	using System.Net;
	using System.Collections;
	using FTP.Model.DataStructures.DirectoryCache;
	public class ModelViewState
	{

		// Private
		DirectoryCacheManager directoryCacheManager;
    
		// Sent from View to Model
		public bool   connected = false;
		public string serverAddress;
		public int    serverPort;
		public string userName;
		public string password;
		public string serverFile;
		public string clientFile;
		public string requestedServerDirectory;
		public string newServerDirectory;
		public string deleteServerDirectory;
		public string deleteServerFile;

	public int[]  selectedServerFiles;
		public System.Windows.Forms.View	ListViewStyle = System.Windows.Forms.View.Details;

		// Determined/ retrieved by model
		public  string         consoleOutput;
		public  string         serverRootPath = "/";
		private string         currentServerDirectory;
		public  string         CurrentServerDirectory 
		{
			get {return currentServerDirectory;}
			set 
			{
				if (directoryCacheManager == null) 
				{
					// This must be the Root directory so initialise the directoryCacheManager
					this.directoryCacheManager  = new DirectoryCacheManager(value);
					this.serverRootPath         = value;
				}
				currentServerDirectory  = value;
			}
		}

		public bool isCWDInCache() 
		{
			return directoryCacheManager.tryToSwitchDirectory(this.currentServerDirectory);
		}

    

		public void addServerLIST(ServerFileData[] pServerFileData) 
		{
			this.directoryCacheManager.addDirectoryData(this.currentServerDirectory, pServerFileData);
		}

		public void getTreeViewData(ref System.Windows.Forms.TreeView pTreeView) 
		{
			if (this.directoryCacheManager != null)
				this.directoryCacheManager.getTreeViewData(ref pTreeView, this.currentServerDirectory);
		}

		public void getListViewData(ref System.Windows.Forms.ListView pListView) 
		{
			if (this.directoryCacheManager != null)
				this.directoryCacheManager.getListViewData(ref pListView, this.currentServerDirectory);
		}
		public string[] getFileNamesFromIntegerArray(int[] pSelectedFiles) 
		{
			if (this.directoryCacheManager != null)
				return this.directoryCacheManager.getFileNamesFromIntegerArray(pSelectedFiles);
			else	{
			string[] temp	= {"broken"};
				return temp;
						   }
		}
		public void flushCurrentDirectoryCache() 
		{
			directoryCacheManager.flushCurrentDirectoryCache();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -