Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._this = ((WpfApplication1.Pages.RAMPage)(target));
                return;

            case 2:
                this.PhMemory = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.CompMemoryLoad = ((WpfApplication1.circularbar.MyBar)(target));
                return;

            case 4:
                this.CompMemoryAv = ((WpfApplication1.circularbar.MyBar)(target));
                return;
            }
            this._contentLoaded = true;
        }