Пример #1
0
        //イベント
        public CPU_Count_lab()
        {
            InitializeComponent();
            per = new performance();

            port_box.Text = "1000";
            conection     = false;

            cpu_lab.Text     = string.Format("{0}%", per.get_all_cpu());
            mem_max_lab.Text = string.Format("{0}MB", per.max_mem());
            mem_use_lab.Text = string.Format("{0}MB", per.get_use_mem());

            tick_timer.Enabled = true;
        }
Пример #2
0
        //イベント
        public CPU_Count_lab()
        {
            InitializeComponent();
            per = new performance();

            port_box.Text = "1000";
            conection = false;

            cpu_lab.Text = string.Format("{0}%", per.get_all_cpu());
            mem_max_lab.Text = string.Format("{0}MB", per.max_mem());
            mem_use_lab.Text = string.Format("{0}MB", per.get_use_mem());

            tick_timer.Enabled = true;
        }
Пример #3
0
        private void listen()
        {
            tcp.listen();
            string str;

            str = string.Format("{0},{1},0", per.cpu_count(), per.max_mem());

            tcp.send(str);
            bool ok = false;

            while (!ok)
            {
                if (tcp.recive() == "OK")
                {
                    ok = true;
                }
            }

            network_status_lab.Text = "接続完了";
            conection = true;
        }