方法没有任何重载采用“0”个参数
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace 自做的系统
{
? public partial class frmMain : Form
? {
? public frmMain()
? {
? InitializeComponent();
? }
? private void frmMain_Load(object sender, EventArgs e)
? {
? }
? private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
? {
? if (treeView1.SelectedNode.Text == "局域网工作组")
? tabControl1.SelectedIndex = 0;
? if (treeView1.SelectedNode.Text == "局域网计算机节点")
? tabControl1.SelectedIndex = 1;
? if (treeView1.SelectedNode.Text == "局域网内发送信息")
? tabControl1.SelectedIndex = 2;
? if (treeView1.SelectedNode.Text == "局域网磁盘管理")
? tabControl1.SelectedIndex = 3;
? if (treeView1.SelectedNode.Text == "映射网络驱动器")
? tabControl1.SelectedIndex = 4;
? if (treeView1.SelectedNode.Text == "Ping操作")
? tabControl1.SelectedIndex = 5;
? if (treeView1.SelectedNode.Text == "监测当前网络连接状态")
? tabControl1.SelectedIndex = 6;
? if (treeView1.SelectedNode.Text == "文件复制")
? tabControl1.SelectedIndex = 7;
? if (treeView1.SelectedNode.Text == "远程控制计算机")
? tabControl1.SelectedIndex = 8;
? if (treeView1.SelectedNode.Text == "远程服务控制")
? tabControl1.SelectedIndex = 9;
? }
? private void 检测当前网络连接状态ToolStripMenuItem_Click(object sender, EventArgs e)
? {
? }
? private void toolStripStatusLabel1_Click(object sender, EventArgs e)
? {
? toolStripStatusLabel1.Width = 200;
? toolStripStatusLabel1.Text = "当前时间:" + DateTime.Now.TimeOfDay.ToString();
? }
? private void timer1_Tick(object sender, EventArgs e)
? {
? toolStripStatusLabel1_Click ();// “toolStripStatusLabel1_Click”方法没有任何重载采用“0”个参数
? }
? }
}
怎么解决这个问题啊,求大神指点。最近刚接触这个。
------解决方案--------------------private void timer1_Tick(object sender, EventArgs e)
? {
? toolStripStatusLabel1_Click (null,null);// “toolStripStatusLabel1_Click”方法没有任何重载采用“0”个参数
? }
------解决方案--------------------toolStripStatusLabel1_Click(sender, e);
------解决方案--------------------
设置Timer的Enabled和Interval属性。