///<summary> /// Call first ///</summary> public PathControl(PathProfile pathProfile) { InitializeComponent(); DoubleBuffered = true; GraphView.BringToFront(); _pathProfile = pathProfile; _pathLoadedThread = new Thread(LoadPath) { IsBackground = true }; _pathLoadedThread.Start(); if (LazySettings.SetupUseHotkeys) { _f7 = new Hotkey(); _f7.KeyCode = Keys.F7; _f7.Windows = false; _f7.Pressed += delegate { AddSpot(); }; try { if (!_f7.GetCanRegister(this)) { Logging.Write("Cannot register F7 as hotkey"); } else { _f7.Register(this); } } catch { Logging.Write("Cannot register F7 as hotkey"); } _f8 = new Hotkey(); _f8.KeyCode = Keys.F8; _f8.Windows = false; _f8.Pressed += delegate { AddNode(); }; try { if (!_f8.GetCanRegister(this)) { Logging.Write("Cannot register F8 as hotkey"); } else { _f8.Register(this); } } catch { Logging.Write("Cannot register F8 as hotkey"); } } }