public void toolStripMenuItem_Reboot_Click(object sender, EventArgs e) { OpeInfoTable.GetInstance().UnregisterAllOpeToHotKey(Window.GetHWnd()); //OpeScript.GetInstance().CloseLua(); System.Diagnostics.Process.Start(Application.ResourceAssembly.Location); Application.Current.Shutdown(); }
public MainSettingWindow() { InitializeComponent(); dgOpeList.DataContext = OpeInfoTable.GetInstance(); _LLKeyboardProc = new KeyboardHook.LowLevelKeyboardProc(LLKeyboardProc); hHandle = KeyboardHook.SetHook(_LLKeyboardProc); }
private void CloseWithOK() { UnregisterHotkeys(); OpeInfoTable.GetInstance().Save(); OpeScript.GetInstance().Initialize(); MyHide(); }
private void btnEditScript_Click(object sender, RoutedEventArgs e) { DataGridRow curt_row = VisualTreeUtil.FindParent <DataGridRow>(sender as DependencyObject); int idx = int.Parse((dgOpeList.Columns[0].GetCellContent(curt_row) as TextBlock).Text); ScriptSettingWindow script_setting_window = new ScriptSettingWindow(OpeInfoTable.GetInstance().GetRowById(idx)); script_setting_window.Owner = this; script_setting_window.ShowDialog(); }
private void CloseWithCancel() { UnregisterHotkeys(); OpeInfoTable.GetInstance().RollBackBeforeEditing(); // Update reference. dgOpeList.DataContext = OpeInfoTable.GetInstance(); dgOpeList.Items.Refresh(); OpeScript.GetInstance().Initialize(); MyHide(); }
private void StopSimulation() { grdDebugSet.Visibility = Visibility.Hidden; GridLengthConverter gridLengthConverter = new GridLengthConverter(); RDefSim.Height = (GridLength)gridLengthConverter.ConvertFrom("0"); MakeEnableDgOpeList(); OpeScript.GetInstance().Initialize(); OpeInfoTable.GetInstance().UnregisterAllOpeToHotKey(GetHWnd()); btnSimulation.IsChecked = false; }
private void StartSimulation() { MakeDisenableDgOpeList(); RowDefinition row_def = new RowDefinition(); GridLengthConverter gridLengthConverter = new GridLengthConverter(); RDefSim.Height = (GridLength)gridLengthConverter.ConvertFrom("1*"); grdDebugSet.Visibility = Visibility.Visible; OpeScript.GetInstance().Initialize(TbxOutput); OpeInfoTable.GetInstance().RegisterAllOpeToHotKey(GetHWnd()); btnSimulation.IsChecked = true; }
public static int GetNextHighestPriority() { int max_priority = 0; foreach (DataRow r in OpeInfoTable.GetInstance().Rows) { if (r["HotKeyObject"] is ComboKey) { int tmp = ((ComboKey)r["HotKeyObject"]).Priority; if (tmp > max_priority) { max_priority = tmp; } } } return(max_priority + 1); }
private void ThreadPreprocessMessageMethod(ref MSG msg, ref bool handled) { const int WM_HOTKEY = 0x0312; switch (msg.message) { case WM_HOTKEY: int id = msg.wParam.ToInt32(); int combo_id; if (ComboKey.FindComboToFire(id, out combo_id)) { OpeInfoTable.GetInstance().DoOpeScript(combo_id); } else { OpeInfoTable.GetInstance().DoOpeScript(id); } handled = true; break; } }
private void OpenSetting() { OpeInfoTable.GetInstance().UnregisterAllOpeToHotKey(Window.GetHWnd()); Window.MyShow(); }
public void toolStripMenuItem_Exit_Click(object sender, EventArgs e) { OpeInfoTable.GetInstance().UnregisterAllOpeToHotKey(Window.GetHWnd()); //OpeScript.GetInstance().CloseLua(); Application.Current.Shutdown(); }
private void UnregisterHotkeys() { OpeInfoTable.GetInstance().UnregisterAllOpeToHotKey(GetHWnd()); }
private void btnAdd_Click(object sender, RoutedEventArgs e) { OpeInfoTable.GetInstance().AddRowAsDefault(); }