public MyNotifyIcon() { notifyIcon = new NotifyIcon(); notificationMenu = new ContextMenu(InitializeMenu()); notifyIcon.DoubleClick += IconDoubleClick; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyNotifyIcon)); notifyIcon.Icon = (Icon)resources.GetObject("$this.Icon"); notifyIcon.ContextMenu = notificationMenu; m_client = new Client(notifyIcon); }
public RoomBlock(Client client, Server server,RoomInfo room):base(){ this.m_room=room; this.m_client=client; this.m_server=server; Init(room); }
public void AddRoom(Client client, Server server,RoomInfo room, bool isLast){ RoomBlock block=new RoomBlock(client,server,room); this.Controls.Add(block); if(isLast){ this.ResumeLayout(true); } }
private void AddRooms(Client client, Server server,RoomInfo[] rooms){ this.SuspendLayout(); this.Controls.Clear(); int i=0; //MessageBox.Show("共有"+rooms.Length+"房间"); foreach(RoomInfo room in rooms){ i++; AddRoom(client,server,room, i==rooms.Length); } if(rooms.Length==0){ this.ResumeLayout(false); } }
public void SetRooms(Client client, Server server,RoomInfo[] rooms){ if(rooms==null){ rooms=new RoomInfo[0]; } if (!this.InvokeRequired) { AddRooms(client,server,rooms); } else { BeginInvoke(new Action(()=>{ AddRooms(client,server,rooms); }) ); } }
public RoomForm(Client client) { InitializeComponent(); this.m_client=client; m_dir=Tool.Combine(Application.StartupPath, "data"); }