1. Select the folder in the path to the textbox
2. The traverse all files folder
3. If combox choice. TXT or. XLS
Get all the suffix for. TXT or. XLS
4. Get textbox2 text input from the keyboard in
From access to all the. TXT or. XLS text extract in the text and text output open
CodePudding user response:
Requirements set very clear step by step to write bai first and then build a form program has a textbox textbox2 and a Combobox plus a few test button,,,, meet don't know what to write step by step in accordance with the requirements baidu this thing is not difficult
CodePudding user response:
Must learn down related knowledge, control set, the Directory/FileStream, more troublesome when the final description of the function,
CodePudding user response:
reference 1st floor OrdinaryCoder response: requirements set very clear step by step to write bai first and then build a form program has a textbox textbox2 and a Combobox to add a few test button,,,, meet don't know what to write step by step in accordance with the requirements baidu this thing is not difficult to Basis to learn, and finally determine don't know where to begin CodePudding user response:
This is you want to hand in your homework CodePudding user response:
reference 4 floor WXMTGG response: what are you want to hand in your homework Yes, I feel I don't know how to start CodePudding user response:
https://pan.baidu.com/s/1WA6QK411sVvKnL3s9DRlvg It is ok to change Public partial class Form1: Form { Public static class getIcon { [DllImport (" Shell32. DLL)] The static extern int SHGetFileInfo (string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, int cbFileInfo, uint uFlags); Struct SHFILEINFO { Public IntPtr hIcon; Public int iIcon; Public int dwAttributes; Public char szDisplayName; Public char szTypeName; } The static public Icon GetFileIcon (string fileName, bool smallIcon) { SHFILEINFO fi=new SHFILEINFO (); Icon IC=null; Int iTotal=(int) SHGetFileInfo (fileName, 100, ref fi, 0, (uint) (smallIcon? 273:272)); If (iTotal & gt; 0) { IC=Icon. FromHandle (fi. HIcon); } The return of IC; } } Public class TreeViewEx: TreeView { Protected override void OnHandleCreated (EventArgs e) { SendMessage (this Handle, TVM_SETEXTENDEDSTYLE, IntPtr TVS_EX_DOUBLEBUFFER, IntPtr TVS_EX_DOUBLEBUFFER); Base. OnHandleCreated (e); } Private const int TVM_SETEXTENDEDSTYLE=0 x1100 + 44; Private const int TVM_GETEXTENDEDSTYLE=0 x1100 + 45; Private const int TVS_EX_DOUBLEBUFFER=0 x0004; [DllImport (" user32. DLL)] Private static extern IntPtr SendMessage (IntPtr hWnd, int MSG, IntPtr wp, IntPtr lp); } Public class ListViewEx: ListView { Public ListViewEx () { SetStyle (ControlStyles. DoubleBuffer | ControlStyles. OptimizedDoubleBuffer | ControlStyles. AllPaintingInWmPaint, true); UpdateStyles (); } } TreeViewEx treeView1; ListViewEx listView1; Public static int BrowNumber=0, BrowRecord=0, AssNumber=0; Public class RecordBrow { Public string Dir_Name; Public RecordBrow (string _name) { Dir_Name=_name; BrowNumber +=1; } } Public static List RecordBrows=new List (a); Public class FileAssociated { Public int Id; Public string AssociatedType; Public Bitmap AssociatedIcon; Public FileAssociated (int _id, string _type, Bitmap _icon) { Id=_id. AssociatedType=_type; AssociatedIcon=_icon; } } Public static List FileAssociateds=new List (a); Public class DirectoryFile { Public string Fullname; Public string DFname; Public string DFtype; Public int DFicon; Public string DFtime; Public long DFsize; Public int DFflag; Public DirectoryFile (string _full, string _name, string _type, int _icon, string _time, long _size, int _flag) { Fullname=_full; DFname=_name; DFtype=_type; DFicon=_icon; DFtime=_time; DFsize=_size; DFflag=_flag; } } Public static List DirectoryFiles=new List (a); Public _click () { InitializeComponent(); TreeView1=new TreeViewEx () { ItemHeight=22, Size=new Size (376, 546), Location=new Point (12, 41), The Font=new Font (" Microsoft black ", 9), ImageList=imageList1, ShowLines=false, ShowRootLines=false, ShowPlusMinus=false, }; TreeView1. NodeMouseClick +=treeView1_NodeMouseClick; This. Controls. The Add (treeView1); ListView1=new ListViewEx () { Size=new Size (515, 547), Location=new Point (442, 40), The Font=new Font (" Microsoft black ", 9), View=View. The Details, GridLines=false, SmallImageList=imageList2, FullRowSelect=true, }; ListView1. Columns. The Add (" name ", 120, the HorizontalAlignment. Left); ListView1. Columns. The Add (" file type ", 120, the HorizontalAlignment. Left); nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull