public oneChat(string id, string mylogin, BridgeClient e) { this.id = id; this.enginee = e; image = "resources/readmsg.png"; if (id.StartsWith("gr") == true) { name = id.Remove(0, 2); } else { if (id.StartsWith("pm") == true) { string newid = id.Remove(0, 2); string[] qqq = newid.Split('|'); if (qqq[0] == mylogin) { name = "/pm " + qqq[1]; nick = qqq[1]; image = this.enginee.map[qqq[1]].pict; } else { name = "/pm " + qqq[0]; nick = qqq[0]; image = this.enginee.map[qqq[0]].pict; } } else { name = id; } } }
public OneUser(string id, BridgeClient e) { eng = e; this.id = id; name = this.id; _pict = eng.map[id].pict; }
private void tryLogOut() { chates = new ObservableCollection <oneChat>(); msges = new ObservableCollection <oneMsg>(); friends = new ObservableCollection <OnePeople>(); chatsList.ItemsSource = chates; msgsList.ItemsSource = msges; enginee = new BridgeClient(chates, msges, this); users = new ObservableCollection <OneUser>(); lbUsersKek.ItemsSource = users; //lbFriends.Items.Clear(); lbFriends.ItemsSource = friends; //chatsList.Focus(); btnAddUser.Visibility = Visibility.Hidden; btnLeaveChat.Visibility = Visibility.Hidden; btnShowUsers.Visibility = Visibility.Hidden; msgsList.Visibility = Visibility.Hidden; btnSendMsg.Visibility = Visibility.Hidden; boxtomsg.Visibility = Visibility.Hidden; btnFriendsDelete.Visibility = Visibility.Hidden; btnFriendsSend.Visibility = Visibility.Hidden; this.Visibility = Visibility.Hidden; loginWindow lw = new loginWindow(enginee); lw.Top = this.Top + 100; lw.Left = this.Left + 100; lw.Owner = this; lw.Show(); lw.Focus(); lw.tbLogin.Focus(); System.Windows.Forms.Timer tim = new System.Windows.Forms.Timer(); tim.Tick += new EventHandler(enginee._sendEmpty); tim.Interval = 20000; tim.Start(); }
public OnePeople(BridgeClient e) { eng = e; id = null; name = null; pict = null; }
public void updateIcons(BridgeClient e) { if (pict != e.map[idfrom].pict) { pict = e.map[idfrom].pict; } if (name != e.map[idfrom].name) { name = e.map[idfrom].name; } }
public chooseUser(bool b, BridgeClient e, MainWindow mm, Action <string> a) { full = new ObservableCollection <OnePeople>(); friend = new ObservableCollection <OnePeople>(); other = new ObservableCollection <OnePeople>(); act = a; useFriends = b; eng = e; mw = mm; InitializeComponent(); clearThis(); }
public void updateIcon(BridgeClient e) { if (id.StartsWith("pm")) { if (image != e.map[nick].pict) { image = e.map[nick].pict; } if (name != e.map[nick].name) { name = "/pm " + e.map[nick].name; } } }
public oneMsg(string id, string text, string ttime, string login, BridgeClient e) { string[] retime = ttime.Split(new char[] { ' ', ':' }); time = " at " + retime[4] + ":" + retime[5] + " of " + retime[0] + " " + retime[2] + " " + retime[1] + " " + retime[3]; eng = e; idfrom = id; name = id; this.login = login; textmsg = text; if (idfrom == login) { fromSelf = true; } else { fromSelf = false; } pict = this.eng.map[idfrom].pict; }
public MainWindow() { InitializeComponent(); chates = new ObservableCollection <oneChat>(); msges = new ObservableCollection <oneMsg>(); friends = new ObservableCollection <OnePeople>(); chatsList.ItemsSource = chates; msgsList.ItemsSource = msges; enginee = new BridgeClient(chates, msges, this); users = new ObservableCollection <OneUser>(); lbUsersKek.ItemsSource = users; //lbFriends.Items.Clear(); lbFriends.ItemsSource = friends; //chatsList.Focus(); btnAddUser.Visibility = Visibility.Hidden; btnLeaveChat.Visibility = Visibility.Hidden; btnShowUsers.Visibility = Visibility.Hidden; msgsList.Visibility = Visibility.Hidden; btnSendMsg.Visibility = Visibility.Hidden; boxtomsg.Visibility = Visibility.Hidden; btnFriendsDelete.Visibility = Visibility.Hidden; btnFriendsSend.Visibility = Visibility.Hidden; }
public formFriendAdd(BridgeClient e) { eng = e; InitializeComponent(); }
public addUserWindow(BridgeClient e) { eng = e; InitializeComponent(); }
public loginWindow(BridgeClient e) { eng = e; InitializeComponent(); }
public Window1(BridgeClient e) { eng = e; InitializeComponent(); }