Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. // odpre dialog box ze takoj ko kliknem in ko nekaj izberem gre notr v if
  2.             if (openFileDialog1.ShowDialog() == DialogResult.OK)
  3.             {  
  4.                 // TextReader pac za branje fajla
  5.                 TextReader tr = new StreamReader(openFileDialog1.FileName);
  6.  
  7.                 // preberm vse iz fajla
  8.                 string vse = tr.ReadToEnd();
  9.                
  10.                 // zaprem text reader
  11.                 tr.Close();
  12.  
  13.                 // ustvarm clanek in not vrzem v richtextbox ta string
  14.                 Clanek clanek = new Clanek();
  15.                 clanek.MdiParent = this;
  16.                
  17.                 // WOOT?
  18.                 clanek.Show();
  19.                
  20.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement