示例#1
0
        public AudioConf(MainWindow parent, IPAddress host)
        {
            parent.audioConfB.IsEnabled = false;
            InitializeComponent();
            this.Background = MainWindow.brushColor;

            this.host      = host;
            this.udp       = MainWindow.udp;
            mParent        = parent;
            Users          = new List <IPAddress>();
            vp             = new Dictionary <IPAddress, AudioPreview>();
            requestedUsers = UserList.Selected.Where(x => MainWindow.hostIPS.Contains(x) == false).ToList();
            InitializeComponent();
            if (mParent.rtpClient != null)
            {
                mParent.rtpClient.Dispose();
            }


            rtpClient = new RTPClient(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("224.5.6.7"),
                                                                (int)MainWindow.Ports.RTP), vp, string.Join("#", MainWindow.hostIPS.Select(x => x.ToString()).ToArray()), "224.5.6.7");
            //rtpClient = new RTPClient(new IPEndPoint(host,
            //    (int)MainWindow.Ports.RTP), vp, string.Join("#", MainWindow.hostIPS.Select(x => x.ToString()).ToArray()), host.ToString());
            mParent.rtpClient = this.rtpClient;
            rtpClient.window  = this;
            audio             = new Audio();
        }
示例#2
0
        public Remote(Window parent, IPAddress ip)
        {
            this.Background = MainWindow.brushColor;
            InitializeComponent();
            Dictionary <IPAddress, VideoPreview> vplist = new Dictionary <IPAddress, VideoPreview>();

            waiting               = new List <KeyStatus>();
            remoteIP              = ip;
            this.Left             = Location.X;
            this.Top              = Location.Y;
            this.LocationChanged += Remote_LocationChanged;
            rtpClient             = new RTPClient(new IPEndPoint(ip, (int)MainWindow.Ports.RTP), Screen, MainWindow.hostIP.ToString(), ip.ToString());
            rtpClient.window      = this;
            sc                     = new ScreenCapture();
            timer                  = new System.Windows.Forms.Timer();
            mousekeyTimer          = new System.Windows.Forms.Timer();
            timer.Interval         = 10;
            timer.Tick            += timer_Tick;
            mousekeyTimer.Interval = 10;
            mousekeyTimer.Tick    += mousekeyTimer_Tick;
            mainWindow             = parent as MainWindow;
        }