예제 #1
0
 /// <summary>
 /// edits the selected wave
 /// </summary>
 /// <param name="sender">not used</param>
 /// <param name="e">not used</param>
 private void editButton_Click(object sender, RoutedEventArgs e)
 {
     int index = (int)cursor.Margin.Top / 20;
     WaveEditor editor = new WaveEditor(index);
     editor.Owner = this;
     editor.ShowDialog();
     (grid1.Children[index + 1] as Label).Content = WaveData.GetWaveNames()[index];
 }
예제 #2
0
 /// <summary>
 /// Creates a new wave
 /// </summary>
 /// <param name="sender">not used</param>
 /// <param name="e">not used</param>
 private void newButton_Click(object sender, RoutedEventArgs e)
 {
     cursor.Margin = new Thickness(8, 20 * grid1.Children.Count - 16, 0, 0);
     WaveData.GetWave(-1);
     AddLabel("Wave " + grid1.Children.Count, grid1.Children.Count - 1);
     WaveEditor editor = new WaveEditor(grid1.Children.Count - 2);
     try
     {
         editor.Owner = this;
     }
     catch (Exception)
     {
         editor.Left = (SystemParameters.PrimaryScreenWidth - editor.Width) / 2;
         editor.Top = (SystemParameters.PrimaryScreenHeight - editor.Height) / 2;
     }
     editor.ShowDialog();
 }