Beispiel #1
0
        private void researchSubLabel_valueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            //get target object
            var _object = sender as Slider;

            //detect event objects
            if (_object.Parent == researchPanel)
            {
                //->update data
                List<DataSet> _tempList = new List<DataSet>();

                foreach (DataSet ds in oeiData.OEIAllOEIData)
                {
                    DataSet _temp = new DataSet();

                    _temp.y = ds.y;

                    _temp.a1 = ds.a1 * researchOutputSlider.Value;
                    _temp.a2 = ds.a2 * researchEnvironmentSlider.Value;
                    _temp.a3 = ds.a3 * researchImpactSlider.Value;

                    _temp.b1 = ds.b1 * researchOutputSlider.Value;
                    _temp.b2 = ds.b2 * researchEnvironmentSlider.Value;
                    _temp.b3 = ds.b3 * researchImpactSlider.Value;

                    _temp.c1 = ds.c1 * researchOutputSlider.Value;
                    _temp.c2 = ds.c2 * researchEnvironmentSlider.Value;
                    _temp.c3 = ds.c3 * researchImpactSlider.Value;

                    _tempList.Add(_temp);
                }

                //update data image
                DataImage _newDataMap = new DataImage();
                _newDataMap.GenerateHisCircles(_tempList);

                //update mesh
                scene.Update(_newDataMap.DepthImage, _newDataMap.TextureImage, state);
            }
            else if (_object.Parent == teachingPanel)
            {
            }
            else if (_object.Parent == enterprisingPanel)
            {
            }
            else
            {
            }
        }
Beispiel #2
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            //Check if GPU is on
            if (GraphicsDeviceManager.Current.RenderMode != RenderMode.Hardware) MessageBox.Show("Please activate enableGPUAcceleration=true on your Silverlight plugin page.", "Warning", MessageBoxButton.OK);

            //initialise UI
            InitialiseUI();

            //Create scene
            scene = new Scene(myDrawingSurface);

            //load rte data
            rteData = new XMLDataParse("Data/RTEdata.xml");
            rteData.ParseRTEData(); //-> rteData.AllRTEData
            rteMap = new DataImage(512, 512);
            //rteMap.GenerateHisFaces(rteData.AllRTEData);//-> rteMap.TextureImage
            rteMap.GenerateHisCircles(rteData.RTEAllRTEData);

            //update scene mesh
            scene.Update(rteMap.DepthImage, rteMap.TextureImage, state);

            //load research oei data
            oeiData = new XMLDataParse("Data/researchOEIdata.xml");
            oeiData.ParseOEIData(); //-> oeiData.AllOEIData
            oeiMap = new DataImage(512, 512);

            //load publication data
            pubData = new XMLDataParse("Data/pubsdata.xml");
            pubData.ParsePubData();
            pubMap = new DataImage(512, 512);

            //load school stuff data
            schStuffData = new XMLDataParse("Data/schStuffData.xml");
            schStuffData.ParseSchStuffData();
            schStuffMap = new DataImage(512, 512);

            //debug info
            //foreach (var ps in pubData.PubSchoolPubs){Debug.WriteLine("/schName:{0}\n\\pubcount:{1}",ps.schName, ps.schPubCount);}

            //debug
            //DebugShow(rteMap.TextureImage);
        }
Beispiel #3
0
        private void overallSlider_valueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            List<DataSet> _tempList = new List<DataSet>();

            foreach (DataSet ds in rteData.RTEAllRTEData)
            {
                DataSet _temp = new DataSet();

                _temp.y = ds.y;

                _temp.a1 = ds.a1 * researchWeight.Value;
                _temp.a2 = ds.a2 * researchWeight.Value;
                _temp.a3 = ds.a3 * researchWeight.Value;

                _temp.b1 = ds.b1 * teachingWeight.Value;
                _temp.b2 = ds.b2 * teachingWeight.Value;
                _temp.b3 = ds.b3 * teachingWeight.Value;

                _temp.c1 = ds.c1 * enterprisingWeight.Value;
                _temp.c2 = ds.c2 * enterprisingWeight.Value;
                _temp.c3 = ds.c3 * enterprisingWeight.Value;

                _tempList.Add(_temp);
            }

            //update data map
            DataImage _newDatamap = new DataImage();
            _newDatamap.GenerateHisCircles(_tempList);
            //_newDatamap.GenerateHisFaces(_tempList);//-> _newDatamap.TextureImage
            scene.Update(_newDatamap.DepthImage, _newDatamap.TextureImage, state);

            //disp info
            var _object = sender as Slider;
            textInfo.Text = _object.Value.ToString();
        }