Example #1
0
File: Login.cs Project: pkry1/PKRY
 // Procedura logowania, wyswietla status weryfikacji klienta przez serwer
 public MainFrame Logging()
 {
     MainFrame mainFrame = new MainFrame(textBox1.Text, ServerPubKey, PrivateKey);
     if (server.status == "Connected")
     {
         this.label3.Text = "Connected";
         this.Refresh();
         System.Threading.Thread.Sleep(1500);
         this.Hide();
         server.action(mainFrame);
         mainFrame.ServerPubKey = ServerPubKey;
         mainFrame.loadKey(PrivateKey);
     }
     else
     {
         this.label3.Text = server.status;
     }
     return mainFrame;
 }
Example #2
0
File: Server.cs Project: pkry1/PKRY
 // Ujawnia formularz logowania
 public void action(MainFrame x)
 {
     x.Show();
 }
Example #3
0
File: Server.cs Project: pkry1/PKRY
 // Autoryzuje klienta
 public MainFrame Logging(Login login)
 {
     if (dict.ContainsKey(userLogin) )
     {
         if (password == dict[userLogin])
         {
             status = "Connected";
             mainFrame = login.Logging();
             UpdatePrices();
         }
         else
         {
             status = "Wrong password";
             mainFrame = login.Logging();
         }
     }
     else
     {
         status = "User doesn't exist";
         mainFrame = login.Logging();
     }
     return mainFrame;
 }