Exemplo n.º 1
0
        void vmiThread_updateEvent(object sender, procVMinfoEventArgs eventArgs)
        {
            StringBuilder sb = new StringBuilder();

            //keep track of updated panels and clear empty ones!
            bool[] bBarEmpty = new bool[33];
            for (int i = 0; i < 33; i++)
            {
                bBarEmpty[i] = true;
            }
            foreach (VMusage.procVMinfo vm in eventArgs.procVMlist)
            {
                if (!vm.name.EndsWith("empty"))
                {
                    sb.Append(vm.ToString() + "\r\n");
                    updateBar((int)vm.slot, vm.name, (int)vm.memusage);
                    bBarEmpty[(int)vm.slot] = false;
                }
            }

            for (int i = 1; i < 33; i++)    //do not touch bar 0
            {
                if (bBarEmpty[i])
                {
                    updateBar(i, "", 0);
                }
            }
            setText(sb.ToString());

            updateTotalMemBar();

            //int mPhys = (int)memorystatus.MemoryInfo.getTotalPhys() / 1000000;
            //setTitle("total=" + eventArgs.totalMemoryInUse.ToString() + "/" + mPhys.ToString());
            //updateBar(0, "total", (int)(eventArgs.totalMemoryInUse / 1000000));
        }
Exemplo n.º 2
0
 void onUpdateHandler(procVMinfoEventArgs procStats)
 {
     //anyone listening?
     if (this.updateEvent == null)
     {
         return;
     }
     this.updateEvent(this, procStats);
 }
Exemplo n.º 3
0
        void vmiThread_updateEvent(object sender, procVMinfoEventArgs eventArgs)
        {
            StringBuilder sb = new StringBuilder();
            //keep track of updated panels and clear empty ones!
            bool[] bBarEmpty = new bool[33];
            for (int i=0; i < 33; i++)
                bBarEmpty[i] = true;
            foreach (VMusage.procVMinfo vm in eventArgs.procVMlist)
            {
                if (!vm.name.EndsWith("empty"))
                {
                    sb.Append(vm.ToString() + "\r\n");
                    updateBar((int)vm.slot, vm.name, (int)vm.memusage);
                    bBarEmpty[(int)vm.slot] = false;
                }
            }

            for (int i = 1; i < 33; i++){   //do not touch bar 0
                if (bBarEmpty[i])
                    updateBar(i, "", 0);
            }
            setText(sb.ToString());

            updateTotalMemBar();

            //int mPhys = (int)memorystatus.MemoryInfo.getTotalPhys() / 1000000;
            //setTitle("total=" + eventArgs.totalMemoryInUse.ToString() + "/" + mPhys.ToString());
            //updateBar(0, "total", (int)(eventArgs.totalMemoryInUse / 1000000));
        }
Exemplo n.º 4
0
 void onUpdateHandler(procVMinfoEventArgs procStats)
 {
     //anyone listening?
     if (this.updateEvent == null)
         return;
     this.updateEvent(this, procStats);
 }