public static void CurrentlySelectedChanger(ChatMessagesViewModel next) { if (CurrentlySelected != null) { CurrentlySelected.IsSelected = false; } CurrentlySelected = next; CurrentlySelected.IsSelected = true; UpdateCurrentMessageList(next); }
public static void UpdateCurrentMessageList(ChatMessagesViewModel next) { try { CurrentMessageList = OMightyDict[next.ID]; } catch (Exception X) { Debug.Fail("WTF ARE U DOIN ?"); } }
public static void FileLoader(string filepath) { string line; MessageBox.Show(ListDataPath); ChatsAviable = new List <ChatMessagesViewModel>(); using var file = new StreamReader(ListDataPath + filepath); while ((line = file.ReadLine()) != null) { var lister = line.Split(','); var obj = new ChatMessagesViewModel { Name = lister[0], Message = lister[1], TwoLetters = lister[2], ProfilePicColorRGB = lister[3] }; ChatsAviable.Add(obj); OMightyDict[obj.ID] = ThreadReader(lister[4], lister); } MessageBox.Show(ChatsAviable.Count.ToString()); }