Esempio n. 1
1
        async void Handle_Clicked(object sender, System.EventArgs e)
        {
            var x = new CloudData();

            GraphUser y = await x.GetDisplayName();


            Task <string> access_id = x.GetAccessID();

            System.Diagnostics.Debug.WriteLine("Debug: get access ID " + access_id.Result);

            //await DisplayAlert("Alert", "Welcome, " + y, "OK");

            var displayName = new Item
            {
                Name    = "Logged in as: " + y.displayName,
                Company = "Company: " + y.Company,
                Stand   = "Stand number: " + y.StandID
            };

            App.Current.Properties["LoginName"]   = "Logged in as: " + y.displayName;
            App.Current.Properties["StandName"]   = "Stand ID: " + y.StandID;
            App.Current.Properties["CompanyName"] = "Company: " + y.Company;



            await App.Current.SavePropertiesAsync();

            var Scanner = new Scanner.Scanner();

            Scanner.BindingContext = displayName;


            Application.Current.MainPage = Scanner;
        }
        async public void SubmitCodeToCloud(string code)

        {
            //string encodedString = Base64Encode(code);

            System.Diagnostics.Debug.WriteLine("Debug: user is attempting to submit code of length " + code.Length + ":" + code);

            var submit = new CloudData();

            string userAddedNotes = TextNotes.Text;

            var response = await submit.PostBarcode(code, userAddedNotes);

            if (response == "OK")

            {
                await DisplayAlert("Success", "Your unique code was successfully saved", "OK");


                var Scanner = new Scanner.Scanner();

                // Navigate to our scanner page

                App.Current.MainPage = Scanner;
            }

            else

            {
                await DisplayAlert("Alert", "An error occurred, please scan and submit your QR code again", "OK");
            }
        }
Esempio n. 3
0
        public void CreateNewButton(int id)
        {
            CloudData  currcloud = CloudUpdater.instance.LoadStatus(id);
            GameObject son       = Instantiate(_selectionButtonContainerPrefab) as GameObject;

            son.GetComponent <Transform>().SetParent(_selftransform, false);

            GameObject filenamebutton = son.GetComponent <SelectionButtonContainerRefference>().filenamebutton;

            filenamebutton.GetComponent <CloudSelectionButton>().id = id;
            filenamebutton.name = currcloud.globalMetaData.fileName;
            filenamebutton.GetComponentInChildren <Text>().text = currcloud.globalMetaData.fileName;

            GameObject closebutton = son.GetComponent <SelectionButtonContainerRefference>().closebutton;

            closebutton.GetComponent <CloseCloudByIDButton>().id = id;

            _selectionButtonList.Add(id, son);
            if (VR)
            {
                UIManager.instance.VRselectionButtonsDict.Add(id, filenamebutton.GetComponent <Button>());
                UIManager.instance.VRcloseButtonsDict.Add(id, closebutton.GetComponent <Button>());
            }
            else
            {
                UIManager.instance.selectionButtonsDict.Add(id, filenamebutton.GetComponent <Button>());
                UIManager.instance.closeButtonsDict.Add(id, closebutton.GetComponent <Button>());
            }
        }
Esempio n. 4
0
        private void cmdRun()
        {
            CloudData cd = new CloudData(URL, Key);
            cd.SetTimeout(Timeout);

            var rs = cd.Query(Query);

            Result = rs.RawContent;
            try
            {
                //Object jObject = JsonConvert.DeserializeObject<JObject>(Result);
                ResultDataTable = JsonConvert.DeserializeObject<DataTable>(Result);
                // = data.Tables[0];

                StringBuilder sb = new StringBuilder();

                foreach (var i in ResultDataTable.Columns.Cast<DataColumn>())
                {
                    sb.AppendLine($"public {i.DataType.ToString()} {i.ColumnName} " + "{get ; set ; }");

                }

                ResultCode = sb.ToString();

            }
            catch (Exception ex)
            {            
                ResultDataTable = new DataTable();
            }

            OnPropertyChanged("Result");
            OnPropertyChanged("ResultCode");
            OnPropertyChanged("ResultDataTable");
        }
