コード例 #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     DanmuManager.getInstance().closeSocket();
     appendText("[System]Disconnect");
     button1.Enabled = true;
     button2.Enabled = false;
 }
コード例 #2
0
 public static DanmuManager getInstance()
 {
     if (instance == null)
     {
         instance = new DanmuManager();
     }
     return(instance);
 }
コード例 #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Form1 f = new Form1();

            DanmuManager.getInstance().setWindow(f);
            Application.Run(f);
        }
コード例 #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     appendText("[System]Connecting...");
     if (DanmuManager.getInstance().connect(textBox1.Text.ToString()))
     {
         appendText("[System]Connect success");
         button1.Enabled = false;
         button2.Enabled = true;
     }
     else
     {
         appendText("[System]Connect fail");
         button1.Enabled = true;
         button2.Enabled = false;
     }
 }
コード例 #5
0
 private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.Close();
     DanmuManager.getInstance().closeSocket();
     System.Environment.Exit(0);
 }