//생성 후, showscreen 레퍼런스를 넣는다.
        public void addShowScreenReference(ShowScreen showscreen)
        {
            if (this.showscreen != null)
                this.showscreen = null;

            this.showscreen = showscreen;
        }
Beispiel #2
0
        public Sign(int xPos, int yPos, ShowScreen showscreen, Datas datas)
        {
            this.datas = datas;
            this.screen = showscreen;

            //생성
            imgrec = new Grid();
            imgrec.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            imgrec.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            imgrec.Width = 95; imgrec.Height = 202;
            imgrec.Margin = new Thickness(xPos, yPos, 0, 0);
            screen.sp.Children.Add(imgrec);

            changeSign();
        }
        //위 sayaboutCom에서 작동할 스레드
        public static void sayaboutComThread(ShowScreen screen, Namyong namyong)
        {
            //WMIhandler에 있는 RAM 계산 함수를 작동시켜서 정보를 얻고, 그 스레드를 기다리자
            Thread thrRAMWMI = new Thread(() => WMIhandler.initialRAMdata(screen.getMWinReference().getDatasReference()));
            thrRAMWMI.Start();

            thrRAMWMI.Join();
            screen.getMWinReference().Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate
            {
                namyong.balloon.setMSG("현재 사용가능한 RAM 용량은 " + screen.getMWinReference().getDatasReference().getUsableRAM() + "에요.");
                namyong.isComputingRAM = false;
            }));
        }
Beispiel #4
0
        //위 sayaboutCom에서 작동할 스레드
        public static void sayaboutComThread(ShowScreen screen, Daddy daddy)
        {
            //WMIhandler에 있는 RAM 계산 함수를 작동시켜서 정보를 얻고, 그 스레드를 기다리자
            Thread thrCPUWMI = new Thread(() => WMIhandler.getCPUdata(screen.getMWinReference().getDatasReference()));
            thrCPUWMI.Start();

            thrCPUWMI.Join();
            screen.getMWinReference().Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate
            {
                daddy.balloon.setMSG("CPU 사용량 : " + screen.getMWinReference().getDatasReference().getCPUusage() + ", IL CPU 사용량 : "
                    + screen.getMWinReference().getDatasReference().getMyProcessCPU());
                daddy.isComputingCPU = false;
            }));
        }