Esempio n. 5
0
    public override void ExecutePlugin()
    {
        CloudData data = CloudUpdater.instance.LoadCurrentStatus();

        LaunchPluginFunction(data);
        DisplayResults();
    }
Esempio n. 6
0
    private void OnTriggerEnter(Collider cloud_box)
    {
        if (!isChild)
        {
            if (cloud_box.tag == "PointCloud")
            {
                isChild = true;

                container = new GameObject("container");
                container.transform.position = this.transform.position;

                container.transform.SetParent(cloud_box.transform, true);
                //container.transform.rotation = Quaternion.identity;
                container.transform.localRotation = Quaternion.identity;
                container.transform.localScale    = Vector3.one;
                //transform.SetParent(container.transform, true);

                if (!GetComponent <VRTK_TransformFollow>())
                {
                    gameObject.AddComponent <VRTK_TransformFollow>();
                }

                GetComponent <VRTK_TransformFollow>().followsScale = false;

                GetComponent <VRTK_TransformFollow>().gameObjectToChange = this.gameObject;
                GetComponent <VRTK_TransformFollow>().gameObjectToFollow = container;
                GetComponent <VRTK_TransformFollow>().moment             = VRTK_TransformFollow.FollowMoment.OnLateUpdate;

                CloudData cloud_data = cloud_box.transform.parent.GetComponentInChildren <CloudData>();
                clouddata = cloud_data;
                PutInMemory(cloud_data);
            }
        }
    }
        private void ProcessReceivedData(List <float[]> SelectedAlphaList)
        {
            CloudData data = CloudUpdater.instance.LoadCurrentStatus();

            float[] alphacolumn = new float[data.pointDataTable.Count];
            for (int i = 0; i < alphacolumn.Length; i++)
            {
                alphacolumn[i] = defaultAlphaValue;
            }

            if (!data.globalMetaData.alphacolumnExists)
            {
                CreateAlphaColumn(data, alphacolumn);
            }

            for (int i = 0; i < SelectedAlphaList[0].Length; i++)
            {
                alphacolumn[(int)SelectedAlphaList[0][i]] = SelectedAlphaList[1][i];
            }
            //float[]
            //for(int i = 0; i < SelectedAlphaList.Count; i++)
            //{
            //alphacolumn[(int)SelectedAlphaList[0][i]] = SelectedAlphaList[1][i];
            //}

            data.columnData[data.globalMetaData.alphacolumnIndex] = alphacolumn;

            float max = Mathf.NegativeInfinity;
            float min = Mathf.Infinity;

            for (int i = 0; i < alphacolumn.Length; i++)
            {
                if (alphacolumn[i] <= min)
                {
                    min = alphacolumn[i];
                }

                if (alphacolumn[i] >= max)
                {
                    max = alphacolumn[i];
                }
            }

            ColumnMetadata metadata = new ColumnMetadata();

            metadata.ColumnID     = data.globalMetaData.alphacolumnIndex;
            metadata.MaxValue     = min;
            metadata.MinValue     = max;
            metadata.MinThreshold = min;
            metadata.MaxThreshold = max;
            metadata.Range        = max - min;

            data.globalMetaData.columnMetaDataList[data.globalMetaData.alphacolumnIndex] = metadata;
            //ModalWindowManager.instance.CreateModalWindow("Column "+ (data.globalMetaData.alphacolumnIndex+1) +
            //                                              " has been modified." + "\n");
            UpdatePointColor(data, alphacolumn);
            UIManager.instance.ChangeStatusText("Cloud data has been updated !");
            StopTime = DateTime.Now;
            EvaluateTimespan();
        }
