private void InitValues() { item_diskTime = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_responseTime = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_readSpeed = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_writeSpeed = new PerformanceInfos.PerformanceInfoSpeicalItem(); StringBuilder sb = new StringBuilder(32); NativeMethods.MPERF_GetDisksPerformanceCountersInstanceName(currDisk, sb, 32); currDiskName = sb.ToString(); performanceTitle1.Title = LanuageMgr.GetStr("TitleDisk") + currDiskName; performanceTitle1.SmallTitle = ""; item_diskTime.Name = LanuageMgr.GetStr("ActiveTime"); item_responseTime.Name = LanuageMgr.GetStr("QueueTime"); item_readSpeed.LineSp = true; item_readSpeed.Name = LanuageMgr.GetStr("ReadSpeed"); item_writeSpeed.Name = LanuageMgr.GetStr("WriteSpeed"); item_readSpeed.DrawFrontLine = true; item_readSpeed.FrontLineIsDotted = true; item_readSpeed.FrontLineColor = Main.MainPagePerf.DiskDrawColor; item_writeSpeed.DrawFrontLine = true; item_writeSpeed.FrontLineColor = Main.MainPagePerf.DiskDrawColor; performanceInfos.FontTitle = new Font("Microsoft YaHei UI", 9); performanceInfos.SpeicalItems.Add(item_diskTime); performanceInfos.SpeicalItems.Add(item_responseTime); performanceInfos.SpeicalItems.Add(item_readSpeed); performanceInfos.SpeicalItems.Add(item_writeSpeed); performanceGridSpeed.RightText = NativeMethods.FormatFileSizeKBUnit(lastMaxSpeed) + "/" + LanuageFBuffers.Str_Second; performanceGridSpeed.MaxValue = 100; performanceGridSpeed.DrawData2 = true; }
public void PageInit() { maxpySpeed = (uint)(physicalMaxSpeed / 1024); maxSpeedOverflow = (uint)(physicalMaxSpeed * 0.76 / 1024); performanceTitle.Title = currNetIsWifi ? "Wi-Fi" : LanuageMgr.GetStr("Ethernet"); performanceTitle.SmallTitle = currNetName; item_readSpeed = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_writeSpeed = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_writeSpeed.LineSp = true; item_readSpeed.Name = LanuageMgr.GetStr("Send"); item_writeSpeed.Name = LanuageMgr.GetStr("Receive"); item_readSpeed.DrawFrontLine = true; item_readSpeed.FrontLineColor = Main.MainPagePerf.NetDrawColor; item_readSpeed.FrontLineIsDotted = true; item_writeSpeed.DrawFrontLine = true; item_writeSpeed.FrontLineColor = Main.MainPagePerf.NetDrawColor; performanceGrid.MaxValue = 100; performanceGrid.DrawData2 = true; performanceGrid.MaxUnitPen = new Pen(Main.MainPagePerf.NetDrawColor); performanceInfos.FontTitle = new Font("Microsoft YaHei UI", 9); performanceInfos.SpeicalItems.Add(item_readSpeed); performanceInfos.SpeicalItems.Add(item_writeSpeed); if (currNetIsWifi) { performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("AdapterName"), "WALN")); if (MWLAN_CanUse() && GUID != "") { int bssPhyType = 0; StringBuilder outSsidName = new StringBuilder(64); if (MWLAN_GetAdapterWLANInformation(GUID, ref outLinkQuality, outSsidName, 64, ref bssPhyType)) { performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("ConnectionType"), GetWlanConType(bssPhyType))); performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem("SSID", outSsidName.ToString())); } } } else { performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("AdapterName"), currNetName)); performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("ConnectType"), performanceTitle.Title)); } performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("IPV4"), v4)); performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("IPV6"), v6)); if (currNetIsWifi) { performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("LinkQuality"), GetWlanLinkQualityIcon(outLinkQuality))); } }
public void PageInit() { contextMenuStrip.Renderer = new Helpers.ClassicalMenuRender(Handle); item_ramuseage = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_ramcanuse = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_sended = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_cached = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_pagepool = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_nopagepool = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_ramuseage.Name = LanuageMgr.GetStr("MemUsing"); item_ramcanuse.Name = LanuageMgr.GetStr("MenCanUse"); item_sended.LineSp = true; item_sended.Name = LanuageMgr.GetStr("Submited"); item_cached.Name = LanuageMgr.GetStr("Cached"); item_pagepool.LineSp = true; item_pagepool.Name = LanuageMgr.GetStr("PagedPool"); item_nopagepool.Name = LanuageMgr.GetStr("NonPagedPool"); performanceInfos.SpeicalItems.Add(item_ramuseage); performanceInfos.SpeicalItems.Add(item_ramcanuse); performanceInfos.SpeicalItems.Add(item_sended); performanceInfos.SpeicalItems.Add(item_cached); performanceInfos.SpeicalItems.Add(item_pagepool); performanceInfos.SpeicalItems.Add(item_nopagepool); all_ram = MSystemMemoryPerformanctMonitor.GetAllMemory(); performanceGridGlobal.RightText = FormatFileSize(all_ram); DeviceApi.MDEVICE_GetMemoryDeviceInfo(); performanceTitle.SmallTitle = Marshal.PtrToStringUni(DeviceApi.MDEVICE_GetMemoryDeviceName()); performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("Speed"), DeviceApi.MDEVICE_GetMemoryDeviceSpeed().ToString() + " MHz")); performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("FormFactor"), DeviceApi.MDEVICE_MemoryFormFactorToString(DeviceApi.MDEVICE_GetMemoryDeviceFormFactor()) )); UInt16 used = 0, all = 0; if (DeviceApi.MDEVICE_GetMemoryDeviceUsed(ref all, ref used)) { performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("DeviceLocator"), used + "/" + all)); } fTipVauleFree = LanuageMgr.GetStr("MemTipFree"); fTipVauleModified = LanuageMgr.GetStr("MemTipModifed"); fTipVauleStandby = LanuageMgr.GetStr("MemTipStandby"); fTipVauleUsing = LanuageMgr.GetStr("MemTipUsing"); }
private void InitRuntimeInfo() { item_cpuuseage = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_cpuuseage.Name = LanuageMgr.GetStr("Useage"); item_cpuuseage_freq = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_cpuuseage_freq.Name = ""; item_cpuuseage_freq.Value = " "; item_process_count = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_process_count.Name = FormMain.str_proc_count; item_thread_count = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_thread_count.Name = LanuageMgr.GetStr("ThreadCount"); item_handle_count = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_handle_count.Name = LanuageMgr.GetStr("HandleCount"); item_run_time = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_run_time.Name = LanuageMgr.GetStr("RunTime"); performanceInfos.SpeicalItems.Add(item_cpuuseage); performanceInfos.SpeicalItems.Add(item_cpuuseage_freq); performanceInfos.SpeicalItems.Add(item_process_count); performanceInfos.SpeicalItems.Add(item_thread_count); performanceInfos.SpeicalItems.Add(item_handle_count); performanceInfos.SpeicalItems.Add(item_run_time); }
public void PageInit() { performanceTitle.Title = currNetIsWifi ? "Wi-Fi" : LanuageMgr.GetStr("Ethernet"); performanceTitle.SmallTitle = currNetName; item_readSpeed = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_writeSpeed = new PerformanceInfos.PerformanceInfoSpeicalItem(); item_writeSpeed.LineSp = true; item_readSpeed.Name = FormMain.str_Sent; item_writeSpeed.Name = FormMain.str_Receive; item_readSpeed.DrawFrontLine = true; item_readSpeed.FrontLineColor = FormMain.NetDrawColor; item_readSpeed.FrontLineIsDotted = true; item_writeSpeed.DrawFrontLine = true; item_writeSpeed.FrontLineColor = FormMain.NetDrawColor; performanceGrid.MaxValue = 100; performanceGrid.DrawData2 = true; performanceGrid.MaxUnitPen = new Pen(FormMain.NetDrawColor); performanceInfos.FontTitle = new Font("Microsoft YaHei UI", 9); performanceInfos.SpeicalItems.Add(item_readSpeed); performanceInfos.SpeicalItems.Add(item_writeSpeed); if (currNetIsWifi) { performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("AdapterName"), "WALN")); } else { performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("AdapterName"), currNetName)); performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("ConnectType"), performanceTitle.Title)); } performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("IPV4"), v4)); performanceInfos.StaticItems.Add(new PerformanceInfos.PerformanceInfoStaticItem(LanuageMgr.GetStr("IPV6"), v6)); }