Beispiel #1
0
        private void textRecordsBtn_Click(object sender, RoutedEventArgs e)
        {
            string      tag          = (string)((HyperlinkButton)sender).Tag;
            string      textOrTitle  = tag.Substring(1);
            int         recordsIndex = tag[0] - 1;
            SessionType sessionType  = SessionType.MomentaryWpm;

            if (recordsIndex < 0)
            {
                recordsIndex = 0;                 //Just to avoid out of range exception. The data at the index is irrelevant if not a momentaryWpmSession.
                sessionType  = SessionType.Title;
            }
            var record = textRecords[recordsIndex];

            CreateSessionLinkClick?.Invoke(this, new CreateSessionLinkClickEventArgs(textOrTitle, sessionType, record.HighWpm, record.HighWpmSnippet, record.LowWpm, record.LowWpmSnippet));
        }
Beispiel #2
0
        private void wordRecordsBtn_Click(object sender, RoutedEventArgs e)
        {
            string word = (string)((HyperlinkButton)sender).Content;

            CreateSessionLinkClick?.Invoke(this, new CreateSessionLinkClickEventArgs(word, SessionType.Temp, 0, null, 0, null));
        }