Analyzes a journal fine to get the most popular keyboard shortcuts and commands Author: Rod Howarth http://www.rodhowarth.com
        private void btnStartAnalysis_Click(object sender, EventArgs e)
        {
            KeyboardShortcutAnalyzer analyzer = new KeyboardShortcutAnalyzer(this.txtJournalFile.Text, this.txtShortcutsFile.Text);

            IEnumerable<string> topShortcuts = analyzer.GetTopShortcutsUsed();
            IEnumerable<string> topCommands = analyzer.GetTopRibbonCommandsUsed(this.chkbIncludeContext.Checked);

            string outputMessage = "";
            foreach (string shortcut in topShortcuts)
            {
                outputMessage += shortcut + Environment.NewLine;
            }
            this.txtTopShortcuts.Text = outputMessage;

            outputMessage = "";
            foreach (string shortcut in topCommands)
            {
                outputMessage += shortcut + Environment.NewLine;
            }
            this.txtTopCommands.Text = outputMessage;
        }
Beispiel #2
0
        private void btnStartAnalysis_Click(object sender, EventArgs e)
        {
            KeyboardShortcutAnalyzer analyzer = new KeyboardShortcutAnalyzer(this.txtJournalFile.Text, this.txtShortcutsFile.Text);

            IEnumerable <string> topShortcuts = analyzer.GetTopShortcutsUsed();
            IEnumerable <string> topCommands  = analyzer.GetTopRibbonCommandsUsed(this.chkbIncludeContext.Checked);

            string outputMessage = "";

            foreach (string shortcut in topShortcuts)
            {
                outputMessage += shortcut + Environment.NewLine;
            }
            this.txtTopShortcuts.Text = outputMessage;

            outputMessage = "";
            foreach (string shortcut in topCommands)
            {
                outputMessage += shortcut + Environment.NewLine;
            }
            this.txtTopCommands.Text = outputMessage;
        }