04.09.2016 Views

download-pdf-ebooks.org-ku-8828

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

XmlDocument xmlDocument = new XmlDocument();<br />

xmlDocument.Load("File_path");<br />

StringWriter stringWriter = new StringWriter();<br />

XmlTextWriter xmlTextWriter = new XmlTextWriter(s<br />

tringWriter);<br />

xmlTextWriter.Formatting = Formatting.Indented;<br />

xmlDocument.WriteTo(xmlTextWriter);<br />

xmlTextWriter.Flush();<br />

Console.Write(stringWriter.ToString());<br />

}<br />

الكود السابع:‏ كود الشرٌط األخباري<br />

قم فً‏ البداٌة بوضع label1 فً‏ اسفل الفورم وضع األداة Timer وحدد الوقت فٌها والذي ‏ٌمثل سرعة تحرٌك<br />

الشرٌط ثم اكتب الكود التالً‏ فً‏ داخلها)‏ الكود للتحرٌك ‏ٌمٌنا وٌسارا أختر اي واحد منهم ترٌد وقم بوضعه داخل األداة<br />

//left to right<br />

label1.Left += 1;<br />

if (label1.Left == this.Width)<br />

{<br />

label1.Left = 0 - label1.Width;<br />

}<br />

//right to left<br />

label1.Left -= 1;<br />

if (label1.Left == (0 - label1.Width))<br />

{<br />

label1.Left = this.Width;<br />

}<br />

timer)<br />

الكود الثامن : األتصال مع قاعدة بٌانات Access 2010<br />

الوضع المنفصلmode Connectionless<br />

وسحب البٌانات منها بأستخدام<br />

string connectString = "Provider=Microsoft.ACE.OLEDB.12.0<br />

;Data Source=database_path";<br />

string qeuryString = "Select * from table_nam<br />

e";<br />

OleDbConnection connectObject = new OleDbConn<br />

6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!