示例#1
0
 private void HandleMiniChartDoubleClick(object sender, EventArgs e)
 {
     if (ModifierKeys.HasFlag(Keys.Control))
     {
         FormBorderStyle = (FormBorderStyle == FormBorderStyle.Sizable) ? FormBorderStyle.None : FormBorderStyle = FormBorderStyle.Sizable;
         _mouseHandler   = new MouseMessageFilter(Handle);
         Application.AddMessageFilter(_mouseHandler);
     }
     else
     {
         _miniChart.Restart();
         Application.RemoveMessageFilter(_mouseHandler);
         _mouseHandler = null;
     }
 }
示例#2
0
        public MachineInfo()
        {
            InitializeComponent();

            Snapshot();

            _mouseHandler = new MouseMessageFilter(Handle);
            Application.AddMessageFilter(_mouseHandler);

            _timer.Interval  = 1000;
            _timer.Tick     += HandleTimerTick;
            w_prgPhy.Minimum = w_prgPageFile.Minimum = w_prgCpu.Minimum = 0;
            w_prgPhy.Maximum = w_prgPageFile.Maximum = w_prgCpu.Maximum = 100;

            w_prgProc1.Minimum = w_prgProc2.Minimum = w_prgProc3.Minimum = 0;
            w_prgProc1.Maximum = w_prgProc2.Maximum = w_prgProc3.Maximum = 100;
        }