Ejemplo n.º 1
0
        private void LogShow_Load(object sender, EventArgs e)
        {
            Data2File.CheckDirs();

            string[] filenames = Directory.GetFiles(Data2File.GetOperFolder());
            foreach (string filename in filenames)
            {
                LstLogs.Items.Add(Name2Time(Path.GetFileNameWithoutExtension(filename)));
            }
        }
Ejemplo n.º 2
0
        private void LstLogs_DoubleClick(object sender, EventArgs e)
        {
            string selected = LstLogs.SelectedItem as string;

            if (selected == null || selected == "")
            {
                return;
            }

            using (StreamReader sr = new StreamReader
                                         (Data2File.GetOperFolder() + "\\" + Time2Name(selected) + ".log"))
            {
                TxtLog.Text = sr.ReadToEnd();
            }
        }