示例#1
0
		public MainGUI(string romFileName, string dataFileName)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			tool = TecmoToolFactory.GetToolForRom( romFileName );

			if(romFileName != null && romFileName.Length > 0)
			{
				if( tool.Init(romFileName) )
				{
					state2();
					UpdateTitle(romFileName);
				}
				else 
					state1();
			}
			else
				state1();
            PopulateHacksMenu();

			if(dataFileName != null && dataFileName.Length > 0)
			{
				this.LoadDataFile(dataFileName);
			}
			try
			{
				if( File.Exists("TSBSeasonGen.exe") && Directory.Exists("NFL_DATA") )
				{
					programExecName = Path.GetFullPath("TSBSeasonGen.exe");
					seasonGenOptionFile = Path.GetFullPath("SeasonGenOptions.txt");

					MenuItem seasonGen = new MenuItem("&TSBSeasonGen");

					tsbSeasonGenMenuItem = new MenuItem("&Year or other arguments");
					tsbSeasonGenMenuItem.Click +=new EventHandler(tsbSeasonGenMenuItem_Click);
					
					tsbSeasonGen_optionsMenuItem = new MenuItem("&Edit SeasonGen options");
					tsbSeasonGen_optionsMenuItem.Click +=new EventHandler(tsbSeasonGen_optionsMenuItem_Click);

					seasonGen.MenuItems.Add( tsbSeasonGenMenuItem );
					seasonGen.MenuItems.Add( tsbSeasonGen_optionsMenuItem);
					mainMenu1.MenuItems.Add(seasonGen);
				}
			}
			catch {}
			/*richTextBox1.Settings.AddKeywords(tool.GetTeams());
			richTextBox1.Settings.AddKeywords(tool.GetPositionNames());
			string[] others = {"TEAM","WEEK","Face","YEAR","at","Schedule"};
			richTextBox1.Settings.AddKeywords(others);
			richTextBox1.Settings.Comment = "^#";
			richTextBox1.CompileKeywords();
			richTextBox1.CompileRegexes();*/
		}
示例#2
0
		public InputParser(ITecmoTool tool)
		{
			this.tool = tool;
			currentTeam      = "bills";
			Init();
		}
示例#3
0
		//loadTSBMenuItem
		private void loadTSBMenuItem_Click(object sender, System.EventArgs e)
		{
			string filename = GetFileName(nesFilter, false);

			tool = TecmoToolFactory.GetToolForRom( filename );
			if(filename != null && tool != null)
			{
				if( tool.OutputRom != null )
				{
					state2();
					UpdateTitle(filename);
				}
				else if( tool.Init(filename))
				{
					state2();
					UpdateTitle(filename);
				}
				else
					state1();
			}
		}