예제 #1
0
파일: Form1.cs 프로젝트: jackxl/MediCare
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string id = (string)OverviewTable.CurrentCell.Value;
            if (!tabControl1.Controls.ContainsKey(id))
            {
                if (client.isConnected())
                {
                    clientTab tab = new clientTab(id, client, _ID);
                    if (!_tabs.Contains(tab))
                        _tabs.Add(tab);
                    if (!_tabIdDict.ContainsKey(id))
                        _tabIdDict.Add(id, tab);

                    tab.closeAllButThisButton.Click += new System.EventHandler(On_Tab_Close_All_Event);
                    tab.closeButton.Click += new System.EventHandler(On_Tab_Closed_Event);
                    this.tabControl1.Controls.Add(tab);
                    this.tabControl1.SelectedTab = tab;
                }
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: jackxl/MediCare
 // code wordt niet gebruikt?
 private void getClients()
 {
     string[] ids = getActiveClients().Split(' ');
     for (int i = 0; i < ids.Length; i++)
     {
         if (!this.tabControl1.Controls.ContainsKey(ids[i]))
         {
             clientTab tab = new clientTab(ids[i], client, _ID);
             this.tabControl1.Controls.Add(tab);
         }
     }
 }
예제 #3
0
        private void HandleFileRequest(Packet p)
        {
            string[] data = p._message.Split('-');
            if (!tabControl1.Controls.ContainsKey(data[1] + "-" + data[2]))
            {
                if (_client.isConnected())
                {
                    clientTab tab = new clientTab(data[1] + "-" + data[2], _client, _ID, true);
                    if (!_tabs.Contains(tab))
                        _tabs.Add(tab);
                    if (!_tabIdDict.ContainsKey(data[1] + "-" + data[2]))
                        _tabIdDict.Add(data[1] + "-" + data[2], tab);

                    tab.closeAllButThisButton.Click += new System.EventHandler(On_Tab_Close_All_Event);
                    tab.closeButton.Click += new System.EventHandler(On_Tab_Closed_Event);
                    this.tabControl1.Controls.Add(tab);
                    this.tabControl1.SelectedTab = tab;
                    tab.setMaxMeasurements(int.Parse(data[3]));
                }
            }
        }