public Window1()
        {
            InitializeComponent();

            //
            // openMidiFileDialog
            //
            this.openMidiFileDialog.DefaultExt = "mid";
            this.openMidiFileDialog.Filter = "MIDI files|*.mid|All files|*.*";
            this.openMidiFileDialog.Title = "Open MIDI file";

            //
            // sequence1
            //
            this.sequence1.Format = 1;
            //
            // sequencer1
            //
            this.sequencer1.Position = 0;
            this.sequencer1.Sequence = this.sequence1;
            this.sequencer1.PlayingCompleted += new System.EventHandler(this.HandlePlayingCompleted);
            this.sequencer1.ChannelMessagePlayed += new System.EventHandler<Sanford.Multimedia.Midi.ChannelMessageEventArgs>(this.HandleChannelMessagePlayed);
            this.sequencer1.Stopped += new System.EventHandler<Sanford.Multimedia.Midi.StoppedEventArgs>(this.HandleStopped);
            //this.sequencer1.SysExMessagePlayed += new System.EventHandler<Sanford.Multimedia.Midi.SysExMessageEventArgs>(this.HandleSysExMessagePlayed);
            this.sequencer1.Chased += new System.EventHandler<Sanford.Multimedia.Midi.ChasedEventArgs>(this.HandleChased);

            SetCamera();
            piano = new Piano(mainViewport, 0.3F, 0.02F, 0.3F, 1.8F,0.3F, 66.0F);
            piano.Draw(mainViewport);
        }
        public Window1()
        {
            InitializeComponent();


            //
            // openMidiFileDialog
            //
            this.openMidiFileDialog.DefaultExt = "mid";
            this.openMidiFileDialog.Filter     = "MIDI files|*.mid|All files|*.*";
            this.openMidiFileDialog.Title      = "Open MIDI file";



            //
            // sequence1
            //
            this.sequence1.Format = 1;
            //
            // sequencer1
            //
            this.sequencer1.Position              = 0;
            this.sequencer1.Sequence              = this.sequence1;
            this.sequencer1.PlayingCompleted     += new System.EventHandler(this.HandlePlayingCompleted);
            this.sequencer1.ChannelMessagePlayed += new System.EventHandler <Sanford.Multimedia.Midi.ChannelMessageEventArgs>(this.HandleChannelMessagePlayed);
            this.sequencer1.Stopped += new System.EventHandler <Sanford.Multimedia.Midi.StoppedEventArgs>(this.HandleStopped);
            //this.sequencer1.SysExMessagePlayed += new System.EventHandler<Sanford.Multimedia.Midi.SysExMessageEventArgs>(this.HandleSysExMessagePlayed);
            this.sequencer1.Chased += new System.EventHandler <Sanford.Multimedia.Midi.ChasedEventArgs>(this.HandleChased);

            SetCamera();
            piano = new Piano(mainViewport, 0.3F, 0.02F, 0.3F, 1.8F, 0.3F, 66.0F);
            piano.Draw(mainViewport);
        }