public NewStudentDetails(TDatabase inDatabase, string FirstName, bool IsTeacher) { _FirstName = FirstName; _IsTeacher = IsTeacher; Database = inDatabase; InitializeComponent(); }
public Game1(Composition inSong, TDatabase inDatabase) { TSong = inSong; Database = inDatabase; graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; }
private void SongMenu_Load(object sender, EventArgs e) { TDatabase Songs = Database; Songs.SearchSongListTable(); CMB_SongList.DataSource = Songs.tblSongList; CMB_SongList.DisplayMember = "Song"; }
public SongMenu(TDatabase inDatabase) { Loadup = false; Database = inDatabase; InitializeComponent(); this.ShowIcon = true; this.ShowInTaskbar = true; this.WindowState = FormWindowState.Normal; }
public FeedbackScreen(TDatabase inDatabase, TValidation inFeedback, Composition inTSong, Game1 inGame) { InitializeComponent(); Database = inDatabase; Feedback = inFeedback; TSong = inTSong; Game = inGame; IsSaved = false; TryAgain = false; }
public SongMenu() { Loadup = false; Database = new TDatabase(); Form Load = new LoginScreen(Database); Load.Show(); this.ShowIcon = false; this.ShowInTaskbar = false; this.WindowState = FormWindowState.Minimized; }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Form Load = new SongMenu(); SongMenu.OriginalForm = Load;//Saves the original form to dispose at the end Application.Run(Load); if (SongMenu.IsSongSelected) { Composition TSong = SongMenu.TSong; TDatabase Database = SongMenu.Data; using (Game1 game = new Game1(TSong, Database)) { game.Run(); } } }
private void BTN_Launch_Click(object sender, EventArgs e) { string Song = CMB_SongList.Text; DialogResult MsgResult; string Output = "File Path not found, has the location changed?"; string ExitMsg = "File Error"; Database.UpdateSong(Song); LBL_File.DataBindings.Add("Text", Database.tblSongList, "FilePath"); if (Database.PreviousHistory(Song)) { LBL_Difficulty.DataBindings.Add("Text", Database.tblStudentAttempts, "Difficulty"); try { TSong = new Composition("4/4", 107, LBL_File.Text, LBL_Difficulty.Text, Song); } catch { MsgResult = MessageBox.Show(Output, ExitMsg, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { try { TSong = new Composition("4/4", 107, LBL_File.Text, "SuperEasy", Song); } catch { MsgResult = MessageBox.Show(Output, ExitMsg, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } if (Loadup || Game != default(Game1)) { TSong.InitaliseCompositionList(); Game.TSong = TSong; Game.IsGameActive = true; Game.Validation = null; Game.Index = 0; Game.PressedNotes = ""; Game.Restart = true; } else { Data = Database; Loadup = true; OriginalForm.Dispose(); } this.Dispose(); }
public ImportScreen(TDatabase inDatabase) { Database = inDatabase; InitializeComponent(); OFD_FileSearch.Filter = "txt files(*.txt) | *.txt"; }
public LoginScreen(TDatabase inDatabase) { Database = inDatabase; InitializeComponent(); }
public RegisterScreen(TDatabase inDatabase) { Database = inDatabase; InitializeComponent(); }
public PauseScreen(Game1 inGame, TDatabase inData) { InitializeComponent(); Game = inGame; Database = inData; }