private void Form1_FormClosing(object sender, FormClosingEventArgs e) { hwh.CutLooseHardwareNotifications(this.Handle); hwh = null; Properties.Settings.Default.cb1 = cb_Custom.Checked; Properties.Settings.Default.cb2 = cb_DisableDevice.Checked; Properties.Settings.Default.cbox1 = cbx_DeviceList.SelectedIndex; Properties.Settings.Default.cbox2 = cbx_NetworkName.SelectedIndex; Properties.Settings.Default.radb1 = rbtn_StopProcess.Checked; Properties.Settings.Default.radb2 = rbtn_Firewall.Checked; Properties.Settings.Default.radb3 = rbtn_FirewallFriends.Checked; Properties.Settings.Default.txtbx3 = txb_GTADirectory.Text; Properties.Settings.Default.txtbx1 = txb_Custom.Text; Properties.Settings.Default.Save(); }
public DeviceDriverHelper() { hwh = new HH_Lib(); // 장치관리자 라이브러리관련 객체 생성 }
public void SetDeviceEnable(string devname, bool devbool) { HH_Lib hwh = new HH_Lib(); hwh.SetDeviceState(new string[] { devname, null }, devbool); }
//Name: Form1_FormClosing //Inputs: object, eventArgs //Outputs: none //Remarks: Whenever the form closes we need to unregister the // hardware notifier. Failure to do so could cause // the system not to release some resources. Calling // this method if you are not currently hooking the // hardware events has no ill effects so better to be // safe than sorry. private void Form1_FormClosing(object sender, FormClosingEventArgs e) { hwh.CutLooseHardwareNotifications(this.Handle); hwh = null; }
public Switcher() { InitializeComponent(); hwh = new HH_Lib(); hwh.GetAll(); }