示例#1
0
        private void HumasonLogFileListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            //New date, new log
            string writeLog  = "";
            string parsedLog = "";

            HumasonLogTextBox.Clear();
            ParsedTextBox.Clear();
            //figure out the new datetime from the selected log file name
            if (HumasonLogFileListBox.SelectedItem == null)
            {
                return;
            }
            DateTime      sdate   = Convert.ToDateTime(HumasonLogFileListBox.SelectedItem.ToString());
            HumasonReader hReader = new HumasonReader(sdate);

            if (hReader.HumasonJoinedLog != null)
            {
                foreach (string line in hReader.HumasonJoinedLog)
                {
                    writeLog += line + "\r\n";
                }
                List <string> plog = ParseLog(hReader);
                if (plog != null)
                {
                    foreach (string line in plog)
                    {
                        parsedLog += line + "\r\n";
                    }
                }
            }
            HumasonLogTextBox.Text = writeLog;
            HumasonLogTextBox.Select(0, 0);
            ParsedTextBox.Text = parsedLog;;
            ParsedTextBox.Select(0, 0);
            return;
        }
示例#2
0
 private void KanjiInputExpander_GotFocus(object sender, RoutedEventArgs e)
 {
     ParsedTextBox.Focus();
 }