예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Int64   phav            = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            Int64   tot             = PerformanceInfo.GetTotalMemoryInMiB();
            decimal percentFree     = ((decimal)phav / (decimal)tot) * 100;
            decimal percentOccupied = 100 - percentFree;

            textBox3.Text = ("Available Physical Memory (MiB) " + Convert.ToSByte(phav));
            textBox4.Text = ("Total Memory (MiB) " + Convert.ToSByte(tot));
            textBox1.Text = ("Free (%) " + Convert.ToSByte(percentFree));
            textBox2.Text = ("Occupied (%) " + Convert.ToSByte(percentOccupied));
        }
예제 #2
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            Int64   phav            = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            Int64   tot             = PerformanceInfo.GetTotalMemoryInMiB();
            decimal percentFree     = ((decimal)phav / (decimal)tot) * 100;
            decimal percentOccupied = 100 - percentFree;

            textBox3.Text = ("Available Physical Memory (MiB) " + phav.ToString());
            textBox4.Text = ("Total Memory (MiB) " + tot.ToString());
            textBox1.Text = ("Free (%) " + percentFree.ToString());
            textBox2.Text = ("Occupied (%) " + percentOccupied.ToString());
            FlushMemory();
            percentToolStripMenuItem.Text = percentFree.ToString() + " gb";
        }
예제 #3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            textBox12.Text = GetPathFromIsolatedStoragePath();
            textBox6.Text  = getCurrentCpuUsage();
            textBox7.Text  = getAvailableRAM();
            string OPSystemVersion = Environment.OSVersion.ToString();

            textBox8.Text = OPSystemVersion;
            Int64   phav            = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            Int64   tot             = PerformanceInfo.GetTotalMemoryInMiB();
            decimal percentFree     = ((decimal)phav / (decimal)tot) * 100;
            decimal percentOccupied = 100 - percentFree;

            textBox3.Text = ("Available Physical Memory (MiB) " + phav.ToString());
            textBox4.Text = ("Total Memory (MiB) " + tot.ToString());
            textBox1.Text = ("Free (%) " + percentFree.ToString());
            textBox2.Text = ("Occupied (%) " + percentOccupied.ToString());
            FlushMemory();
            percentToolStripMenuItem.Text = percentFree.ToString() + " gb";
            long workingSet = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64;

            textBox11.Text = workingSet.ToString();
            DriveInfo[]   myDrives = DriveInfo.GetDrives();
            StringBuilder sb       = new StringBuilder();

            foreach (DriveInfo drive in myDrives)
            {
                sb.AppendLine("Drive:" + drive.Name);
                sb.AppendLine("Drive Type:" + drive.DriveType);

                if (drive.IsReady == true)
                {
                    sb.AppendLine("Vol Label:" + drive.VolumeLabel);
                    sb.AppendLine("File System: " + drive.DriveFormat);
                }
            }
            richTextBox1.Text = (sb.ToString());
            // assemblyToolStripMenuItem1.Text = IsolatedStorageFile.GetEnumerator(IsolatedStorageScope.Assembly).ToString();
        }