Пример #1
0
        public void Write(string Text)
        {
            FileStream   logStream    = File.Open(Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName, @"Logs\\text.txt"), FileMode.Append);
            StreamWriter streamWriter = new StreamWriter(logStream);

            for (int i = 0; i < Txt; i++)
            {
                streamWriter.WriteLine(Text);
            }
            streamWriter.Close();

            for (int i = 0; i < DataGrid; i++)
            {
                SingletonLog.GetInstance().WriteDataGrid(Text);
            }
            for (int i = 0; i < RichTextBox; i++)
            {
                SingletonLog.GetInstance().WriteTextBox(Text);
            }
        }
Пример #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     SingletonLog.GetInstance().log.Show();
 }
Пример #3
0
 private void Log_FormClosed(object sender, FormClosedEventArgs e)
 {
     SingletonLog.GetInstance().log = new Log();
 }