c# Sistem Bilgilerini Gösterme ve yazdırma programı [Soner KOYLU] konusu, C# Dili forumunda tartışılıyor.
Konu ile alakalı etiketler:
c sistem bilgileri, c sistem bilgisi, c donanım bilgilerini, c systemmanagement, c ram bilgisi, soner köylü, csharp sistem programları, programla bilgisayar bilgilerini alma, csharp sistem bilgisi, csharp sistem bilgileri, csharp sistem bilgilerine, csharp sistem bilgilerini gösteren kod, c bilgileri gösterme, c da sistem bilgileri, c sistem bilgilerini gösteren program,
| Yeni Konu Aç Konuyu Cevapla |
|
|
LinkBack | Konu Araçları | Gösterim Biçimleri | Paylaş |
|
|
#1 |
![]() |
c# Sistem Bilgilerini Gösterme ve yazdırma programı [Soner KOYLU]
[Üye Olmadan Linkleri Göremezsiniz. ÜYE OLMAK iCiN TIKLAYIN...]
forumexe.com - c# Sistem Bilgilerini Gösterme ve yazdırma programı [Soner KOYLU] Uploaded with [Üye Olmadan Linkleri Göremezsiniz. ÜYE OLMAK iCiN TIKLAYIN...] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.Win32; using System.Net; using System.Management; using System.IO; using System.Drawing.Printing; namespace SistemBilgileri { public partial class frmSistemBilgileri : Form { public frmSistemBilgileri() { InitializeComponent(); } string cozunurluk; private static StreamReader dosyaAkimi; private void Form1_Load(object sender EventArgs e){ cozunurluk = SystemInformation.PrimaryMonitorSize.ToString().Re place("Width" "En").Replace("Height" "Boy") ;try { lblCozunurluk.Text += cozunurluk; lblMakinaAdi.Text += System.Net.Dns.GetHostName(); IPHostEntry _IPHostEntry = Dns.GetHostEntry(System.Net.Dns.GetHostName()); foreach (System.Net.IPAddress _IPAddress in _IPHostEntry.AddressList) { if (_IPAddress.AddressFamily.ToString() == "InterNetwork") { lblIpAdresi.Text += _IPAddress.ToString(); } } RegistryKey key = Registry.LocalMachine.OpenSubKey(@"HARDWARE\DESCRI PTION\System\CentralProcessor\0" false);lblIslemci.Text += " " + key.GetValue("ProcessorNameString").ToString(); //ekran kartı ManagementObjectSearcher arama = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController"); foreach (ManagementObject bilgi in arama.Get()) { lblEkran.Text += " " + bilgi["name"].ToString(); double d=(Math.Round(((((double)Convert.ToDouble(bilgi["AdapterRam"]) / 1024) / 1024) / 1024) 2));if (d >= 1) { lblEkran.Text += (Math.Round(((((double)Convert.ToDouble(bilgi["AdapterRam"]) / 1024) / 1024) / 1024) 2)) + " GB";} else { lblEkran.Text += (Convert.ToDouble(bilgi["AdapterRam"]) / 1048576).ToString() + " MB"; } } //hdd ManagementObjectSearcher mosDisks = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive"); foreach (ManagementObject moDisk in mosDisks.Get()) { lblHdd.Text += " " + (Math.Round(((((double)Convert.ToDouble(moDisk["Size"]) / 1024) / 1024) / 1024) 2)).ToString() + " GB";} //ram double totalCapacity = 0 toplamMb=0; ;ObjectQuery objectQuery = new ObjectQuery("select * from Win32_PhysicalMemory"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(objectQuery); ManagementObjectCollection vals = searcher.Get(); foreach (ManagementObject val in vals) { totalCapacity += (Convert.ToDouble(val.GetPropertyValue("Capacity") ) / 1073741824); toplamMb+=(Convert.ToDouble(val.GetPropertyValue(" Capacity")) / 1048576); } if (totalCapacity >= 1) { lblRam.Text += " " + totalCapacity.ToString() + " GB"; } else { lblRam.Text+=" " + toplamMb.ToString() + " MB"; } } catch { MessageBox.Show("Hata"); } } private void btnYazdir_Click(object sender EventArgs e){ if (txtDemirbas.Text.Length != 0) { FileStream fs= new FileStream(Application.StartupPath+@"\SistemBilgil eri.txt" FileMode.OpenOrCreate);StreamWriter sw = new StreamWriter(fs); sw.WriteLine(lblMakinaAdi.Text); sw.WriteLine(lblIpAdresi.Text); sw.WriteLine(lblSistem.Text); sw.WriteLine(lblIslemci.Text); sw.WriteLine(lblHdd.Text); sw.WriteLine(lblRam.Text); sw.WriteLine(lblEkran.Text); sw.WriteLine(lblCozunurluk.Text); sw.WriteLine("Demirbaş No: " + txtDemirbas.Text); sw.Close(); fs.Close(); dosyaAkimi = new StreamReader(Application.StartupPath+@"\SistemBilg ileri.txt"); PrintDocument PD = new PrintDocument(); PD.PrintPage += new PrintPageEventHandler(OnPrintDocument); try { PD.Print(); } catch { Console.WriteLine("Yazici çiktisi alinamiyor..."); } finally { PD.Dispose(); } } else { MessageBox.Show("Demirbaş No boş bırakılamaz !" "Uyarı" MessageBoxButtons.OK MessageBoxIcon.Err or);} } public static void OnPrintDocument(object sender PrintPageEventArgs e) { Font font = new Font("Verdana" 11) ; float yPozisyon = 0 ; int LineCount = 0 ; float leftMargin = e.MarginBounds.Left; float topMargin = e.MarginBounds.Top; string line=null; float SayfaBasinaDusenSatir = e.MarginBounds.Height / font.GetHeight() ; while (((line=dosyaAkimi.ReadLine()) != null) && LineCount < SayfaBasinaDusenSatir) { yPozisyon = topMargin + (LineCount * font.GetHeight(e.Graphics)); e.Graphics.DrawString (line font Brushes.Black leftMargin yPozisyon); LineCount++; } if (line == null) { e.HasMorePages = false ; } else { e.HasMorePages = true ; } } private void frmSistemBilgileri_DoubleClick(object sender EventArgs e){ MessageBox.Show("Bu program Kardelen yazılım adına Soner KÖYLÜ tarafından yazılmıştır." "Bilgi" MessageBoxButtons.OK Message BoxIcon.Information);} } } Uyarı : System.Management referansını ekleyiniz. Programın tüm hakları bana aittir. |
| Teşekkür edenler: AdamEray (16-11-11) |
Kalem Nickli Üyenin Son 5 Konusu
|
|||||
| Konu | Forum | Son Cevaplayan | Cevaplar | Gösterim | Cevap Tarihi |
|
|
Delphi | LaNCaSTeR | 1 | 326 | 13-12-11 16:38 |
|
|
Delphi | Kalem | 0 | 125 | 13-12-11 09:24 |
|
|
C# Dili | Kalem | 0 | 351 | 16-11-11 13:55 |
|
|
C# Dili | Kalem | 0 | 513 | 13-11-11 10:03 |
|
|
C# Dili | Kalem | 1 | 395 | 31-10-11 12:06 |
| FoRuMeXe.CoM'a Hoşgeldiniz ...! |
![]() Forumexe.com Ziyaretçisi; Sitemizden faydalanmak için TIKLAYINIZ Üye Olursanız Bu Yazılar ile Karşılaşmayacaksınız.. Üye Olmak İçin TIKLAYIN Kapatmak için Tıklayınız.! |
| Yeni Konu Aç Konuyu Cevapla |
| Konu Araçları | |
| Gösterim Biçimleri | |
|
|
Benzer Konular : c# Sistem Bilgilerini Gösterme ve yazdırma programı [Soner KOYLU]
|
||||
|
BurnAware Professional v4.0 Final (Profesyonel CD/DVD Yazdırma Programı) http://img683.imageshack.us/img683/9462/20110728214518.jpg BurnAware Professional v4.0 Final (Profesyonel CD/DVD Yazdırma Programı) ... |
||||
|
BurnAware Professional v3.3.1 (Profesyonel CD/DVD Yazdırma Programı) http://i239.photobucket.com/albums/ff4/sadecegircom/Warezmaster/BurnAware_Professional.jpg Profesyonel bir disk yakma programı arıyorsanız... |
||||
|
CDRWIN v9.0.11.304 (CD/DVD Yazdırma Programı) http://www.imagestr.net/images/80488125785202742406.jpg CDRWIN v9.0.11.304 | 20 MB İyi bilinen bir adın altında yepyeni bir yazma programı.... |
||||
|
Iso Burner Portable, en basit imaj yazdırma programı http://img38.imageshack.us/img38/3017/iconentry4.png ISO Burner ile kolay bir şekilde iso uzantılı dosyalarınızı CD/DVD veya Blu-Ray disklere... |
||||
|
ISO Uzantılı Dosyaları Yazdırma Programı Active ISO Burner 2.0 ISO Uzantılı Dosyaları Yazdırma Programı Active ISO Burner 2.0 ISO uzantılı dosyalarınızı yazdırmak için kullanabileceğiniz çok küçük bir... |
||||