Esempio n. 8
0
        // When the sphere touches the trigger collider of a cloud box, this function link the sphere to the box so it can follow its movement and rotation.

        /**
         * private void OnTriggerEnter(Collider cloud_box)
         * {
         *  if (taskOn)
         *  {
         *      if (cloud_box.tag == "PointCloud")
         *      {
         *
         *          ConstraintSource source = new ConstraintSource();
         *          source.sourceTransform = cloud_box.transform;
         *          source.weight = 1;
         *          this.gameObject.GetComponent<ParentConstraint>().AddSource(source);
         *          Vector3 offsetVector = this.transform.position - cloud_box.transform.position;
         *          this.gameObject.GetComponent<ParentConstraint>().SetTranslationOffset(0, Quaternion.Inverse(cloud_box.transform.rotation) * offsetVector);
         *          this.gameObject.GetComponent<ParentConstraint>().locked = true;
         *          this.gameObject.GetComponent<ParentConstraint>().constraintActive = true;
         *
         *      }
         *  }
         * }
         * //If the sphere exits the trigger collider, remove the parent constraint's effects.
         * private void OnTriggerExit(Collider cloud_box)
         * {
         *  if (taskOn)
         *  {
         *      if (cloud_box.tag == "PointCloud")
         *      {
         *          this.gameObject.GetComponent<ParentConstraint>().constraintActive = false;
         *          this.gameObject.GetComponent<ParentConstraint>().RemoveSource(0);
         *      }
         *  }
         * }
         **/

        //

        private void OnTriggerEnter(Collider cloud_box)
        {
            if (cloud_box.tag == "PointCloud")
            {
                data = cloud_box.transform.parent.GetComponentInChildren <CloudData>();
            }
        }
Esempio n. 9
0
        public override void Execute()
        {
            if (!CloudSelector.instance.noSelection)
            {
                data = CloudUpdater.instance.LoadCurrentStatus();
                data.transform.parent.gameObject.GetComponent <CloudObjectRefference>().box.gameObject.GetComponent <DragMouse>().enabled = runUpdate;
                data.globalMetaData.FreeSelectionON = true;

                runUpdate = !runUpdate;
                if (runUpdate)
                {
                    MeshObject = new GameObject("Selection Mesh Object");
                    MeshObject.AddComponent <MeshRenderer>();
                    MeshObject.AddComponent <MeshFilter>();
                    data.transform.parent.gameObject.GetComponent <CloudObjectRefference>().box.transform.position    = Vector3.zero;
                    data.transform.parent.gameObject.GetComponent <CloudObjectRefference>().box.transform.eulerAngles = Vector3.zero;
                    UIManager.instance.DeactivateSelectionButtons();
                    GetComponent <Image>().color = Color.green;
                }
                else
                {
                    Destroy(MeshObject);
                    UIManager.instance.ActivateSelectionButtons();
                    GetComponent <Image>().color = Color.white;
                }
            }
        }
        private void NullifyPointColors(CloudData data)
        {
            Mesh mesh = data.GetComponent <MeshFilter>().mesh;

            Vector2[] uv1 = mesh.uv2;
            uv1save = new Vector2[uv1.Length];
            uv1.CopyTo(uv1save, 0);
            for (int i = 0; i < uv1.Length; i++)
            {
                uv1[i].x = 0;
            }
            mesh.uv2 = uv1;
            data.GetComponent <MeshFilter>().mesh = mesh;

            if (data.trajectoryObject)
            {
                Mesh trajmesh = data.trajectoryObject.GetComponent <MeshFilter>().mesh;

                Vector2[] trajuv1 = trajmesh.uv2;
                trajuv1save = new Vector2[trajuv1.Length];

                trajuv1.CopyTo(trajuv1save, 0);
                for (int i = 0; i < trajuv1.Length; i++)
                {
                    trajuv1[i].x = 0;
                }
                trajmesh.uv2 = trajuv1;
                data.trajectoryObject.GetComponent <MeshFilter>().mesh = trajmesh;
            }
        }
Esempio n. 11
0
 protected override void AssignValues(CloudData data)
 {
     maxValue = data.globalMetaData.zMax;
     minValue = data.globalMetaData.zMin;
     defaultminSliderValue = data.globalMetaData.zMinThreshold;
     defaultmaxSliderValue = data.globalMetaData.zMaxThreshold;
 }
Esempio n. 12
0
 private static void UpgradeResources()
 {
     UnityEditor.EditorApplication.delayCall += () =>
     {
         CloudData.SaveInDropboxAFolderAsync("/resources", Application.persistentDataPath + "/resources", new User(), new List <string>(new string[] { ".json", ".csv" }));
     };
 }
