Exemple #1
0
        public ListScores(string r)
        {
            InitializeComponent();
            this.txtscore.Text = ReadFile() + "\r\n" + r;

            string txt = txtscore.Text;

            string[] lst = txt.Split(new Char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);

            lst1 = new int[100];
            for (int h = 0; h < lst.Length; h++)
            {
                lst1[h] = int.Parse(lst[h].ToString());
            }

            Array.Sort(lst1, new Comparison <int>((i1, i2) => i2.CompareTo(i1)));

            string n = "";

            for (int k = 0; k < lst.Length; k++)
            {
                n = n + lst1[k] + "\r\n";
            }
            this.txtscore2.Text = n;
            txtscore2.Visible   = true;
        }
Exemple #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            PlayGame abc = new PlayGame();

            Application.Run(abc);
            Application.Run(new ListScores(abc.score()));
        }