コード例 #1
0
 public UserSetData(int audio, int voice, CVType cvType, LanguageType languageType, DisplayModeType displayModeType, ResolutionType resolutionType)
 {
     this.audio           = audio;
     this.voice           = voice;
     this.cvType          = cvType;
     this.languageType    = languageType;
     this.displayModeType = displayModeType;
     this.resolutionType  = resolutionType;
 }
コード例 #2
0
ファイル: LiteCGraph.cs プロジェクト: Raxo94/QCView
        public void FillInstrument(string date, string weeks, CVType cvtype)
        {
            OSQLite sql = new OSQLite();
            LiteCConfig cfg = new LiteCConfig();

            //get data
            Collection<GraphDataSet> gd = new Collection<GraphDataSet>();
            gd.Add(sql.miGetSEQnbrs(date, "M-Series"));
            gd.Add(sql.miGetSEQnbrs(date, "Alfa"));
            gd.Add(sql.miGetSEQnbrs(date, "Exigo"));
            Collection<Color> colors = new Collection<Color>();
            colors.Add(Color.Blue);
            colors.Add(Color.Red);
            colors.Add(Color.Green);
            /*
            colors.Add(Color.Black);
            colors.Add(Color.Black);
            */
            string[] names = { "M-Series", "Alfa", "Exigo"};

            //clear all old data in chart
            foreach (Series x in ichart.Series)
                x.Points.Clear();
            ichart.Series.Clear();

            ichart.Titles.Clear();
            ichart.Titles.Add("Instrument - SEQ/Instrument " + weeks + " veckor");

            //create new series for all parameters
            Series series = new Series(names[0]);
            series.ChartType = SeriesChartType.Point;
            series.Color = colors[0];
            series.MarkerSize = 4;
            series.MarkerStyle = MarkerStyle.None;
            ichart.Series.Add(series);
            series = new Series(names[1]);
            series.ChartType = SeriesChartType.Point;
            series.Color = colors[1];
            series.MarkerSize = 4;
            series.MarkerStyle = MarkerStyle.None;
            ichart.Series.Add(series);
            series = new Series(names[2]);
            series.ChartType = SeriesChartType.Point;
            series.Color = colors[2];
            series.MarkerSize = 4;
            series.MarkerStyle = MarkerStyle.None;
            ichart.Series.Add(series);

            //fill all series with data
            for (int k = 0; k < gd[0].Y.Count; k++)
            {
                ichart.Series["M-Series"].Points.AddY(gd[0].Y[k]);
            }
            for (int k = 0; k < gd[1].Y.Count; k++)
            {
                ichart.Series["Alfa"].Points.AddY(gd[1].Y[k]);
            }
            for (int k = 0; k < gd[2].Y.Count; k++)
            {
                ichart.Series["Exigo"].Points.AddY(gd[2].Y[k]);
            }
        }
コード例 #3
0
ファイル: LiteCGraph.cs プロジェクト: Raxo94/QCView
        public void FillCV(string date, string weeks, CVType cvtype)
        {
            OSQLite sql = new OSQLite();
            LiteCConfig cfg = new LiteCConfig();
            string limit = "";

            //get data
            Collection<GraphDataSet> gd = sql.miGetGraphDataCV(date);
            Collection<Color> colors = new Collection<Color>();
            colors.Add(Color.Red);
            colors.Add(Color.Red);
            colors.Add(Color.Orange);
            colors.Add(Color.Orange);
            colors.Add(Color.Black);
            colors.Add(Color.Black);
            colors.Add(Color.DarkGray);
            colors.Add(Color.DarkGray);
            colors.Add(Color.Blue);
            colors.Add(Color.Blue);
            colors.Add(Color.Yellow);
            colors.Add(Color.Yellow);

            if (cvtype == CVType.Expected) //select if limit series should be expected or absolute limits
                limit = "Exp";
            else
                limit = "Lim";

            string[] names = { "RBC", "RBC_" + limit, "MCV", "MCV_" + limit,
                               "PLT", "PLT_" + limit, "MPV", "MPV_" + limit,
                               "HGB", "HGB_" + limit, "WBC", "WBC_" + limit};
            double[] expected = new double[6] { cfg.ReadD(limit + "_CVRBC"), cfg.ReadD(limit + "_CVMCV"),
                                                cfg.ReadD(limit + "_CVPLT"), cfg.ReadD(limit + "_CVMPV"),
                                                cfg.ReadD(limit + "_CVHGB"), cfg.ReadD(limit + "_CVWBC")};

            //clear all old data in chart
            foreach (Series x in ichart.Series)
                x.Points.Clear();
            ichart.Series.Clear();

            ichart.Titles.Clear();
            ichart.Titles.Add("CV - förväntat gränsvärde " + weeks + " veckor");

            //create new series for all parameters
            int i = 0;
            foreach (string x in names)
            {
                Series series = new Series(x);
                if (i % 2 == 0)//first is parameter, next is expected value
                    series.ChartType = SeriesChartType.Line;
                else
                    series.ChartType = SeriesChartType.Point;
                series.Color = colors[i];
                series.MarkerSize = 2;
                series.MarkerStyle = MarkerStyle.None;
                ichart.Series.Add(series);
                i++;
            }

            //fill all series with data
            for (int k = 0; k < gd[0].Y.Count; k++)
            {
                ichart.Series["RBC"].Points.AddY(gd[0].Y[k]);
                ichart.Series["RBC_" + limit].Points.AddY(expected[0]);

                ichart.Series["MCV"].Points.AddY(gd[1].Y[k]);
                ichart.Series["MCV_" + limit].Points.AddY(expected[1]);

                ichart.Series["PLT"].Points.AddY(gd[2].Y[k]);
                ichart.Series["PLT_" + limit].Points.AddY(expected[2]);

                ichart.Series["MPV"].Points.AddY(gd[3].Y[k]);
                ichart.Series["MPV_" + limit].Points.AddY(expected[3]);

                ichart.Series["HGB"].Points.AddY(gd[4].Y[k]);
                ichart.Series["HGB_" + limit].Points.AddY(expected[4]);

                ichart.Series["WBC"].Points.AddY(gd[5].Y[k]);
                ichart.Series["WBC_" + limit].Points.AddY(expected[5]);
            }
        }
