Esempio n. 1
0
		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);
		}
Esempio n. 2
0
		public RoomBlock(Client client, Server server,RoomInfo room):base(){
			this.m_room=room;
			this.m_client=client;
			this.m_server=server;
			Init(room);
		}
Esempio n. 3
0
		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);
			}
		}
Esempio n. 4
0
		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);
			}
		}
Esempio n. 5
0
		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);
				                       })
				           );
			}
		}
Esempio n. 6
0
		public RoomForm(Client client)
		{
			InitializeComponent();
			this.m_client=client;
			m_dir=Tool.Combine(Application.StartupPath, "data");
		}