public MainWindow()
 {
     InitializeComponent();
     socket       = new SocketHandler();
     receiveData  = new getResponse(dataReceived);
     sendReq      = new sendRequest(dataSend);
     showLogin    = new showLoginForm(showLoginFormWindow);
     socketStatus = new socketDisconnected(socketClosed);
 }
        public DashBoard(closeSocketDelegate d, showLoginForm x, sendRequest y, string idpassed)
        {
            InitializeComponent();
            deserializedMessages          = new List <Messages>();
            message_container.ItemsSource = deserializedMessages;
            closeSocket = d;
            showLogin   = x;
            //List <friends> items = new List<friends>();
            //friends a = new friends() { friendImage = "http://localhost/images/cs_fest_2016.png", friendUsername = "******", friendStatus = "/Icons/offline.png" };
            //friends b = new friends() { friendImage = "/Icons/close.png", friendUsername = "******", friendStatus = "/Icons/offline.png" };
            //friends c = new friends() { friendImage = "/Icons/close.png", friendUsername = "******", friendStatus = "/Icons/offline.png" };
            //items.Add(a);
            //items.Add(b);
            //listView.ItemsSource = items;
            //items.Add(c);
            id       = idpassed;
            sendData = y;
            getFriends();
            Thread friendDataUpdate = new Thread(SetTimer);

            friendDataUpdate.IsBackground = true;
            friendDataUpdate.Start();
        }