public ListViewPage()
        {
            InitializeComponent();
            CreateObjects pModel = new CreateObjects();

            BindingContext = pModel;
        }
        public void Main()
        {
            Require.ProviderIs(StorageProvider.SqlServer);

            // Initialize domain
            Domain domain;

            try
            {
                var domainConfig = DomainConfigurationFactory.Create();
                domainConfig.NamingConvention.NamespacePolicy = NamespacePolicy.AsIs;

                // Load assemblies with persistent classes from configuration :
                TestLog.Info("Loading plugins...");

                domainConfig.Types.Register(typeof(QueueProcessor).Assembly, typeof(QueueProcessor).Namespace);

                domainConfig.UpgradeMode = DomainUpgradeMode.Recreate;
                domain = Domain.Build(domainConfig);
            }
            catch (DomainBuilderException e)
            {
                TestLog.Error("Domain build failed: " + e.ToString());
                throw;
            }

            string key = CreateObjects.CreateTestEchoQueueProcessor(domain);

            IList <object> workList = QueueProcessor.GetWork(key, domain);

            foreach (object workUnit in workList)
            {
                QueueProcessor.Execute(key, workUnit, domain);
            }
        }
Exemplo n.º 3
0
    //TODO: Make this more accurate
    /// <summary>
    /// Casts a ray from sound to layer mask in attempts to place the sphere
    /// </summary>
    /// <returns>True if the object has been snapped to layer mask</returns>
    private bool snapToMask()
    {
        //Consider making Y value 0 before casting the ray so that everything is at eye level for the user
        Vector3 raycastDirection = (transform.position - Camera.main.transform.position).normalized;
        Vector3 position;
        int     maximumPlacementDistance = 5;
        // Cast a ray from the center of the box collider face to the surface.
        RaycastHit centerHit;

        if (!Physics.Raycast(transform.position,
                             raycastDirection,
                             out centerHit,
                             maximumPlacementDistance,
                             SpatialMappingManager.Instance.LayerMask))
        {
            // If the ray failed to hit the surface, we are done.
            return(false);
        }

        // We have found a surface.  Set position and surfaceNormal.
        position           = centerHit.point;
        transform.position = position;
        // Uncomment next line for debugging purposes to see if a sound snaps to a mask
        // GetComponent<Renderer>().material.color = Color.green;
        CreateObjects createObjects = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CreateObjects>();

        createObjects.setBestPosition(position);
        placed = true;
        return(true);
    }
Exemplo n.º 4
0
    //Use this for initialization

    void Start()
    {
        currentText   = "Microphone is Recording";
        bottom        = false;
        middle        = false;
        top           = false;
        speechBubble  = true;
        createObjects = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CreateObjects>();
    }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        cubeButton     = cubeButton.GetComponent <Button> ();
        cylinderButton = cylinderButton.GetComponent <Button> ();
        SphereButton   = SphereButton.GetComponent <Button> ();
        CapsuleButton  = CapsuleButton.GetComponent <Button> ();
        exitButton     = exitButton.GetComponent <Button> ();
        createObjects  = createObjects.GetComponent <CreateObjects> ();

        cylinderButton.onClick.AddListener(ChangeCylinder);
        cubeButton.onClick.AddListener(ChangeCube);
        SphereButton.onClick.AddListener(ChangeSphere);
        CapsuleButton.onClick.AddListener(ChangeCapsule);
        exitButton.onClick.AddListener(ClosePanel);
    }
Exemplo n.º 6
0
 private static void Main(string[] args)
 {
     CreateObjects.Run();
 }