Esempio n. 13
0
        async public void EditProfile()

        {
            var action = await DisplayAlert("Edit Profile", "The following page will enable you to edit profile information like Stand ID or Company Name", "PROCEED", "GO BACK");

            if (action)

            {
                var x = new CloudData();
                AuthenticationResult token = await x.GetAccessToken("edit"); // Edit Profile



                await DisplayAlert("Message", "If you have made changes to your profile, please note it may take up to 30 seconds for them to be reflected in the app.\n\nIf you have changed conference password, please log out and in again.", "OK");


                TextName.Text    = "";
                TextStand.Text   = "";
                TextCompany.Text = "";

                var ReloadPage = new LoginPage();

                App.Current.MainPage = ReloadPage;
            }
        }
Esempio n. 14
0
        public void SelectionChange(int id)
        {
            DeleteAllButtons();
            CloudData data = CloudUpdater.instance.LoadStatus(id);

            foreach (KeyValuePair <int, GameObject> kvp in data.globalMetaData.counterPointsList)
            {
                ContainerCreated(kvp.Value.GetComponent <VRContainerCounter>().id, kvp.Value, "Counter");
            }
            foreach (KeyValuePair <int, GameObject> kvp in data.globalMetaData.rulerPointsList)
            {
                ContainerCreated(kvp.Value.GetComponent <VRContainerRuler>().id, kvp.Value, "Ruler");
            }
            foreach (KeyValuePair <int, GameObject> kvp in data.globalMetaData.angleMeasurementsList)
            {
                ContainerCreated(kvp.Value.GetComponent <VRContainerAngleMeasurement>().id, kvp.Value, "AngleMeasurement");
            }
            foreach (KeyValuePair <int, GameObject> kvp in data.globalMetaData.histogramList)
            {
                ContainerCreated(kvp.Value.GetComponent <VRContainerHistogram>().id, kvp.Value, "Histogram");
            }
            foreach (KeyValuePair <int, GameObject> kvp in data.globalMetaData.sphereList)
            {
                ContainerCreated(kvp.Value.GetComponent <VRContainerSelectionSphere>().id, kvp.Value, "Sphere");
            }
            foreach (KeyValuePair <int, GameObject> kvp in data.globalMetaData.convexHullsList)
            {
                ContainerCreated(kvp.Value.GetComponent <VRContainerConvexHull>().id, kvp.Value, "ConvexHull");
            }
        }
Esempio n. 15
0
 private void OnTriggerEnter(Collider cloud_box)
 {
     if (cloud_box.tag == "PointCloud")
     {
         /**
          *
          * if (!parent_activated)
          *
          *
          * {
          *
          *  GameObject container = new GameObject("container");
          *  container.transform.position = this.transform.position;
          *  container.transform.SetParent(cloud_box.transform,true);
          *  gameObject.AddComponent<VRTK_TransformFollow>();
          *  gameObject.GetComponent<VRTK_TransformFollow>().followsScale = false;
          *
          *  gameObject.GetComponent<VRTK_TransformFollow>().gameObjectToChange = this.gameObject;
          *  gameObject.GetComponent<VRTK_TransformFollow>().gameObjectToFollow = container;
          *  gameObject.GetComponent<VRTK_TransformFollow>().moment = VRTK_TransformFollow.FollowMoment.OnLateUpdate;
          *
          * }
          **/
         cloud_data = cloud_box.transform.parent.GetComponentInChildren <CloudData>();
         if (selectionNotDone)
         {
             findPointsInsideHull();
             selectionNotDone = false;
         }
     }
 }
