public SessionWindow(MainListObject ClientObject)
        {
            InitializeComponent();
            Client        = ClientObject;
            Imagee.Source = Client.Image;

            this.Topmost = true;
        }
示例#2
0
        private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            MainListObject obj = (MainListObject)(sender as System.Windows.Controls.Image).DataContext;

            FastIP = obj.IP;
            SendFastTransmissionRequest(obj.IP);
            SessionWindow NewOne = new SessionWindow((MainListObject)(sender as System.Windows.Controls.Image).DataContext);

            sesWindow         = NewOne;
            Global.SessionWin = NewOne;
            NewOne.Show();
        }
示例#3
0
        private void ShowPrcesess_Click(object sender, RoutedEventArgs e)
        {
            MainListObject obj = (MainListObject)(sender as Button).DataContext;

            try
            {
                IPAddress  IPC           = IPAddress.Parse(obj.IP);
                IPEndPoint FastClient    = new IPEndPoint(IPC, 12414);
                EndPoint   FastClientEP  = (EndPoint)(FastClient);
                string     MessageSTR    = "SHOWPROCESESS";
                byte[]     MessageToSent = GetBytes(MessageSTR);
                Server2.SendTo(MessageToSent, FastClientEP);
            }
            catch (Exception ex)
            {
            }
        }
示例#4
0
        void FirstBackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            ReceivedObject obj = (ReceivedObject)e.UserState;
            Bitmap         a   = obj.Image;
            string         IP  = obj.IP;

            if (mainlist.Exists(aa => aa.IP == IP))
            {
                ((MainListObject)mainlist.Find(b => b.IP == IP)).Image = ToBitmapImage(a);
            }
            else
            {
                MainListObject neww = new MainListObject();
                neww.IP    = IP;
                neww.Image = ToBitmapImage(a);
                neww.port  = obj.port + 1;
                mainlist.Add(neww);
            }
        }