Exemple #1
0
 void TrackLabel_DoubleClick(Object sender,
                             EventArgs e)
 {
     if (library)
     {
         Label  l = (Label)sender;
         string n = "";
         foreach (var elem in curfiles)
         {
             if (elem.Item1 == int.Parse(l.Name.Substring(0, l.Name.Length - 5)))
             {
                 n = elem.Item3;
             }
         }
         try
         {
             var viewer = new SheetViewer(projectPath + @"Resources\\Sheets", n);
             viewer.Show();
         }
         catch (FileNotFoundException ex)
         {
             MessageBox.Show("Не удалось получить ноты");
         }
     }
     else
     {
         TrackLabel_Click(sender, e);
         starting = true;
         this.Close();
     }
 }
Exemple #2
0
 void TrackPanel_DoubleClick(Object sender,
                             EventArgs e)
 {
     if (library)
     {
         Panel  p = (Panel)sender;
         string n = "";
         foreach (var elem in curfiles)
         {
             if (elem.Item1 == int.Parse(p.Name.Substring(0, p.Name.Length - 4)))
             {
                 n = elem.Item3;
             }
         }
         try
         {
             var viewer = new SheetViewer(projectPath + @"Resources\\Sheets", n);
             viewer.ShowDialog();
         }
         catch (FileNotFoundException ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
     else
     {
         TrackPanel_Click(sender, e);
         starting = true;
         this.Close();
     }
 }