コード例 #4
0
    public void UpdateLayouter(CVType nComparativeType, SPType nSuperpositionType, int nVisualSpaceDim, int nParametersDim, List <ParameterNameValue> parameters)
    {
        Camera.main.transform.position = new Vector3(0, 0, -300);

        if (GameObject.Find("Composition") != null)
        {
            GameObject.DestroyImmediate(GameObject.Find("Composition"));
        }

        comparativeType = nComparativeType;
        visualSpaceDim  = nVisualSpaceDim;
        parametersDim   = nParametersDim;

        switch (comparativeType)
        {
        case CVType.Juxtaposition:
        {
            if (parametersDim == 1)
            {
                layouter = new LayouterStripes();
                (layouter as LayouterStripes).mainParameter = ensemble.getParameter(1);
                (layouter as LayouterStripes).minValue      = ensemble.parametersInfo[(layouter as LayouterStripes).mainParameter].minValue;
                (layouter as LayouterStripes).maxValue      = ensemble.parametersInfo[(layouter as LayouterStripes).mainParameter].maxValue;
                (layouter as LayouterStripes).count         = ensemble.parametersInfo[(layouter as LayouterStripes).mainParameter].count;
                (layouter as LayouterStripes).delta         = ensemble.structuresSize.x * 0.5f;
            }
            else if (parametersDim == 2 && ensemble.parametersInfo.Count >= 2)
            {
                layouter = new LayouterBoxes();

                (layouter as LayouterBoxes).mainParameter = ensemble.getParameter(1);
                (layouter as LayouterBoxes).mCount        = ensemble.parametersInfo[(layouter as LayouterBoxes).mainParameter].count;
                (layouter as LayouterBoxes).mMinValue     = ensemble.parametersInfo[(layouter as LayouterBoxes).mainParameter].minValue;
                (layouter as LayouterBoxes).mMaxValue     = ensemble.parametersInfo[(layouter as LayouterBoxes).mainParameter].maxValue;
                (layouter as LayouterBoxes).mDelta        = ensemble.structuresSize.x * 0.5f;

                (layouter as LayouterBoxes).secParameter = ensemble.getParameter(2);
                (layouter as LayouterBoxes).sCount       = ensemble.parametersInfo[(layouter as LayouterBoxes).secParameter].count;
                (layouter as LayouterBoxes).sMinValue    = ensemble.parametersInfo[(layouter as LayouterBoxes).secParameter].minValue;
                (layouter as LayouterBoxes).sMaxValue    = ensemble.parametersInfo[(layouter as LayouterBoxes).secParameter].maxValue;
                (layouter as LayouterBoxes).sDelta       = ensemble.structuresSize.y * 0.5f;
            }
            else
            {
                Debug.Log("Not permitted combination! Yet!");
            }
            break;
        }

        case CVType.Superposition:
        {
            if (parametersDim == 1)
            {
                layouter = new LayouterSuperPosition();
                (layouter as LayouterSuperPosition).mainParameter = ensemble.getParameter(1);
                (layouter as LayouterSuperPosition).minValue      = ensemble.parametersInfo[(layouter as LayouterSuperPosition).mainParameter].minValue;
                (layouter as LayouterSuperPosition).maxValue      = ensemble.parametersInfo[(layouter as LayouterSuperPosition).mainParameter].maxValue;
                (layouter as LayouterSuperPosition).count         = ensemble.parametersInfo[(layouter as LayouterSuperPosition).mainParameter].count;
                (layouter as LayouterSuperPosition).delta         = 0.5f;
                (layouter as LayouterSuperPosition).type          = nSuperpositionType;
            }
            else
            {
                Debug.Log("Not permitted combination! Yet!");
            }
            break;
        }

        case CVType.Hybrid:
        {
            if (parametersDim == 2 && ensemble.parametersInfo.Count >= 2)
            {
                layouter = new LayouterSuperStripes();

                (layouter as LayouterSuperStripes).mainParameter = ensemble.getParameter(1);
                (layouter as LayouterSuperStripes).mCount        = ensemble.parametersInfo[(layouter as LayouterSuperStripes).mainParameter].count;
                (layouter as LayouterSuperStripes).mMinValue     = ensemble.parametersInfo[(layouter as LayouterSuperStripes).mainParameter].minValue;
                (layouter as LayouterSuperStripes).mMaxValue     = ensemble.parametersInfo[(layouter as LayouterSuperStripes).mainParameter].maxValue;
                (layouter as LayouterSuperStripes).mDelta        = ensemble.structuresSize.x * 0.5f;

                (layouter as LayouterSuperStripes).secParameter = ensemble.getParameter(2);
                (layouter as LayouterSuperStripes).sCount       = ensemble.parametersInfo[(layouter as LayouterSuperStripes).secParameter].count;
                (layouter as LayouterSuperStripes).sMinValue    = ensemble.parametersInfo[(layouter as LayouterSuperStripes).secParameter].minValue;
                (layouter as LayouterSuperStripes).sMaxValue    = ensemble.parametersInfo[(layouter as LayouterSuperStripes).secParameter].maxValue;
                (layouter as LayouterSuperStripes).sDelta       = 0.5f;
                (layouter as LayouterSuperStripes).type         = nSuperpositionType;
            }
            else if (parametersDim == 3 && ensemble.parametersInfo.Count >= 3)
            {
                layouter = new LayouterSuperBoxes();

                (layouter as LayouterSuperBoxes).mainParameter = ensemble.getParameter(1);
                (layouter as LayouterSuperBoxes).mCount        = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).mainParameter].count;
                (layouter as LayouterSuperBoxes).mMinValue     = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).mainParameter].minValue;
                (layouter as LayouterSuperBoxes).mMaxValue     = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).mainParameter].maxValue;
                (layouter as LayouterSuperBoxes).mDelta        = ensemble.structuresSize.x * 0.5f;

                (layouter as LayouterSuperBoxes).secParameter = ensemble.getParameter(2);
                (layouter as LayouterSuperBoxes).sCount       = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).secParameter].count;
                (layouter as LayouterSuperBoxes).sMinValue    = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).secParameter].minValue;
                (layouter as LayouterSuperBoxes).sMaxValue    = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).secParameter].maxValue;
                (layouter as LayouterSuperBoxes).sDelta       = ensemble.structuresSize.y * 0.5f;

                (layouter as LayouterSuperBoxes).thirdParameter = ensemble.getParameter(2);
                (layouter as LayouterSuperBoxes).tCount         = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).thirdParameter].count;
                (layouter as LayouterSuperBoxes).tMinValue      = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).thirdParameter].minValue;
                (layouter as LayouterSuperBoxes).tMaxValue      = ensemble.parametersInfo[(layouter as LayouterSuperBoxes).thirdParameter].maxValue;
                (layouter as LayouterSuperBoxes).tDelta         = 0.5f;

                (layouter as LayouterSuperBoxes).type = nSuperpositionType;
            }
            else
            {
                Debug.Log("Not permitted combination! Yet!");
            }
            break;
        }
        }

        if (visualSpaceDim == 3)
        {
            Camera.main.gameObject.GetComponent <MouseCameraControl> ().pitch.activate = true;
            Camera.main.gameObject.GetComponent <MouseCameraControl> ().yaw.activate   = true;
        }
        else
        {
            Camera.main.gameObject.GetComponent <MouseCameraControl> ().pitch.activate = false;
            Camera.main.gameObject.GetComponent <MouseCameraControl> ().yaw.activate   = false;
        }

        layouter.axisParameters = parameters;

        string abstractionName = pickupAbstractionNew();
        int    numOfElements   = Mathf.FloorToInt((Camera.main.orthographicSize * 2f) / (abstractions[abstractionName].scale * 300f));

        if (numOfElements == 0)
        {
            numOfElements = 5;
        }
        layouter.PlacePreview(numOfElements);

        wasLayoutChanged     = true;
        isCompositionCreated = false;
    }