///<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"); } } }
///<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"); } } }
public void Load() { GrindingSettings.LoadSettings(); var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; if (!string.IsNullOrEmpty(GrindingSettings.Profile) && File.Exists(GrindingSettings.Profile)) { CurrentProfile = new PathProfile(); CurrentProfile.LoadNoDialog(GrindingSettings.Profile); } else { CurrentProfile = null; Logging.Write(LogType.Error, "Could not load a valid grinding profile"); } }
public void Load() { GrindingSettings.LoadSettings(); var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; if (!string.IsNullOrEmpty(GrindingSettings.Profile) && File.Exists(GrindingSettings.Profile)) { CurrentProfile = new PathProfile(); CurrentProfile.LoadNoDialog(GrindingSettings.Profile); } else { CurrentProfile = null; Logging.Write(LogType.Error, "Could not load a valid grinding profile"); } }