private void LoadConfig() { try { Stream stream = File.Open("config.cfg", FileMode.Open); BinaryFormatter formatter = new BinaryFormatter(); keycode = (StaticKeyCode)formatter.Deserialize(stream); stream.Close(); } catch (Exception ex) { throw ex; } }
public MainForm() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; keycode = new StaticKeyCode(); }