예제 #1
0
		private void GenerateBasedOnYear()
		{
			int year = 0;
			string s_year = mYearTextBox.Text;
			string test = MainClass.LeagueFolder+Path.DirectorySeparatorChar+ s_year;
			if( Directory.Exists(test) )
			{
				year = Int32.Parse( s_year);
				Season s = new Season(year);
			
				string season = s.GenerateSeason();
				string fileName = "tmpSeasonGen";
				ShowResults(season,fileName);
			}
			else
			{
				MessageBox.Show(string.Format("Invalid year {0}",s_year));
				mYearTextBox.Focus();
				mYearTextBox.SelectAll();
			}
		}
예제 #2
0
		private void GenerateBasedOnConfig()
		{
			string configFile = GetConfigFile();
			string configFileName = "tsbseasongen_temp.tmp";
			MainClass.WriteFile(configFileName, configFile);
			Season s = new Season(configFileName);
			
			string season = s.GenerateSeason();
			string fileName = "tmpSeasonGen";
			ShowResults(season,fileName);
		}
예제 #3
0
		static void GenSeason(int year)
		{
			//try{
			//Console.Error.WriteLine("Year = {0}",year);
			Season s = new Season(year);
			string str = s.GenerateSeason();

			if( System.IO.Path.DirectorySeparatorChar == '\\' )
			{
				str = str.Replace("\r\n","\n");
				str = str.Replace("\n", "\r\n");
			}
			Console.WriteLine(str);
			//}
			/*catch(Exception e)
			{
				Console.Error.WriteLine(e.StackTrace+"\n"+e.Message);
			}*/
		}
예제 #4
0
		private void Go()
		{
			int year= 1990;
			//try
			//{
				year = Int32.Parse(yearTextBox.Text);
				Season s = new Season(year);
				this.OutputTextBox.Text = s.GenerateSeason();
			//}
			//catch (Exception e )
			//{
			//	MessageBox.Show(e.Message);
			//}
		}
예제 #5
0
		static void GenSeason(string configFile)
		{
			//try{
			Season s = new Season(configFile);
			string str = s.GenerateSeason();
			
			if( System.IO.Path.DirectorySeparatorChar == '\\' )
			{
				str = str.Replace("\r\n","\n");
				str = str.Replace("\n", "\r\n");
			}
			Console.WriteLine(str);
			//}catch(Exception e){
			//	MainClass.AddError(e.StackTrace+"\n"+e.Message);
			//}
		}