.


:




:

































 

 

 

 





 

 

4.2

 

Net Framework

System - , URI URI URI.

System.Collections.Generic - , , , .

System.Drawing - , GDI +. , , , ' . , .

System.ComponentModel - , . , , ' .

System.Data - , ADO.NET. ADO.NET , .

System.Text - . .

System.Linq - , , LINQ (Language-Integrated Query).

 

System.Windows.Forms - Windows, , Microsoft Windows.

System.IO - , , , , , , , , ' , 䳿 , .

.NetFramework

.NetFramework . ( ). , , .

FileInfo - FileInfo , , , , , , .

³:

{

fileinf = new FileInfo (openFileDialog1.FileName);

update_fname_info (fileinf.Name);

label2.Visible = true;

label2.Text = " : \ n"

+ ":" + fileinf.Length.ToString () + "\n"

+ ":" + fileinf.CreationTime.ToString ()

+ "\ n:" + fileinf.LastWriteTime.ToString ()

+ "\ n³:" + fileinf.LastAccessTime.ToString ();

:

Form3 form_rename = Form3 (); // 3 -

form_rename.textBox1.Text = fileinf.Name;

form_rename.ShowDialog (); //

if (form_rename.change_name == ) // , '

{

try

{ fileinf.MoveTo(fileinf.DirectoryName+@"\"+form_rename.textBox1.Text);

update_fname_info (fileinf.Name); //

}

:

if (check_exists (fileinf.FullName))

{

if (folderBrowserDialog1.ShowDialog () == DialogResult.OK)

{

fileinf.MoveTo (folderBrowserDialog1.SelectedPath + @ "\" + fileinf.Name);

MessageBox.Show (" " + folderBrowserDialog1.SelectedPath.ToString ());

}

:

if (check_exists (fileinf.FullName))

{

if (folderBrowserDialog1.ShowDialog () == DialogResult.OK)

{

fileinf.CopyTo (folderBrowserDialog1.SelectedPath + @ "\" + fileinf.Name);

MessageBox.Show (" " + folderBrowserDialog1.SelectedPath.ToString ());

TextReader - , .

TextReader , StreamReader, .

StreamReader .

TextReader reader = new StreamReader (fileinf.OpenRead ()); // '

while (true)

{

cur_line = reader.ReadLine (); // 1

if (cur_line! = NULL) //

{

str_have_sym = false;

for (INT I = 0; i <cur_line.Length; i++)

{

sym_all ++; //

1. Exception - , .

2. File - , , , , .

, , File, FileInfo.

:

Exists .

: System.IO;

:

: System.Boolean;

true, path , - false.

MessageBox.Show - ³ , .

 

: System.Windows;

:

: System.String;

String, .

:

: System.Windows.MessageBoxResult

MessageBoxResult, , .

Update_fname_info - , . .

, .

Public void update_fname_info (string fname)

{

string tmp_fname = fileinf.Name;

if (tmp_fname.Length> 25)

{

tmp_fname = tmp_fname.Substring (0, 25);

}

Label1.Text = " :\n" + tmp_fname;

if (fileinf.Extension == ".txt")

{

button5.Enabled = true;

}

else

{

button5.Enabled = false;

. 25- . . , ".txt" .

Substring - , ᒺ String.

:

- '. ֳ ( ), .

ʳ - '. ֳ ( ), . ϳ , , .

, .

:

tmp_fname = tmp_fname.Substring (0, 25);

ShowDialog - ³ .

: System.Windows.Forms;

:

: System.Windows.Forms.DialogResults;

DialogResults.

Refresh - - ' .

ToString - .

: System;

:

: System.String;

.

:

: System.String;

, .

ReadLine - ;

: System.IO;

 

: System.String;

id Nothing, .

Close - ;

: System.Data.

 

 


1. Myfreemanager.exe

2. ϳ "³ ". 5.1

5.1 - ³ Myfreemanager

 

3. . ' - ' , ' .

4. ' : " ", "", "", "", *.txt " *.txt-" .

5. : , , , .

 

ϳ "³ ", ' .

6. " " , . " ". 5.2.

5.2

 

7. , *.txt, , , , , " *.txt-". 5.3

5.3 -

 

8. "".

ϳ ' . , "".

' - ' , '. 5.4 5.5.

5.4

 

5.5 -

 

9. "". ϳ ' , . " ", . 5.6.

5.6 -

10. "". ϳ ' , . " ", . - ' : "³" - , " - " "" - . 5.7.

5.7

 

11. - "³ ".

12. - .

 

 

 

Windows 10. ϳ : , , , , '. 䳺 .

, .

, , , .

Windows . , :

1. "NTFS", , , , .

2. , .NET Framework, C #.

3. .

4. .

5. , WinAPI, .

6. , , - .






:


: 2016-12-17; !; : 332 |


:

:

.
==> ...

1882 - | 1675 -


© 2015-2024 lektsii.org - -

: 0.041 .