Esempio n. 16
0
        public void WriteSaveFile(string path)
        {
            CloudData currcloud = CloudUpdater.instance.LoadCurrentStatus();

            using (System.IO.StreamWriter writer = new System.IO.StreamWriter(path))
            {
                for (int i = 0; i < currcloud.pointDataTable.Count; i++)
                {
                    if (currcloud.pointMetaDataTable[i].isHidden == false)
                    {
                        string s = "";
                        for (int j = 0; j < currcloud.columnData.Count; j++)
                        {
                            s = s + currcloud.columnData[j][i].ToString(CultureInfo.InvariantCulture);
                            if (j < currcloud.columnData.Count - 1)
                            {
                                s = s + "\t";
                            }
                        }
                        writer.WriteLine(s);
                    }
                }
            }

            SaveJSON(path);
        }
Esempio n. 17
0
        public void Create()
        {
            if (!CloudSelector.instance.noSelection)
            {
                if (created)
                {
                    Delete();
                }

                CloudData selectedCloud = CloudUpdater.instance.LoadCurrentStatus();

                toggleList    = new List <List <GameObject> >();
                headerList    = new List <GameObject>();
                selectionList = new List <int>();
                collumnnbr    = selectedCloud.columnData.Count;
                for (int i = 0; i < VARIABLENUMBER; i++)
                {
                    toggleList.Add(new List <GameObject>());
                    selectionList.Add(selectedCloud.globalMetaData.displayCollumnsConfiguration[i]);
                }

                CreateToggles(selectedCloud);
                applyButton.onClick.AddListener(ApplySelection);
                created = true;
            }
        }
Esempio n. 18
0
        public void SaveSelection(string path)
        {
            CloudData currcloud = CloudUpdater.instance.LoadCurrentStatus();

            int[] selectedPointsList = new int[currcloud.globalMetaData.SelectedPointsList.Count];
            currcloud.globalMetaData.SelectedPointsList.CopyTo(selectedPointsList);
            using (System.IO.StreamWriter writer = new System.IO.StreamWriter(path))
            {
                for (int i = 0; i < selectedPointsList.Length; i++)
                {
                    if (currcloud.pointMetaDataTable[selectedPointsList[i]].isHidden == false)
                    {
                        string s = "";
                        for (int j = 0; j < currcloud.columnData.Count; j++)
                        {
                            s = s + currcloud.columnData[j][selectedPointsList[i]].ToString(CultureInfo.InvariantCulture);
                            if (j < currcloud.columnData.Count - 1)
                            {
                                s = s + "\t";
                            }
                        }
                        writer.WriteLine(s);
                    }
                }
            }
        }
Esempio n. 19
0
        public void SaveSelectionCSV(string path)
        {
            string separator = "; ";

            CloudData currcloud = CloudUpdater.instance.LoadCurrentStatus();


            using (System.IO.StreamWriter writer = new System.IO.StreamWriter(path))
            {
                writer.WriteLine("id" + separator + "x" + separator + "y" + separator + "z" + separator +
                                 "color" + separator + "time" + separator + "trajectory" + separator +
                                 "phi" + separator + "theta" + separator + "size" + "\t");
                foreach (var i in currcloud.pointDataTable)
                {
                    //if (currcloud.pointMetaDataTable[i].isHidden == false)
                    //{
                    string s = currcloud.pointDataTable[i.Key].pointID + separator +
                               currcloud.pointDataTable[i.Key].position.x + separator +
                               currcloud.pointDataTable[i.Key].position.y + separator +
                               currcloud.pointDataTable[i.Key].position.z + separator +
                               currcloud.pointDataTable[i.Key].intensity + separator +
                               currcloud.pointDataTable[i.Key].time + separator +
                               currcloud.pointDataTable[i.Key].trajectory + separator +
                               currcloud.pointDataTable[i.Key].phi_angle + separator +
                               currcloud.pointDataTable[i.Key].theta_angle + separator +
                               currcloud.pointDataTable[i.Key].size + "\t";

                    writer.WriteLine(s);

                    //}
                }
            }
        }
