示例#1
0
      public void Login(string Username, string Password, MainMenu m)
      {
          byte[] bytes = Socket.ApplyConnection(Username, Password);
          if (bytes != null)
          {
              string info = Encoding.ASCII.GetString(bytes);
              if (info == "0")
              {
                  MessageBox.Show("Incorrect Username or Password");
              }
              else if (info == "1")
              {
                  Dashboard_ d = new Dashboard_();
                  d.Show();
                  m.Hide();
                  MessageBox.Show("Successfully Logged In");
              }
              else if (info == "2")
              {
                  Dashboard_ d = new Dashboard_();
                  d.Show();
                  m.Hide();

                  MessageBox.Show("User Already Logged in");
              }
          }
      }
示例#2
0
 private void button2_Click(object sender, EventArgs e)
 {
     d.Show();
     Program.sr.EndSession();
     notifyIcon1.Visible = false;
     this.d = null;
     this.Close();
 }
示例#3
0
        public WatchStream(int RID, int Password, Dashboard_ d, int Mode)
        {
            InitializeComponent();
            this.d = d;
            WatchStream Ref = this;

            FormClosing += w_FormClosing;
            if (Mode == 0)
            {
                Program.sr.EnterRoom(ref richTextBox1, 1, Program.User.SharesUsername, Program.User.SharesPassword, RID, Password, ref Ref, 0);
            }
            else
            {
                Program.sr.JoinPublicRoom(ref richTextBox1, 2, Program.User.SharesUsername, Program.User.SharesPassword, ref Ref);
            }
        }
示例#4
0
 public Stream(Dashboard_ d)
 {
     this.d = d;
     InitializeComponent();
     FormClosing += Stream_FormClosing;
 }