Esempio n. 1
0
        private string _sourceCopyName;  //用于文件复制

        public FileManagerControl(HostService hostService, ShellStruct data)
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;
            treeView_Dirs.AfterSelect          += treeView_File_AfterSelect;
            listView_File.DragEnter            += listView_File_DragEnter;
            listView_File.DragDrop             += listView_File_DragDrop;
            listView_File.DoubleClick          += listView_File_DoubleClick;
            listView_File.AfterEditSubItem     += listView_File_AfterEditSubItem;
            listView_File.EditSubItemCompleted += listView_File_EditSubItemCompleted;
            rightMenu_FileManager.Opening      += rightMenu_FileManager_Opening;

            this._hostService = hostService;
            this._shellData   = data;

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

            //获取根路径
            _fileManager.GetWwwRootPath();
        }
Esempio n. 2
0
        private string _sourceCopyPath; //用于文件复制

        #endregion Fields

        #region Constructors

        public FileManagerControl(IHostService hostService, ShellStruct data)
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;
            treeView_Dirs.AfterSelect += treeView_File_AfterSelect;
            listView_File.DragEnter += listView_File_DragEnter;
            listView_File.DragDrop += listView_File_DragDrop;
            listView_File.DoubleClick += listView_File_DoubleClick;
            listView_File.AfterEditSubItem += listView_File_AfterEditSubItem;
            listView_File.EditSubItemCompleted += listView_File_EditSubItemCompleted;
            rightMenu_FileManager.Opening += rightMenu_FileManager_Opening;

            this._hostService = hostService;
            this._shellData = data;

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

            //获取根路径
            _fileManager.GetWwwRootPath();
        }
Esempio n. 3
0
        public FileEditerControl(HostService hostService, ShellStruct data, string filePath, bool autoLoadContent)
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;

            this._hostService = hostService;
            this._shellData = data;
            _fileManager = new FileManagerService(_hostService, _shellData);
            _fileManager.ReadFileCompletedToDo += fileManager_LoadFileContentCompletedToDo;
            _fileManager.WriteFileCompletedToDo += fileManager_SaveFileCompletedToDo;

            if (filePath != null)
            {
                textBox_url.Text = filePath;
                if (autoLoadContent)
                    LoadFileContent(filePath);
            }
        }
Esempio n. 4
0
        public FileEditerControl(IHost host, Shell data, string filePath, bool autoLoadContent)
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;

            this._host      = host;
            this._shellData = data;
            _fileManager    = new FileManagerService(_host, _shellData);
            _fileManager.ReadFileCompletedToDo  += fileManager_LoadFileContentCompletedToDo;
            _fileManager.WriteFileCompletedToDo += fileManager_SaveFileCompletedToDo;

            if (filePath != null)
            {
                textBox_url.Text = filePath;
                if (autoLoadContent)
                {
                    LoadFileContent(filePath);
                }
            }
        }