void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this._this = ((WpfApplication1.Pages.GPUPage)(target)); return; case 2: this.GpuName = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.TempGpu = ((WpfApplication1.circularbar.MyBar)(target)); return; case 4: this.x1 = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.x2 = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.x3 = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
public MainViewModel() { synth = new SpeechSynthesizer(); synth.SelectVoiceByHints(VoiceGender.Male); synth.Rate = 4; cpuPage = new Pages.CPUPage(); mainPage = new Pages.MainPage(); ramPage = new Pages.RAMPage(); gpuPage = new Pages.GPUPage(); cpuPage.CpuInCriticalTemperature += CpuPage_CpuInCriticalTemperature; ramPage.RamLowMemory += RamPage_RamLowMemory; gpuPage.GpuCriticalTemperature += GpuPage_GpuCriticalTemperature; current = mainPage; mainSelected = "LightGray"; timer = GetTimer(1); timer.Tick += Timer_Tick; timer.Start(); timerForLog = GetTimer(10); timerForLog.Tick += TimerForLog_Tick; timerForLog.Start(); }