Esempio n. 1
0
        public ActionResult GetDraw(string key, int?count)
        {
            EvaluationContext context = (EvaluationContext)Session["Context"];
            var data = context.SourceVariables[key];

            if (key.Contains("Draw_MeanValue"))
            {
                return(MV((MeanValue)data));
            }
            if (key.Contains("Draw_HK"))
            {
                return(HK((HK)data));
            }
            if (key.Contains("Draw_LinearRegression"))
            {
                return(LR((LinearRegression)data));
            }
            if (key.Contains("Draw_Histogram"))
            {
                return(His((Histogram)data));
            }
            if (key.Contains("Draw_Comparison"))
            {
                return(COM((Comparison)data));
            }
            if (key.Contains("MCM"))
            {
                Histogram his = DrawFuncs.Draw_Histogram((double[])data, context.Settings.DecimalDigitCount, count.Value);
                return(His(his));
            }
            return(View());
        }
        public static List <TranspilerTuple> OnSetup()
        {
            return(new TranspilerTuple[] {
                PM(BoardDrawM, DrawMethodOfBoardH),
                //5 lines of description in music room
                PM(EntranceLoadM, LoadMethodOfEntranceTranspilerH),
                // bless image fullscreen
                PM(GameInitM, InitMethodOfGameTranspilerH),
                // bless image fullscreen
                //5 lines of description in music room, align for more space
                PM(EntranceDrawM, DrawMethodOfEntranceTranspilerH),
                // The MeasureString method is horrible for trailing space character (bigger width than real width)
                PM(addTexM, AddTexTranspilerH),
                //Fix The Line Break Algorithm in Achievement Screen
                PM(SPECIALDrawM, DrawMethodOfSPECIALTranspilerH),
            }.Concat(!Resource.Config.TachieOnTop ? new TranspilerTuple[0] : new TranspilerTuple[] {
                // Make the character's portraits on top of ui frame
                PM(GameSDrawM, SDrawMethodOfGameTranspilerH),
            }).Concat(new TranspilerTuple[] {
                // BossList.xna hack to enlarge canvases
                PM(BonusDrawM, DrawMethodOfBonusH),
                PM(StageclearDrawM, DrawMethodOfStageclearH),
                // Achivrate position and sourceRectangle
                PM(SPECIALTextureM, TextureMethodOfSPECIALH),
                // Playdata position and sourceRectangle
                PM(PLAYDATAC, PLAYDATAConstructorH),
                // Translate 终 in Replay Saving Screen and Record Saving Screen
                PM(RecordSaveC, RecordSaveConstructorH),
                PM(ReplaySaveC, ReplaySaveConstructor1H),
                PM(ReplaySaveC2, ReplaySaveConstructor2H),
                // Adjust stagetitle metrics
                PM(TitleDrawM, DrawMethodOfTitleH),
                // Adjust 31.xna metrics
                PM(EDDrawM, DrawMethodOfEDH),
                // Adjust spellcard name in gameplay for more pleasant to the eyes
                PM(CardDisplayC, CardDisplayConstructorH),
                PM(DialogDrawM, DrawMethodOfDialogH),
            })
#if _1_04_sc
                   .Concat(OnSetup_1_04_sc())
#endif
                   // stroke border for text, instead of drop shadow
                   .Concat(DrawFuncs.Select(func => PM(func, DrawMethodsH)))
                   .ToList()
                   );
        }