Ejemplo n.º 1
0
 public Form1()
 {
     InitializeComponent();
     screenShotListView=null;
     Name="";
     currentHistory=-1;
     commandHistory=new List<string>();
     server=new MessageServer();
     server.NewUserAdded+=OnNewUserAdded;
     server.UserRemoved+=OnUserRemoved;
     server.MessageReceived+=OnMessageReceived;
     server.ScreenShotReceived+=OnScreenShotReceived;
     GetUserColors();
     localAddress=GetLocalIPAddress();
     if(localAddress==null){
         MessageBox.Show("ネットワークに接続していません。","",MessageBoxButtons.OK,MessageBoxIcon.Error);
         Application.Exit();
     }
     server.Start();
     UpdateTitle();
 }
Ejemplo n.º 2
0
 private void toolStripMenuItem2_Click(object sender,EventArgs e)
 {
     if(screenShotListView==null||screenShotListView.IsDisposed){
         var users=from user in listBox1.Items.Cast<User>() select user.Name;
         screenShotListView=new Form3(users.ToArray(),thumbnailSize);
         screenShotListView.Show();
     }else screenShotListView.Focus();
 }