Esempio n. 20
0
        public override void Execute()
        {
            CloudData data = CloudUpdater.instance.LoadCurrentStatus();

            if (trajectorymodeON == false)
            {
                //UIManager.instance.DeactivateSelectionButtons();
                TrajectoryUIContainer.SetActive(true);

                CloudUpdater.instance.DisplayTrajectories();

                TrajectoriesRenderer = data.trajectoryObject.GetComponent <MeshRenderer>();

                PointsRenderer = data.GetComponent <MeshRenderer>();
                TimeList       = data.globalMetaData.timeList;

                currentTimeIndex     = 0;
                frameSlider.minValue = 0f;
                frameSlider.maxValue = TimeList.Count - 1;
                frameSlider.value    = 0f;

                CloudUpdater.instance.SetShaderFrame(0f, 1f);
                trajectorymodeON = true;
            }
            else
            {
                TrajectoryUIContainer.SetActive(false);

                //UIManager.instance.ActivateSelectionButtons();

                CloudUpdater.instance.HideTrajectories();
                playAnimation    = false;
                trajectorymodeON = false;
            }
        }
Esempio n. 21
0
        public override void Execute()
        {
            data = CloudUpdater.instance.LoadCurrentStatus();

            if (trajectorymodeON == false)
            {
                UIManager.instance.DeactivateSelectionButtons();
                PointsRenderer = data.GetComponent <MeshRenderer>();
                TimeList       = data.globalMetaData.timeList;

                currentTimeIndex     = 0;
                frameSlider.minValue = 0f;
                frameSlider.maxValue = TimeList.Count - 1;
                frameSlider.value    = 0f;
                trajectorymodeON     = true;
            }
            else
            {
                UIManager.instance.ActivateSelectionButtons();

                data.globalMetaData.tMaxThreshold = TimeList.Count - 1;
                CloudUpdater.instance.ChangeThreshold();
                playAnimation    = false;
                trajectorymodeON = false;
            }
        }
Esempio n. 22
0
        public void FindPointsProto(List <GameObject> circleList, List <Vector3> circlePositionsList)
        {
            currcloud = CloudUpdater.instance.LoadCurrentStatus();

            List <Vector3> CircleLocalPositionsList = new List <Vector3>();

            foreach (var v in circlePositionsList)
            {
                CircleLocalPositionsList.Add(currcloud.transform.worldToLocalMatrix.MultiplyPoint3x4(v));
            }

            HistogramPointSelectionThreadHandler ThreadHandle = new HistogramPointSelectionThreadHandler();

            ThreadHandle.circlePositionsList      = circlePositionsList;
            ThreadHandle.circleLocalPositionsList = CircleLocalPositionsList;
            ThreadHandle.radius    = radius;
            ThreadHandle.colorList = colorList;
            ThreadHandle.currcloud = currcloud;
            ThreadHandle.StartThread();
            SelectionThreadQueue.Enqueue(ThreadHandle);
            pointSelectionJobON = true;

            this.circleList          = circleList;
            this.circlePositionsList = circlePositionsList;

            /**
             * Mesh newmesh = currcloud.gameObject.GetComponent<MeshFilter>().mesh;
             * newmesh.colors = colors;
             * currcloud.gameObject.GetComponent<MeshFilter>().mesh = newmesh;
             * CreateCanvas(pointCountsbySections);
             * yValues = pointCountsbySections;
             **/
        }
        private void UpdatePointColor(CloudData data, float[] alphacolumn)
        {
            //TODO : Incorporate this in CloudUpdater
            Shader.EnableKeyword("COLOR_OVERRIDE");
            //Shader.DisableKeyword("FREE_SELECTION");
            Mesh mesh = data.GetComponent <MeshFilter>().mesh;

            Vector2[] uv1 = mesh.uv2;
            for (int i = 0; i < uv1.Length; i++)
            {
                uv1[i].x = alphacolumn[i] / 2;
            }
            mesh.uv2 = uv1;

            //mesh.uv2 = uv1save;
            data.GetComponent <MeshFilter>().mesh = mesh;

            if (data.trajectoryObject)
            {
                Mesh      trajmesh = data.trajectoryObject.GetComponent <MeshFilter>().mesh;
                Vector2[] trajuv1  = trajmesh.uv2;
                for (int i = 0; i < trajuv1.Length; i++)
                {
                    trajuv1[i].x = alphacolumn[i] / 2;
                }
                trajmesh.uv2 = trajuv1;
                data.trajectoryObject.GetComponent <MeshFilter>().mesh = trajmesh;
            }
        }
