Example #1
0
        public override void quit()
        {
            TopM.Pause();

            MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Voulez-vous quitter la projection ?", "Confirmation", System.Windows.MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                dif.cacher();
            }
            else if (messageBoxResult == MessageBoxResult.No)
            {
                TopM.Play();
            }
        }
Example #2
0
        public void Run()
        {
            Console.WriteLine("Choose file:");      // Prompt
            Console.WriteLine("1 - tinyBatch.txt"); // Prompt
            Console.WriteLine("or quit");           // Prompt

            var fileNumber = Console.ReadLine();
            var fieName    = string.Empty;

            switch (fileNumber)
            {
            case "1":
                fieName = "tinyBatch.txt";
                break;

            case "quit":
                return;

            default:
                return;
            }


            var @in   = new In($"Files\\Sorting\\{fieName}");
            var words = @in.ReadAllLines();

            //var list = words.Select(word => new StringComparable(word)).ToList();

            //var listComparable = list.Cast<IComparable>().ToList();
            //var arrayComparable = list.Cast<IComparable>().ToArray();
            var listStrings = words.ToList();

            var topM = new TopM(listStrings);

            topM.ShowTransactions();


            Console.ReadLine();
        }
Example #3
0
 public void cacher() // "Soft Quit"
 {
     Hide();
     TopM.Stop();
     userContr.Show();
 }