예제 #1
0
        public void Load(Code c, Pseudo p, MainWindow mw, AlgorithmCodes ac)
        {
            c.Title = this.Title;
            p.Title = this.Title;

            c.AddText(Code);
            p.AddText(Pseudo);

            int output = algo();

            mw.WriteOutput(ac.GetArrayString());
            mw.WriteOutput(output.ToString());
        }
예제 #2
0
        public static Algo GetAlgo(string s)
        {
            AlgorithmCodes ac = new AlgorithmCodes();

            switch (s)
            {
            default:
                return(null);

            case "Összegzés tétele":
                return(ac.SumFunc);

            case "Lineáris keresés":
                return(ac.LinearSearch);
            }
        }