Пример #1
0
        private void RichTextBox2_KeyDown(object sender, KeyEventArgs e)
        {
            System.Windows.Input.KeyConverter keyConverter = new System.Windows.Input.KeyConverter();
            var str = keyConverter.ConvertToString(e.KeyCode);

            if (!IsNavigationEA(e))
            {
                e.Handled = true;
            }
            if (e.KeyCode == Keys.Back)
            {
                e.Handled = false;
            }
        }
Пример #2
0
        /// <summary>
        /// Attempt to fix any macros with broken descriptions.
        /// </summary>
        public void FixMacros()
        {
            // Fix any macros if they don't have descriptions
            try
            {
                var convert = new System.Windows.Input.KeyConverter();

                foreach (var macro in App.Settings.ProfileSettings.MacroList)
                {
                    if (string.IsNullOrWhiteSpace(macro.KeyDescription))
                    {
                        macro.KeyDescription = convert.ConvertToString(macro.Key);
                    }
                }
            }
            catch (Exception ex)
            {
                App.Conveyor.EchoError($"Error in FixMacros(): {ex.Message}");
            }
        }
Пример #3
0
        /// <summary>
        /// Attempt to fix any macros with broken descriptions.
        /// </summary>
        public void FixMacros()
        {
            // Fix any macros if they don't have descriptions
            try
            {
                var convert = new System.Windows.Input.KeyConverter();

                foreach (var macro in App.Settings.ProfileSettings.MacroList)
                {
                    if (string.IsNullOrWhiteSpace(macro.KeyDescription))
                    {
                        macro.KeyDescription = convert.ConvertToString(macro.Key);
                    }
                }
            }
            catch
            {
                // TODO - Error Logging
            }
        }