Example #1
0
    private void Awake()
    {
        _callAppUi = FindObjectOfType <CallAppUi>();

        _callApp              = FindObjectOfType <CallApp>();
        _callAppUi.OnMessage += CallAppOnMessage;

        _customWebRtcRestManager = FindObjectOfType <CustomWebRtcRestManager>();
        _targetHighlight         = FindObjectOfType <TargetHighlight>();
    }
Example #2
0
    protected virtual void Awake()
    {
        mApp = GetComponent <CallApp>();

        if (Application.isMobilePlatform == false)
        {
            uLoudspeakerToggle.gameObject.SetActive(false);
        }
        mPrefix += this.gameObject.name + "_";
        LoadSettings();
    }
Example #3
0
    private void Awake()
    {
        _callAppUi = FindObjectOfType <CallAppUi>();

        _callApp = FindObjectOfType <CallApp>();
        _callApp.OnWaitForIncomingCall += CallAppOnWaitForIncomingCall;

        var pm = Application.absoluteURL.IndexOf("?", StringComparison.Ordinal);

        if (pm != -1)
        {
            _roomName = Application.absoluteURL.Split("?"[0])[1];
        }

        _customWebRtcRestManager    = FindObjectOfType <CustomWebRtcRestManager>();
        _localPointClickInRectangle = FindObjectOfType <LocalPointClickInRectangle>();
        _localPointClickInRectangle.OnMouseClick += OnMouseClick;
    }
 protected virtual void Awake()
 {
     mApp     = GetComponent <CallApp>();
     mPrefix += this.gameObject.name + "_";
     LoadSettings();
 }
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used when the application is launched to open a specific file, to display
        /// search results, and so forth.
        /// </summary>
        /// <param name="args">Details about the launch request and process.</param>
        protected override async void OnLaunched(LaunchActivatedEventArgs args)
        {

            // try to register background task
            CheckIfBackgroundTaskExist();

            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();
                //Associate the frame with a SuspensionManager key                                
                SuspensionManager.RegisterFrame(rootFrame, "AppFrame");

                if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    // Restore the saved session state only when appropriate
                    try
                    {
                        await SuspensionManager.RestoreAsync();
                    }
                    catch (SuspensionManagerException)
                    {
                        //Something went wrong restoring state.
                        //Assume there is no state and continue
                    }
                }

                if (rootFrame.Content == null)
                {
                    // When the navigation stack isn't restored navigate to the first page,
                    // configuring the new page by passing required information as a navigation
                    // parameter

                    if (args.Arguments.Contains("|"))
                    { // called from secondary tile
                        string[] p = args.Arguments.Split('|'); // appName + "|" + appPlatform + "|" + apiKey + "|" + appApiKey;
                        CallApp what = new CallApp();
                        what.AppApiKey = p[3];
                        what.ApiKey = p[2];
                        what.Name = p[0];
                        what.Platform = p[1];
                        rootFrame.Navigate(typeof(AppMetrics), what);
                    }
                    else
                        if (!rootFrame.Navigate(typeof(AccountApplicationsPage), args.Arguments))
                        {
                            throw new Exception("Failed to create initial page");
                        }

                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            else
            {

                if (args.Arguments.Contains("|"))
                { // called from secondary tile
                    string[] p = args.Arguments.Split('|'); // appName + "|" + appPlatform + "|" + apiKey + "|" + appApiKey;
                    CallApp what = new CallApp();
                    what.AppApiKey = p[3];
                    what.ApiKey = p[2];
                    what.Name = p[0];
                    what.Platform = p[1];
                    rootFrame.Navigate(typeof(AppMetrics), what);
                }

            }
            
            // Ensure the current window is active
            Window.Current.Activate();

            // integrate mandatory settings items

            SettingsPane.GetForCurrentView().CommandsRequested += OnSettingsPaneCommandRequested;

        }
 private void EventsListBox_ItemClick_1(object sender, ItemClickEventArgs e)
 {
     // jump to EventMetrics
     CallApp what = new CallApp();
     what.AppApiKey = appApiKey;
     what.ApiKey = apiKey;
     what.Name = appName;
     what.Platform = appPlatform;
     what.Event = ((EventItem)e.ClickedItem).eventName;
     this.Frame.Navigate(typeof(EventMetrics), what);
 }