private void login() { try { Http_Getcs getcs = new Http_Getcs(); JObject objs = objs = getcs.Login(idBox.Text, passwordBox.Password); new Thread(() => { if (objs != null && objs["name"].ToString() != "null") { UserData.id = Convert.ToInt64(objs["id"].ToString()); UserData.username = objs["name"].ToString(); UserData.teamCode = objs["teamCode"].ToString(); UserData.email = objs["email"].ToString(); UserData.password = objs["password"].ToString(); UserData.memos = JsonConvert.DeserializeObject <int[]>(objs["memo"].ToString()); UserData.userMemos = JsonConvert.DeserializeObject <string[]>(objs["usermemo"].ToString()); httpsGet.InitialzationTeam(); Dispatcher.Invoke(() => { if (IsAutoLogin.IsChekced) { JObject objs2 = httpsGet.registerAutologin(idBox.Text, UserData.password); if (objs2 == null) { return; } } Dashboard board = new Dashboard(); board.WindowState = this.WindowState; board.Show(); this.Close(); }); } else { MessageBox.Show("Check user account"); } }).Start(); } catch (Exception e) { MessageBox.Show(e.Message); } }
public UploadedFilePages() { InitializeComponent(); if (TeamData.files == null) { return; } string fileName = TeamData.files[0]; // files에서 첫번째 값 가져오기 this.Loaded += (sender, args) => { updates(fileName, DownloadData.getInstance().accessFiles); }; this.PreviewMouseDown += (sender, args) => { Http_Getcs csget = new Http_Getcs(); csget.downloadFile(0, Dispatcher); }; }
public void remove() { Http_Getcs httpGets = new Http_Getcs(); httpGets.setUserNoticeRead(notice); TeamData.notice.Remove(notice); // 읽었기 때문에 제거한다. UserData.board.MainGeneral.Children.Remove(showedFrame); NewNoticeDataM.showedUI = null; NewNoticeDataM.IsShowed = false; showedFrame = null; isInside = false; pages.update(this); /*StompMessageSerializer serializer = new StompMessageSerializer(); * JObject obj = new JObject(); * obj.Add("name", UserData.username); * obj.Add("id", UserData.id); * obj.Add("teamCode", UserData.teamCode); * var test = new StompMessage(StompFrame.SEND, obj.ToString()); * test["content-type"] = "application/json"; * test["destination"] = "/app/sendUpdateReadUser"; * UserData.socket.Send(serializer.Serialize(test));*/ }