public NewStudentDetails(TDatabase inDatabase, string FirstName, bool IsTeacher)
 {
     _FirstName = FirstName;
     _IsTeacher = IsTeacher;
     Database   = inDatabase;
     InitializeComponent();
 }
Пример #2
0
 public Game1(Composition inSong, TDatabase inDatabase)
 {
     TSong    = inSong;
     Database = inDatabase;
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
 }
Пример #3
0
        private void SongMenu_Load(object sender, EventArgs e)
        {
            TDatabase Songs = Database;

            Songs.SearchSongListTable();
            CMB_SongList.DataSource    = Songs.tblSongList;
            CMB_SongList.DisplayMember = "Song";
        }
Пример #4
0
 public SongMenu(TDatabase inDatabase)
 {
     Loadup   = false;
     Database = inDatabase;
     InitializeComponent();
     this.ShowIcon      = true;
     this.ShowInTaskbar = true;
     this.WindowState   = FormWindowState.Normal;
 }
Пример #5
0
 public FeedbackScreen(TDatabase inDatabase, TValidation inFeedback, Composition inTSong, Game1 inGame)
 {
     InitializeComponent();
     Database = inDatabase;
     Feedback = inFeedback;
     TSong    = inTSong;
     Game     = inGame;
     IsSaved  = false;
     TryAgain = false;
 }
Пример #6
0
        public SongMenu()
        {
            Loadup   = false;
            Database = new TDatabase();
            Form Load = new LoginScreen(Database);

            Load.Show();
            this.ShowIcon      = false;
            this.ShowInTaskbar = false;
            this.WindowState   = FormWindowState.Minimized;
        }
Пример #7
0
 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();
         }
     }
 }
Пример #8
0
        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();
        }
Пример #9
0
 public ImportScreen(TDatabase inDatabase)
 {
     Database = inDatabase;
     InitializeComponent();
     OFD_FileSearch.Filter = "txt files(*.txt) | *.txt";
 }
Пример #10
0
 public LoginScreen(TDatabase inDatabase)
 {
     Database = inDatabase;
     InitializeComponent();
 }
Пример #11
0
 public RegisterScreen(TDatabase inDatabase)
 {
     Database = inDatabase;
     InitializeComponent();
 }
Пример #12
0
 public PauseScreen(Game1 inGame, TDatabase inData)
 {
     InitializeComponent();
     Game     = inGame;
     Database = inData;
 }