Beispiel #1
0
 public Form1(String Path = "", double Speed = 1.00, String image = "", Color?c1 = null, Color?c2 = null, Color?c3 = null, Color?c4 = null, bool RainbowMode = false)
 {
     if (Path != "")
     {
         track     = (Path.Substring(Path.LastIndexOf("\\") + 1, Path.LastIndexOf(".") - Path.LastIndexOf("\\") - 1));
         My        = new MIDINotesData(MIDIFuncs.UnpackDataToNote(Path));
         pathcheck = true;
         ft        = (int)My.flowkeys[0].time;
         st        = (int)My.flowkeys[My.flowkeys.Count - 1].time + (int)My.flowkeys[My.flowkeys.Count - 1].length;
     }
     if (RainbowMode)
     {
         rainbow = new Rainbow();
     }
     red        = new System.Drawing.SolidBrush(c1 ?? Color.Red);
     green      = new System.Drawing.SolidBrush(c2 ?? Color.Green);
     pink       = new System.Drawing.SolidBrush(c3 ?? Color.Pink);
     lightgreen = new System.Drawing.SolidBrush(c4 ?? Color.LightGreen);
     cl1        = c1 ?? Color.Red;
     cl2        = c2 ?? Color.Green;
     cl3        = c3 ?? Color.Pink;
     cl4        = c4 ?? Color.LightGreen;
     Myspeed    = Speed;
     if (image != null)
     {
         //this.BackgroundImage = Image.FromFile(image);
         try
         {
             im = Image.FromFile(image);
         }
         catch (Exception ex)
         { }
     }
     InitializeComponent();
 }
Beispiel #2
0
 public Play(String Path = "")
 {
     if (Path != "")
     {
         My        = new MIDINotesData(MIDIFuncs.UnpackDataToNote(Path));
         pathcheck = true;
         if ((int)My.flowkeys[0].time > 1000)
         {
             time = (int)My.flowkeys[0].time - 1000;
         }
     }
     InitializeComponent();
 }
Beispiel #3
0
 private void PlayLabel_Click(object sender, EventArgs e)
 {
     if (selectedFileName == "")
     {
         return;
     }
     else
     {
         //Player
         My = new MIDINotesData((MIDIFuncs.UnpackDataToNote(libPath + @"\" + selectedFileName + ".dat")));
         if (playing)
         {
             timer1.Stop();
             playLabel.BackgroundImage = Properties.Resources.icons8_play_96_1;
             playing = !playing;
         }
         else
         {
             timer1.Start();
             playLabel.BackgroundImage = Properties.Resources.icons8_pause_96_1;
             playing = !playing;
         }
     }
 }