void btnConnect_Click(object sender, RoutedEventArgs e)
        {
            server = new Server(tbIp.Text, Int32.Parse(tbPort.Text));
            client = new Client(tbIpCl.Text, Int32.Parse(tbPortCl.Text));

            server.OnDataRecieved += server_OnDataRecieved;
            server.Listen();
        }
Пример #2
0
        private void MenuItem_MouseDown(object sender, RoutedEventArgs e)
        {
            //provmenu.PlacementTarget = this;
            //provmenu.IsOpen = true;

            ClientSet p = new ClientSet();

            Client clientdetails = new Client(p);
            clientdetails._new = true;

            clientdetails.ShowDialog();

            if (clientdetails._new && !clientdetails.Cancel)
            {
                lcl.Add(p);
                _dataDC.ClientSet.AddObject(p);
                _dataDC.SaveChanges();
                filter();
            }
        }
Пример #3
0
        private void Editar()
        {
            if (clientSet1ViewSource.Items.Count > 0 && clientSet1ViewSource.SelectedItem !=null)
            {
                String file = clientSet1ViewSource.SelectedItem.ToString();
                ClientSet p = (ClientSet)clientSet1ViewSource.SelectedItem;
                Client clientdetails = new Client(p);
                clientdetails._new = false;

                clientdetails.ShowDialog();

                if (!clientdetails.Cancel) _dataDC.SaveChanges();
            }
        }
Пример #4
0
        private void ClientList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (ClientList.Items.Count > 0 && ClientList.SelectedItem!= null)
            {
                String file = ClientList.SelectedItem.ToString();
                ClientSet p = (ClientSet)ClientList.SelectedItem;
                Client clientdetails = new Client(p);
                clientdetails._new = false;

                clientdetails.ShowDialog();

                if (!clientdetails.Cancel) _dataDC.SaveChanges();
            }
        }