Exemple #1
0
        void MainFormLoad(object sender, EventArgs e)
        {
            this.comboBox_ReceiveName.Items.Add("所有人");
            this.comboBox_ReceiveName.SelectedIndex = 0;

            clientcontrol            = ClientControl.CreateInstance();
            clientcontrol._Senddata += new ClientControl.TransmitData(this.MsgWriteLine);
            this.Text = this.Text + "-" + clientcontrol.myName;
            clientcontrol.UpdateUser();//请求在线用户列表
        }
 public static ClientControl CreateInstance()
 {
     if (_instance == null)
     {
         lock (lockHelper)
         {
             if (_instance == null)
             {
                 _instance = new ClientControl();
             }
         }
     }
     return(_instance);
 }
Exemple #3
0
 void LoginFormLoad(object sender, EventArgs e)
 {
     clientcontrol = ClientControl.CreateInstance();
 }