コード例 #1
0
 private void StartClicked(object sender, EventArgs e)
 {
     if (loadlogs.Checked)
     {
         EventLogs.Invoke((MethodInvoker) delegate { EventLogs.Text = File.ReadAllText(Application.StartupPath + $"\\{user_id}.txt"); });
     }
     polling = new Thread(Poll)
     {
         IsBackground = true, Priority = ThreadPriority.Highest
     };
     polling.Start();
     start.Enabled = friends.Enabled = customuserid.Enabled = loadlogs.Enabled = false;
     stop.Enabled  = true;
 }
コード例 #2
0
 private void WriteToFile(string text)
 {
     EventLogs.Invoke((MethodInvoker) delegate { EventLogs.Text += text; });
     File.AppendAllText(Application.StartupPath + $"\\{user_id}.txt", text);
 }