Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     page = ViewState["page"] == null ? 0 : (int)ViewState["page"];
     btnSelect_All.Text = "全选";
     if (!IsPostBack)
     {
         //添加数据
         btnAddProject.OnClientClick = WindowStudent.GetShowReference("Add_Students.aspx");
         BindData();
         btnDelete.Enabled    = false;
         TriggerBox.Enabled   = false;
         DropDownList.Enabled = false;
     }
 }
        public WindowStudentController(WindowLoginController wlc)
        {
            this.windowLeerling = new WindowStudent(this);
            windowLeerling.Show();
            this.parent = wlc;

            songPlayer   = new SongPlayer(this, null);
            songProgress = new SongProgress(songPlayer);
            scorePopup   = new ScorePopup();
            buttons      = new Dictionary <int, PianoButton>();

            // Voeg alle knoppen voor het 4e octaaf toe
            buttons[81] = new PianoButton(Piano.BASE_OCTAAF, "C");
            buttons[50] = new PianoButton(Piano.BASE_OCTAAF, "C#");
            buttons[87] = new PianoButton(Piano.BASE_OCTAAF, "D");
            buttons[51] = new PianoButton(Piano.BASE_OCTAAF, "D#");
            buttons[69] = new PianoButton(Piano.BASE_OCTAAF, "E");
            buttons[82] = new PianoButton(Piano.BASE_OCTAAF, "F");
            buttons[53] = new PianoButton(Piano.BASE_OCTAAF, "F#");
            buttons[84] = new PianoButton(Piano.BASE_OCTAAF, "G");
            buttons[54] = new PianoButton(Piano.BASE_OCTAAF, "G#");
            buttons[89] = new PianoButton(Piano.BASE_OCTAAF, "A");
            buttons[55] = new PianoButton(Piano.BASE_OCTAAF, "A#");
            buttons[85] = new PianoButton(Piano.BASE_OCTAAF, "B");

            // Voeg alle knoppen voor het 5e octaaf toe
            buttons[90] = new PianoButton(Piano.BASE_OCTAAF + 1, "C");
            buttons[83] = new PianoButton(Piano.BASE_OCTAAF + 1, "C#");
            buttons[88] = new PianoButton(Piano.BASE_OCTAAF + 1, "D");
            buttons[68] = new PianoButton(Piano.BASE_OCTAAF + 1, "D#");
            buttons[67] = new PianoButton(Piano.BASE_OCTAAF + 1, "E");
            buttons[86] = new PianoButton(Piano.BASE_OCTAAF + 1, "F");
            buttons[71] = new PianoButton(Piano.BASE_OCTAAF + 1, "F#");
            buttons[66] = new PianoButton(Piano.BASE_OCTAAF + 1, "G");
            buttons[72] = new PianoButton(Piano.BASE_OCTAAF + 1, "G#");
            buttons[78] = new PianoButton(Piano.BASE_OCTAAF + 1, "A");
            buttons[74] = new PianoButton(Piano.BASE_OCTAAF + 1, "A#");
            buttons[77] = new PianoButton(Piano.BASE_OCTAAF + 1, "B");
        }