示例#1
0
        public DbManagerControl(HostService hostService, ShellStruct data)
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;

            _hostService = hostService;
            _shellData = data;

            //初始化ExtraSettingXml
            InitExtraSettingXml();

            //绑定事件
            dbManagerService = new DbManagerService(_hostService, _shellData, GetDbType());
            dbManagerService.ConnectDbCompletedToDo += dbManagerService_ConnectDbCompletedToDo;
            dbManagerService.GetDbNameCompletedToDo += dbManagerService_GetDbNameCompletedToDo;
            dbManagerService.GetDbTableNameCompletedToDo += dbManagerService_GetTableNameCompletedToDo;
            dbManagerService.GetColumnTypeCompletedToDo += dbManagerService_GetColumnTypeCompletedToDo;
            dbManagerService.ExecuteReaderCompletedToDo += dbManagerService_ExecuteReaderCompletedToDo;
            dbManagerService.ExecuteNonQueryCompletedToDo += dbManagerService_ExecuteNonQueryCompletedToDo;

            treeView_Dbs.AfterSelect += treeView_Dbs_AfterSelect;

            RefreshServerStatus(false);
            //连接数据库
            dbManagerService.ConnectDb(GetConnStr());
        }
示例#2
0
 public FileUploadOrDownload(HostService hostService, ShellStruct shellData, string sourceFilePath, string targetFilePath)
 {
     _hostService = hostService;
     _shellData = shellData;
     _sourceFilePath = sourceFilePath;
     _targetFilePath = targetFilePath;
 }
示例#3
0
        private string _sourceCopyPath; //用于文件复制

        #endregion Fields

        #region Constructors

        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();
        }
示例#4
0
        public MyFirstPlugin(HostService host, ShellStruct data)
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;

            _host = host;
            _shellData = data;

            ShowShellTypeDataInLable(_shellData);
        }
示例#5
0
        public ShellCmderControl(HostService hostService,ShellStruct data)
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;
            this._hostService = hostService;
            this._shellData = data;

            shellTextBox_Cmder.CommandEntered+=shellTextBox_Cmder_CommandEntered;
            shellTextBox_Cmder.Prompt = "SECTools";
            ConnectOneShell();
        }
示例#6
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);
            }
        }
示例#7
0
 public Plugin()
 {
     _pluginAttribute = new PluginAttribute();
     _hostService = new HostService();
 }
示例#8
0
 public FileManagerService(HostService hostService, ShellStruct data)
 {
     this._hostService = hostService;
     this._shellData = data;
 }
示例#9
0
 public DbManagerService(HostService hostService, ShellStruct data,string dbType)
 {
     this._hostService = hostService;
     this._shellData = data;
     this._dbType = dbType;
 }
示例#10
0
 public ShellCmder(HostService host,ShellStruct data)
 {
     this._host = host;
     this._shellData = data;
 }