public Fan_Control(string currentDesiredSpeed, string variableSpeed, string currentSpeed)
 {
     this.variableSpeed       = variableSpeed;
     this.currentDesiredSpeed = currentDesiredSpeed;
     this.currentSpeed        = currentSpeed;
     hardware = new HardwareData();
     InitializeComponent();
 }
示例#2
0
 public MainForm()
 {
     runFlag  = true;
     hardware = new HardwareData();
     InitializeComponent();
     timer1.Tick    += new EventHandler(timer_Tick); // Everytime timer ticks, timer_Tick will be called
     timer1.Interval = (5000) * (1);                 // Timer will tick evert second
     timer1.Enabled  = true;                         // Enable the timer
     timer1.Start();                                 // Start the timer
 }
示例#3
0
        private void loadCompTab(object sender, EventArgs e)
        {
            string[] item         = { "CPU", HardwareData.GetProcessorName() };
            var      listViewItem = new ListViewItem(item);

            listView1.Items.Add(listViewItem);
            listView1.Columns[1].Width = item[1].Length * 6;

            item[0]      = "System";
            item[1]      = HardwareData.GetMachineName();
            listViewItem = new ListViewItem(item);
            listView1.Items.Add(listViewItem);

            item[0]      = "?";
            item[1]      = HardwareData.GetMachineNameDefault();
            listViewItem = new ListViewItem(item);
            listView1.Items.Add(listViewItem);
        }