InitProgressBar() 공개 메소드

public InitProgressBar ( int max ) : void
max int
리턴 void
예제 #1
0
파일: Form1.cs 프로젝트: irfiit/wikipedia
        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();
        }
예제 #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();
        }