Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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}");
            }
        }
Ejemplo n.º 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
            }
        }