Пример #1
0
        public void SetUp()
        {
            _finderService            = new Mock <IFinderService>();
            _userImpersonationService = new Mock <IUserImpersonationService>();
            _authenticationRepository = new Mock <IAuthenticationRepository>();
            _awsCloudsearchService    = new Mock <IAwsCloudsearchService>();
            _groupToolService         = new Mock <IGroupToolService>();
            _analyticsService         = new Mock <IAnalyticsService>();

            _authType  = "authType";
            _authToken = "authToken";

            _fixture = new FinderController(_finderService.Object,
                                            _groupToolService.Object,
                                            _userImpersonationService.Object,
                                            _authenticationRepository.Object,
                                            _awsCloudsearchService.Object,
                                            _analyticsService.Object)
            {
                Request        = new HttpRequestMessage(),
                RequestContext = new HttpRequestContext()
            };

            _fixture.Request.Headers.Authorization = new AuthenticationHeaderValue(_authType, _authToken);
        }
Пример #2
0
 void Awake()
 {
     modalPanel               = ModalPanel.Instance();
     displayManager           = DisplayManager.Instance();
     inGameUIManagerTimerClue = InGameUIManagerTimerClue.Instance();
     finderController         = FinderController.Instance();
 }
Пример #3
0
    //private DisplayManager displayManager;

    void Awake()
    {
        finderController = FinderController.Instance();
        dialog           = GenericDialog.Instance();
        dialogs.Add("Some horrible creatures made me run through the city...");
        dialogs.Add("in the process I lost some objects, can you look for these?...");
        dialogs.Add("I will give you this shiny rock I found");
        //displayManager = DisplayManager.Instance();
        inGameUIManagerTimerClue = InGameUIManagerTimerClue.Instance();
    }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     //playerHealth = FirstPersonController.GetPlayerHealth (); // need to write this or something
     player = GameObject.FindWithTag("Finder").transform;
     finder = player.GetComponent<FinderController> ();
     cc = GetComponent<CharacterController> ();
     ghostModel = transform.GetChild (0);
     gameManager = GameObject.FindGameObjectWithTag ("GameManager").GetComponent<GameManager> ();
     //		print ("item " + item);
 }
Пример #5
0
        public ContentResult NewSubTokensCombo(string webQueryName, string tokenName, string prefix, int options)
        {
            object           queryName = Finder.ResolveQueryName(webQueryName);
            QueryDescription qd        = DynamicQueryManager.Current.QueryDescription(queryName);
            var token = QueryUtils.Parse(tokenName, qd, (SubTokensOptions)options);

            var combo = FinderController.CreateHtmlHelper(this)
                        .QueryTokenBuilderOptions(token, new Context(null, prefix), WordClient.GetQueryTokenBuilderSettings(qd, (SubTokensOptions)options));

            return(Content(combo.ToHtmlString()));
        }
Пример #6
0
    public static FinderController Instance()
    {
        if (!finderController)
        {
            finderController = FindObjectOfType(typeof(FinderController)) as FinderController;
            if (!finderController)
            {
                Debug.LogError("There needs to be one active DisplayManager script on a GameObject in your scene.");
            }
        }

        return(finderController);
    }
Пример #7
0
        /// <summary>
        ///     Function that uploads the taken picture to the webserver
        /// </summary>
        public void UploadPicture([CanBeNull] FinderController controller)
        {
            var fp = new FileProtocol(Protocol.Upload, this);

            fp.AddParameter("targetFolder", "finder");
            fp.Put("file", "profilePicture.jpeg", ContentType.Jpeg, _picture.EncodeToJPG()).Send(www => {
                if (controller == null)
                {
                    return;
                }
                controller.FinderProfileController.PersonalProfile.ImageNames.Add(www.text);
                FindObjectOfType <ProfileManagement>().OpenView();
            });
        }
Пример #8
0
        public ContentResult AddFilter(string webQueryName, string tokenName, int index)
        {
            ChartRequest request = this.ExtractChartRequestCtx(null).Value;

            QueryDescription qd = DynamicQueryManager.Current.QueryDescription(request.QueryName);

            var          token = QueryUtils.Parse(tokenName, qd, SubTokensOptions.CanAnyAll | SubTokensOptions.CanElement | (request.GroupResults ? SubTokensOptions.CanAggregate : 0));
            FilterOption fo    = new FilterOption(tokenName, null)
            {
                Token     = token,
                Operation = QueryUtils.GetFilterOperations(QueryUtils.GetFilterType(token.Type)).FirstEx(),
            };

            return(Content(FilterBuilderHelper.NewFilter(
                               FinderController.CreateHtmlHelper(this), fo, new Context(null, this.Prefix()), index).ToHtmlString()));
        }
Пример #9
0
        public ContentResult NewSubTokensCombo(string webQueryName, string tokenName, int options)
        {
            ChartRequest request = this.ExtractChartRequestCtx(null).Value;

            SubTokensOptions ops = (SubTokensOptions)options;

            if (request.GroupResults)
            {
                ops = ops | SubTokensOptions.CanAggregate;
            }
            else
            {
                ops = ops & ~SubTokensOptions.CanAggregate;
            }

            QueryDescription qd    = DynamicQueryManager.Current.QueryDescription(request.QueryName);
            QueryToken       token = QueryUtils.Parse(tokenName, qd, ops);

            var combo = FinderController.CreateHtmlHelper(this).QueryTokenBuilderOptions(token, new Context(null, this.Prefix()),
                                                                                         ChartClient.GetQueryTokenBuilderSettings(qd, ops));

            return(Content(combo.ToHtmlString()));
        }
Пример #10
0
 // Use this for initialization
 void Start()
 {
     coll = GetComponent<Collider> ();
     finder = GameObject.FindGameObjectWithTag ("Finder").GetComponent<FinderController>();
 }
Пример #11
0
 private void Awake()
 {
     Application.targetFrameRate = 30;
     instance = this;
 }