public void Clipboard_contains_memo()
        {
            ShortcutMemorizer shortcutMemorizer = new ShortcutMemorizer();

            shortcutMemorizer.AddShortCut("123", "memo 123");
            shortcutMemorizer.SetMemosToCliboard();
            string text = Clipboard.GetText();

            Assert.IsTrue(text.Contains("memo 123 : 123"));
        }
Exemplo n.º 2
0
        private void SetMemoOnSelectedItem()
        {
            if (KeysListView.SelectedItems.Count != 0)
            {
                ListViewItem item = KeysListView.SelectedItems[0];
                TopMost = false;

                const string title      = "Enter a memo to associate with this shortcut";
                const string promptText = "Memo for shortcut";

                string memo = Interaction.InputBox(title, promptText, "Action triggerd by " + item.Text);
                //, new Point(Location.X, Location.Y));
                TopMost = true;

                if (memo != string.Empty)
                {
                    memos.AddShortCut(item.Text, memo);
                }
            }
        }