InitProgressBar() public method

public InitProgressBar ( int max ) : void
max int
return void
Ejemplo n.º 1
0
        public CanTheyMeet()
        {
            InitializeComponent();
           
         
            int lineCount = File.ReadLines("good").Count();
            LoadingScreen l = new LoadingScreen();
            l.Visible = true;
            result.Visible = false;
            l.InitProgressBar(lineCount);
            FillData(l);
            data.Close();
            data.Dispose();
            StreamWriter sw = new StreamWriter("stats");
            sw.WriteLine("Total number of persons : " + people.Count);
            int bothNull = 0;
            int birthNull = 0;
            for (int i = 0; i < people.Count; i++)
            {
                if (people[i].Birth.Year == 0 && people[i].Death.Year == 0)
                {
                    bothNull++;
                    continue;
                }
                if (people[i].Birth.Year == 0)
                {
                    birthNull++;
                }

            }
            sw.WriteLine("Both dates are nulls : " + bothNull);
            sw.WriteLine("Just Birth date is null : " + birthNull);
            sw.Flush();
            sw.Dispose();
        }
Ejemplo n.º 2
0
        public CanTheyMeet()
        {
            InitializeComponent();


            int           lineCount = File.ReadLines("good").Count();
            LoadingScreen l         = new LoadingScreen();

            l.Visible      = true;
            result.Visible = false;
            l.InitProgressBar(lineCount);
            FillData(l);
            data.Close();
            data.Dispose();
            StreamWriter sw = new StreamWriter("stats");

            sw.WriteLine("Total number of persons : " + people.Count);
            int bothNull  = 0;
            int birthNull = 0;

            for (int i = 0; i < people.Count; i++)
            {
                if (people[i].Birth.Year == 0 && people[i].Death.Year == 0)
                {
                    bothNull++;
                    continue;
                }
                if (people[i].Birth.Year == 0)
                {
                    birthNull++;
                }
            }
            sw.WriteLine("Both dates are nulls : " + bothNull);
            sw.WriteLine("Just Birth date is null : " + birthNull);
            sw.Flush();
            sw.Dispose();
        }