Esempio n. 24
0
 public override void PutInMemory(CloudData cloud_data)
 {
     if (!clouddata.globalMetaData.angleMeasurementsList.ContainsKey(this.id))
     {
         cloud_data.globalMetaData.angleMeasurementsList.Add(this.id, this.gameObject);
         Debug.Log("Angle Measure " + id + " put in memory");
     }
 }
Esempio n. 25
0
 public override void PutInMemory(CloudData cloud_data)
 {
     if (!clouddata.globalMetaData.counterPointsList.ContainsKey(this.id))
     {
         cloud_data.globalMetaData.counterPointsList.Add(this.id, this.gameObject);
         Debug.Log("Counter " + id + " put in memory");
     }
 }
Esempio n. 26
0
        protected override void ChangeThresholds()
        {
            CloudData data = CloudUpdater.instance.LoadCurrentStatus();

            data.globalMetaData.zMinThreshold = Threshold.x;
            data.globalMetaData.zMaxThreshold = Threshold.y;
            CloudUpdater.instance.ChangeThreshold();
        }
Esempio n. 27
0
 public override void PutInMemory(CloudData cloud_data)
 {
     if (!clouddata.globalMetaData.histogramList.ContainsKey(this.id))
     {
         cloud_data.globalMetaData.histogramList.Add(id, this.gameObject);
         Debug.Log("Histogram " + id + " put in memory");
     }
 }
Esempio n. 28
0
 public SphereSelectionThreadHandler(float radius, CloudData cloud, Vector3 selflocalpos, Color[] colors)
 {
     this.radius             = radius;
     this.data               = cloud;
     this.selflocalpos       = selflocalpos;
     this.colors             = colors;
     this.pointSelectionList = new HashSet <int>();
 }
Esempio n. 29
0
        protected override void AssignValues(int i)
        {
            CloudData data = CloudUpdater.instance.LoadCurrentStatus();

            maxValue = data.globalMetaData.zMax;
            minValue = data.globalMetaData.zMin;
            defaultminSliderValue = data.globalMetaData.zMinThreshold;
            defaultmaxSliderValue = data.globalMetaData.zMaxThreshold;
        }
Esempio n. 30
0
 private void OnDisable()
 {
     if (canvas)
     {
         canvascontainer.SetActive(false);
         CloudData data = CloudUpdater.instance.LoadCurrentStatus();
         CloudUpdater.instance.ChangeCurrentColorMap(data.globalMetaData.colormapName, data.globalMetaData.colormapReversed);
     }
 }
        /**
         * public void SwitchModes()
         * {
         *  InferenceModeActive = !InferenceModeActive;
         *  if (InferenceModeActive)
         *  {
         *      InitiateInferenceMode();
         *  }
         *  else
         *  {
         *      DeactivateInferenceMode();
         *  }
         * }
         **/
        private void InitiateInferenceMode()
        {
            CloudData data = CloudUpdater.instance.LoadCurrentStatus();

            CloudUpdater.instance.OnSelectionUpdate += SendData;
            NullifyPointColors(data);
            UnityEngine.Debug.Log("Real Time Inference activated");
            UIManager.instance.ChangeStatusText("Real Time Inference Mode Activated");
            UIManager.instance.DeactivateSelectionButtons();
        }
Esempio n. 32
0
        static void Main(string[] args)
        {
            CloudData cd = new CloudData("http://fhdist.com/fishbowl/", "2497!NjSDKJ");
            cd.SetTimeout(10000);

            var rs = cd.Query("select * from oc_country");            
            Console.WriteLine(rs.StopWatch.Elapsed.ToString());

            var obj = cd.Query<List<TestObject>>("select * from oc_country limit 10");
            if(obj.Data != null)
                Console.WriteLine("Records: " + obj.Data.Count); 

            var test = cd.Execute("update oc_country set address_format = 'TEST' where country_id = 1");
            Console.WriteLine(test.Executed);
            Console.WriteLine(test.StopWatch.Elapsed.ToString());

            Console.ReadLine();
        }