public ConsoleDraft(EditorModel editorModel) { model = editorModel; draftModel = new DraftModel(model); Trace.WriteLine("# PGID Team Pos OVR INJ"); draftModel.DumpDraftResults(); Trace.WriteLine("\n\n"); // InitializeDraft makes all of the mandatory operations // to run a draft. Other optional actions that need to // be run at the start appear below. The thought is that // a settings tab will allow the user to toggle off some features // but everything in InitializeDraft MUST be run at the start. draftModel.InitializeDraft(19); draftModel.FixDraftOrder(); /* * draftModel.DumpRookies((int)RookieRecord.Attribute.OVR); * draftModel.DumpRookies((int)RookieRecord.Attribute.INJ); */ for (int i = 0; i < 224; i++) { draftModel.MakeSelection(i, null); } Trace.WriteLine("# PGID Team Pos OVR INJ PlayerValue PickValue"); draftModel.DumpDraftResults(); }
// private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) private void bg1() { // This method will run on a thread other than the UI thread. // Be sure not to manipulate any Windows Forms controls created // on the UI thread from this method. if (autoSave.Checked) { string fileName = model.GetFileName(); string backupFile = fileName.Substring(0, fileName.LastIndexOf('.')) + "-mfebak"; string newFile; if (overwrite.Checked) { File.Delete(backupFile + "0.fra"); } int index = 0; while (true) { newFile = backupFile + index + ".fra"; if (!File.Exists(newFile)) { break; } index++; } File.Copy(fileName, newFile); } //ReportProgress(15); draftModel.InitCoachScouting(); draftModel.ResumePick = (int)ResumeSelection_Updown.Value; draftModel.ResumeRound = (int)ResumeRound_Updown.Value; draftModel.ResumeIndex = (int)ResumePick_Updown.Value; draftModel.InitializeDraft(humanId, this, customclass); if (continueLoading) { //ReportProgress(55); // Fix this for people who want to stay with Madden's Original order //draftModel.FixDraftOrder(); //ReportProgress(75); draftModel.InitializeScouting(); //ReportProgress(100); } if (continueLoading) { scoutingForm = new ScoutingForm(model, humanId, secs, draftModel, true); scoutingForm.Show(); } this.Cursor = Cursors.Default; this.Close(); }