//WIFI private void WIFI_Click(object sender, EventArgs e) { XtraForm1 xf = new XtraForm1(); xf.ShowDialog(); xf.Dispose(); }
protected internal override void ButtonClick(string tag) { switch (tag) { case "NewUser1": XtraForm1 form = new XtraForm1(); form.ShowDialog(); break; } }
private void Inventory_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Settings.Inventorysettings frm; frm = new Settings.Inventorysettings(); //generate new instance //frm.Owner = this; //frm.TopLevel = false; //spli.Panel2.Controls.Add(frm); frm.ShowDialog(); }
private void btnLogIN_Click(object sender, EventArgs e) { string emailUser = txtEmailLogIN.Text; using (var mes = new DataContext()) { mes.Database.CreateIfNotExists(); var logInUser = mes.SenderUsers.Where(s => s.Username.ToLower() == emailUser.ToLower()).FirstOrDefault(); if (logInUser == null) { MessageBox.Show("UsernameIncorrect"); } else { if (logInUser.Password == txtPasswordLogIN.Text) { // MessageBox.Show("Welcome"); //var contextChat = new DataContext(); //LogUser currentLog = new LogUser(); //currentLog.ID = Guid.NewGuid(); //currentLog.IsLogIn = true; //currentLog.IsLogOut = false; //currentLog.CreationDate = DateTime.UtcNow; //currentLog.UpdatedDate = DateTime.UtcNow; //currentLog.userId = logInUser.ID; //contextChat.Entry(currentLog).State = System.Data.Entity.EntityState.Added; //contextChat.SaveChanges(); //// update status User //statusUser stUser = mes.StatusUser.Where(s => s.UserID == logInUser.ID).FirstOrDefault(); //if(stUser!=null) //{ // if(!stUser.IsOnline) // { // stUser.IsOnline = true; // stUser.UpdateDate = DateTime.UtcNow; // mes.Entry(stUser).State = System.Data.Entity.EntityState.Modified; // } //} //mes.SaveChanges(); // end update Status User this.Hide(); XtraForm1 usertChat = new XtraForm1(logInUser); usertChat.ShowDialog(); this.Close(); } else { MessageBox.Show("Password InCorrect"); } } } }
private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { XtraForm1 frm = new XtraForm1(); frm.ShowDialog(); }