Exemplo n.º 1
0
        /// <summary>
        /// 右键菜单创建文件事件
        /// </summary>
        private void item_createFile_Click(object sender, EventArgs e)
        {
            string      newFile    = Path.Combine(GetCurrentDirPath(), "NewFile.txt");
            UserControl fileEditer = new FileEditerControl(_host, _shellData, newFile, false);

            _host.Ui.CreateNewTabPage("FileEdit", fileEditer);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 右键菜单创建文件事件
        /// </summary>
        private void item_createFile_Click(object sender, EventArgs e)
        {
            SelectedItemsStatus status = GetStatusOfSelectedItemsInListView();
            string      newFile        = GetSelectedDirPathInDirTree() + "NewFile.txt";
            UserControl fileEditer     = new FileEditerControl(_hostService, _shellData, newFile, false);

            _hostService.CreateNewTabPage("FileEdit", fileEditer);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 右键菜单编辑事件
        /// </summary>
        private void item_edit_Click(object sender, EventArgs e)
        {
            SelectedItemsStatus status = GetStatusOfSelectedItemsInListView();

            if (status == SelectedItemsStatus.IsFile)
            {
                string      webFile    = GetSelectedPathInListView(false);
                UserControl fileEditer = new FileEditerControl(_hostService, _shellData, webFile, true);
                _hostService.CreateNewTabPage("FileEdit", fileEditer);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 右键菜单编辑事件
        /// </summary>
        private void item_edit_Click(object sender, EventArgs e)
        {
            List <FileInfo>     fileInfos = GetSelectedFilesInListView();
            SelectedFilesStatus status    = GetStatusOfSelectedFilesInListView(fileInfos);

            if (status == SelectedFilesStatus.IsFile)
            {
                string      webFile    = fileInfos[0].FullName;
                UserControl fileEditer = new FileEditerControl(_host, _shellData, webFile, true);
                _host.Ui.CreateNewTabPage("FileEdit", fileEditer);
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// 右键菜单编辑事件
 /// </summary>
 private void item_edit_Click(object sender, EventArgs e)
 {
     SelectedItemsStatus status = GetStatusOfSelectedItemsInListView();
     if (status == SelectedItemsStatus.IsFile)
     {
         string webFile = GetSelectedPathInListView(false);
         UserControl fileEditer = new FileEditerControl(_hostService, _shellData, webFile, true);
         _hostService.Gui.CreateNewTabPage("FileEdit", fileEditer);
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// 右键菜单创建文件事件
 /// </summary>
 private void item_createFile_Click(object sender, EventArgs e)
 {
     SelectedItemsStatus status = GetStatusOfSelectedItemsInListView();
     string newFile = GetSelectedDirPathInDirTree() + "NewFile.txt";
     UserControl fileEditer = new FileEditerControl(_hostService, _shellData, newFile, false);
     _hostService.Gui.CreateNewTabPage("FileEdit", fileEditer);
 }