public void BorderlandSelected(object sender, EventArgs e)
        {
            string selectedBl = null;

            var label = sender as Label;

            if (label != null)
            {
                selectedBl = (string)label.Tag;
            }

            var item = sender as MenuItem;

            if (item != null)
            {
                selectedBl = (string)item.Tag;
            }

            if (selectedBl == null)
            {
                selectedBl = "Center";
            }

            WvwMatch.Options.active_bl = selectedBl;
            Icons.ItemsSource          = WvwMatch.Details.Maps[WvwMatch.Options.blid[selectedBl]].Objectives;

            if (LogWindow != null)
            {
                LogWindow.lblBLTitle.Content = WvwMatch.Options.active_bl_title;
            }

            MainWindow1.InvalidateVisual();

            CnvsBlSelection.Visibility = Visibility.Hidden;
        }
Beispiel #2
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     btConectar.Content = "Desconectar";
     sis.Conectar(cbPorts.Text);
     sis.iniciarSoftware();
     MainWindow1.Close();
 }
Beispiel #3
0
 public MainWindow(string sMessage)
 {
     InitializeComponent();
     MainWindow1.Activate();
     rtbError.AppendText(sMessage);
     MainWindow1.Activate();
 }
Beispiel #4
0
 //end game button clicked button
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (gameStarted == false)
     {
         Save();
         MainWindow1.Close();
     }
 }
Beispiel #5
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if ((string)Connect_btn.Content == "Disconect")
     {
         try
         {
             cl.ClientDis();
         }
         catch { }
     }
     MainWindow1.Close();
 }
Beispiel #6
0
        //void h_InConference(iConfRTC.Shared.ConferenceEventArgs e)
        //{
        //    ShowMessage((e.userName == model.UserName ? "You " : e.userName) + " joined " + e.conferenceId);
        //    // MessageBox.Show("You (" + e.userName + ") have joined  conference  + e.conferenceId);
        //    h.EnableOverlay("In conference : " + e.conferenceId, "position:absolute;bottom:0px;color:#FFF;text-align:center;font-size:20px;background-color:rgba(221,221,221,0.3);width:640px;padding:10px0;z-index:2147483647;font-family: Verdana, Geneva, sans-serif;", true);
        //}

        private void ProcessParticipants(List <MeetingParticipants> participants, string sessionJoined, bool isSharing)
        {
            foreach (var participant in participants)
            {
                if (participant.Session != rtcControl.MySession) //you are already seeing yourself :)
                {
                    var sessionExists = currParticipants.Any(p => p.Session == participant.Session);

                    if (!sessionExists)
                    {
                        var viewer = new RTCControl
                        {
                            SignalingType = SignalingTypes.Socketio,
                            SignalingUrl  = model.SignalingUrl,
                            Height        = 360,
                            Width         = 480,
                            Visibility    = System.Windows.Visibility.Visible,
                            ToolTip       = participant.UserName,
                            MySession     = participant.Session
                        };

                        int elementPosition = videoList.Children.Add(viewer);
                        currParticipants.Add(new CurrentParticipants
                        {
                            Session         = participant.Session,
                            UserName        = participant.UserName,
                            ElementPosition = elementPosition,
                            Viewer          = viewer
                        });

                        MainWindow1.UpdateLayout();
                        AttachLoadingAdorner(viewer, participant.UserName);

                        //only call webrtc functions when WebRTC is ready!!
                        viewer.RTCInitialized += (((object a) =>
                        {
                            //you can add a turn server here
                            //viewer.AddIceServer(url: "numb.viagenie.ca", userName: "******", password: "******", clearFirst: false, type: "turn");
                            //viewer.AddIceServer("stun.voiparound.com");

                            //webrtc is ready, connect to signaling
                            viewer.ViewSession(participant.UserName, participant.Session);
                        }));
                    }
                }
            }
        }
Beispiel #7
0
        private void ProcessParticipants(List <MeetingParticipants> participants, string sessionJoined, bool isSharing)
        {
            foreach (var participant in participants)
            {
                if (participant.Session != rtcControl.MySession) //you are already seeing yourself :)
                {
                    var sessionExists = currParticipants.Any(p => p.Session == participant.Session);

                    if (!sessionExists)
                    {
                        var viewer = new RTCControl
                        {
                            SignalingType = SignalingTypes.Socketio,
                            SignalingUrl  = model.SignalingUrl,
                            Height        = 360,
                            Width         = 480,
                            Visibility    = System.Windows.Visibility.Visible,
                            ToolTip       = participant.UserName,
                            MySession     = participant.Session
                        };

                        int elementPosition = videoList.Children.Add(viewer);
                        currParticipants.Add(new CurrentParticipants
                        {
                            Session         = participant.Session,
                            UserName        = participant.UserName,
                            ElementPosition = elementPosition,
                            Viewer          = viewer
                        });

                        MainWindow1.UpdateLayout();
                        AttachLoadingAdorner(viewer, participant.UserName);

                        //only call webrtc functions when WebRTC is ready!!
                        viewer.RTCInitialized += (((object a) =>
                        {
                            viewer.ViewSession(participant.UserName, participant.Session);
                        }));
                    }
                }
            }
        }
 private void MoveButton_MouseDown(object sender, MouseButtonEventArgs e)
 {
     MainWindow1.DragMove();
 }
Beispiel #9
0
        /// <summary>
        /// This is where we go through each participant and setup a viewer which is another instance of the iConfRTC control
        /// </summary>
        /// <param name="participants">the list of participants of the meeting</param>
        private void ProcessParticipants(List <MeetingParticipants> participants)
        {
            foreach (var participant in participants)
            {
                if (participant.Session != rtcControl.MySession)
                {
                    RTCControl viewer;
                    viewer = new RTCControl();
                    viewer.SignalingType = SignalingTypes.Socketio;// SignalingTypes.SignalR;// SignalingTypes.Socketio;
                    viewer.SignalingUrl  = model.SignalingUrl;
                    viewer.Height        = 360;
                    viewer.Width         = 480;


                    viewer.Visibility = System.Windows.Visibility.Visible;
                    viewer.ToolTip    = participant.UserName;
                    viewer.MySession  = participant.Session;



                    //check to see if we are already viewing the session
                    foreach (object item in videoList.Children)
                    {
                        if (item.GetType() == typeof(RTCControl))
                        {
                            var session = (item as RTCControl).MySession;
                            if (session != null)
                            {
                                if (session == participant.Session)
                                {
                                    return;
                                }
                                else
                                {
                                    continue;
                                }
                            }
                        }
                    }

                    int elementPosition = videoList.Children.Add(viewer);
                    currParticipants.Add(new CurrentParticipants {
                        Session = participant.Session, UserName = participant.UserName, ElementPosition = elementPosition, Viewer = viewer
                    });

                    MainWindow1.UpdateLayout();
                    AttachLoadingAdorner(viewer, participant.UserName, participant.Session);


                    ///only call webrtc functions when WebRTC is ready!!
                    viewer.RTCInitialized += (((object a) =>
                    {
                        //you can add a turn server here
                        //viewer.AddIceServer(url: "numb.viagenie.ca", userName: "******", password: "******", clearFirst: false, type: "turn");
                        //viewer.AddIceServer("stun.voiparound.com");

                        //webrtc is ready, connect to signaling
                        string ranUser = Helper.RandomString(8);
                        viewer.ViewSession(participant.Session);
                    }));
                }
            }
        }
Beispiel #10
0
 private void Exit_Click(object sender, RoutedEventArgs e)
 {
     MainWindow1.Close();
 }