Ejemplo n.º 1
0
 public NewClient(Networkconnect network, string physicianName)
 {
     InitializeComponent();
     this.ActiveControl = gebruikersNaam;
     this.network       = network;
     this.physicianName = physicianName;
 }
Ejemplo n.º 2
0
 public NewClient(Networkconnect network, string physicianName)
 {
     InitializeComponent();
     this.ActiveControl = gebruikersNaam;
     this.network = network;
     this.physicianName = physicianName;
 }
Ejemplo n.º 3
0
 public Login()
 {
     InitializeComponent();
     network = new Networkconnect("127.0.0.1", 130);
     Thread connectionThread = new Thread(new ThreadStart(ConnectThread));
     connectionThread.IsBackground = true;
     connectionThread.Start();
 }
Ejemplo n.º 4
0
Archivo: Login.cs Proyecto: xrgman/Zooi
        public Login()
        {
            InitializeComponent();
            network = new Networkconnect("127.0.0.1", 130);
            Thread connectionThread = new Thread(new ThreadStart(ConnectThread));

            connectionThread.IsBackground = true;
            connectionThread.Start();
        }
Ejemplo n.º 5
0
        public NetworkCommunication(string ipAdress, int port, Networkconnect parent)
        {
            this.ipAdress = ipAdress;
            this.port     = port;
            this.parent   = parent;

            // Certificaat toevoegen
            certs.Add(new X509Certificate2(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.Parent.FullName + @"\Shared Server Client\cyclemaster.pfx",
                                           "admin", X509KeyStorageFlags.MachineKeySet));
        }
Ejemplo n.º 6
0
        public NetworkCommunication(string ipAdress, int port, Networkconnect parent)
        {
            this.ipAdress = ipAdress;
            this.port = port;
            this.parent = parent;

            // Certificaat toevoegen
            certs.Add(new X509Certificate2(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.Parent.FullName + @"\Shared Server Client\cyclemaster.pfx",
                                                              "admin", X509KeyStorageFlags.MachineKeySet));
        }
Ejemplo n.º 7
0
 public OldSesionData(Networkconnect network, string username)
 {
     this.network = network;
     InitializeComponent();
     user = network.getUser(username);
     if (user is Physician)
     {
         Physician p = (Physician)user;
         listBox_Data.DataSource = p.clients;
         users       = p.clients;
         isPhysician = true;
     }
     else
     {
         UserClient a = (UserClient)user;
         listBox_Data.DataSource = a.sessions;
         isPhysician             = false;
     }
 }
Ejemplo n.º 8
0
 public FormClient(Networkconnect network, bool isPhysician, string username)
 {
     InitializeComponent();
     network.SetParent(this);
     this.isPhysician = isPhysician;
     this.network     = network;
     this.username    = username;
     if (!isPhysician) //Client:
     {
         currentUser = network.getUser(username);
         pwrTxtBox.Hide();
         distanceTxtBox.Hide();
         timeTxtBox.Hide();
         label5.Hide();
         label6.Hide();
         label7.Hide();
         sendButton.Hide();
         broadCastButton.Hide();
         connectedUsers.Hide();
         newClient.Hide();
         dropDownTest.HideDropDown();
         bikeImprovementToolStripMenuItem.HideDropDown();
     }
     else //Specialist:
     {
         BComConnect.Hide();
         resetButton.Hide();
         //Getting all connected users:
         users = network.GetAllConnectedUsers(username);
         if (users != null)
         {
             if (users.Count > 0)
             {
                 currentUser = users.First();
             }
             FillUserComboBox();
         }
         Thread physicianThread = new Thread(new ThreadStart(ResfreshThreadPhysician));
         physicianThread.IsBackground = true;
         physicianThread.Start();
     }
 }
Ejemplo n.º 9
0
        public FormClient(Networkconnect network, bool isPhysician, string username)
        {
            InitializeComponent();

            timer1.Interval = 1000;
            timer1.Elapsed += new ElapsedEventHandler(timer1_Tick);

            network.SetParent(this);
            this.isPhysician = isPhysician;
            this.network = network;
            this.username = username;
            if(!isPhysician) //Client:
            {
                currentUser = network.getUser(username);
                pwrTxtBox.Hide();
                distanceTxtBox.Hide();
                timeTxtBox.Hide();
                label5.Hide();
                label6.Hide();
                label7.Hide();
                sendButton.Hide();
                broadCastButton.Hide();
                connectedUsers.Hide();
                newClient.Hide();
            }
            else //Specialist:
            {
                BComConnect.Hide();
                resetButton.Hide();
                //Getting all connected users:
                users = network.GetAllConnectedUsers(username);
                if (users != null)
                {
                    if (users.Count > 0)
                            currentUser = users.First();
                    FillUserComboBox();
                }
                Thread physicianThread = new Thread(new ThreadStart(ResfreshThreadPhysician));
                physicianThread.IsBackground = true;
                physicianThread.Start();
            }
        }
Ejemplo n.º 10
0
 public OldSesionData(Networkconnect network, User user)
 {
     this.network = network;
     this.user = (UserClient)user;
     InitializeComponent();
     if (user is Physician)
     {
         //todo
         Physician p = (Physician)user;
         listBox_Data.DataSource = p.clients;
         users = p.clients;
         isPhysician = true;
     }
     else
     {
         UserClient a = (UserClient)user;
         listBox_Data.DataSource = a.sessions;
         Debug.WriteLine("aantal sessies: " + a.sessions[0].ToString());
         isPhysician = false;
     }
 }