Пример #1
0
		public ItemDownload(Status status)
		{
			MenuText = StrRes.GetString("StrDownload","Download");
			Executed += ItemDownload_Executed;

			_status = status;
		}
Пример #2
0
		public ItemDelete(Status status)
		{
			ID = "delete";
			MenuText = StrRes.GetString("StrDelete","Delete");
			Executed += ItemDelete_Executed;

			_status = status;
		}
Пример #3
0
		public ItemUpload(Status status)
		{
			ID = "upload";
			MenuText = StrRes.GetString("StrUpload","Upload");
			Executed += ItemUpload_Executed;

			_status = status;
		}
Пример #4
0
		public ItemRefresh(Status status)
		{
			ID = "refresh";
			MenuText = StrRes.GetString("StrRefresh","Refresh");
			Executed += ItemRefresh_Executed;

			_status = status;
		}
Пример #5
0
		public ItemCreateDir(Status status)
		{
			ID = "createDir";
			MenuText = StrRes.GetString("StrCreateDir","CreateDir");
			Executed += ItemCreateDir_Executed;

			_status = status;
		}
Пример #6
0
		public ItemModifyTime(Status status)
		{
			ID = "modifyTime";
			MenuText = StrRes.GetString("StrModifyTime","ModifyTime");
			Executed += ItemModifyTime_Executed;

			_status = status;
		}
Пример #7
0
		public ItemDownloadToServer(Status status)
		{
			ID = "downloadToServer";
			MenuText = StrRes.GetString("StrDownloadToServer","DownloadToServer");
			Executed += ItemDownloadToServer_Executed;

			_status = status;
		}
Пример #8
0
		public ItemCopy(Status status)
		{
			ID = "copy";
			MenuText = StrRes.GetString("StrCopy","Copy");
			Executed += ItemCopy_Executed;

			_status = status;
		}
Пример #9
0
		public ItemCreateFile(Status status)
		{
			ID = "createFile";
			MenuText = StrRes.GetString("StrCreateFile","CreateFile");
			Executed += ItemCreateFile_Executed;

			_status = status;
		}
Пример #10
0
		public ItemEdit(Status status)
		{
			ID = "edit";
			MenuText = StrRes.GetString("StrEdit","Edit");
			Executed += ItemEdit_Executed;

			_status = status;
		}
Пример #11
0
		public ItemPaste(Status status)
		{
			ID = "paste";
			MenuText = StrRes.GetString("StrPaste","Paste");
			Executed += ItemPaste_Executed;

			_status = status;
		}
Пример #12
0
		public ItemRename(Status status)
		{
			ID = "rename";
			MenuText = StrRes.GetString("StrRename","Rename");
			Executed += ItemRename_Executed;

			_status = status;
		}
Пример #13
0
        public PanelFileManager(IHost host, PluginParameter data)
        {
            _host = host;
            _shellData = (Shell)data[0];

            // init StrRes to translate string
            StrRes.SetHost(_host);
            Init();

            //
            _fileManager = new FileManager(_host, _shellData);
            _fileManager.GetWwwRootPathCompletedToDo += fileManager_GetWwwRootPathCompletedToDo;
            _fileManager.GetFileTreeCompletedToDo += fileManager_GetFileTreeCompletedToDo;
            _fileManager.DeleteFileOrDirCompletedToDo += fileManager_DeleteFileOrDirCompletedToDo;
            _fileManager.RenameFileOrDirCompletedToDo += fileManager_RenameFileOrDirCompletedToDo;
            _fileManager.CopyFileOrDirCompletedToDo += fileManager_CopyFileOrDirCompletedToDo;
            _fileManager.ModifyFileOrDirTimeCompletedToDo += fileManager_ModifyFileOrDirTimeCompletedToDo;
            _fileManager.CreateDirCompletedToDo += fileManager_CreateDirCompletedToDo;
            _fileManager.WgetCompletedToDo += fileManager_WgetCompletedToDo;

            _status = new Status
            {
                PathSeparator = "\\",
                Host = _host,
                ShellData=_shellData,
                FileManager=_fileManager,
                FileGridView = _gridViewFile,
            };

            _gridViewFile.ContextMenu = CreateFileRightMenu(_status);
            //_dataStore = new List<FileInfoView>();
            _gridViewFile.DataStore = _dataStore = new DataStoreCollection<FileInfoView>();

            //获取根路径
            _fileManager.GetWwwRootPath();
        }
Пример #14
0
        ContextMenu CreateFileRightMenu(Status status)
        {
            //contextMenu
            var contextMenu = new ContextMenu();
            contextMenu.Items.Add(new Actions.ItemRefresh(status));
            contextMenu.Items.AddSeparator();
            contextMenu.Items.Add(new Actions.ItemUpload(status));
            contextMenu.Items.Add(new Actions.ItemDownload(status));
            contextMenu.Items.Add(new Actions.ItemDownloadToServer(status));
            contextMenu.Items.AddSeparator();
            contextMenu.Items.Add(new Actions.ItemDelete(status));
            contextMenu.Items.Add(new Actions.ItemEdit(status));
            contextMenu.Items.Add(new Actions.ItemCopy(status));
            contextMenu.Items.Add(new Actions.ItemPaste(status));
            contextMenu.Items.Add(new Actions.ItemRename(status));
            contextMenu.Items.Add(new Actions.ItemModifyTime(status));

            var create = contextMenu.Items.GetSubmenu(StrRes.GetString("StrNew", "New"));
            create.Items.Add(new Actions.ItemCreateDir(status));
            create.Items.Add(new Actions.ItemCreateFile(status));

            return contextMenu;
        }