예제 #1
0
        /// <summary>
        /// Sets the playing mode
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SetMode(object sender, RoutedEventArgs e)
        {
            if (AdvancedMode.IsChecked.GetValueOrDefault())
            {
                playingMode = ADVANCED_MODE;

                for (int i = 1; i < PartitionRadio.Children.Count; i++)
                {
                    PartitionRadio.Children[i].IsEnabled = true;
                }
                instruments[0] = new Instrument("instr0");
            }
            else
            {
                playingMode = DEMO_MODE;

                PartitionManager.SetPartitionType(PartitionType.Single);
                onePartition.IsChecked = true;

                for (int i = 1; i < PartitionRadio.Children.Count; i++)
                {
                    PartitionRadio.Children[i].IsEnabled = false;
                }
                instruments[0] = new DemoInstrument("instr0");
            }
        }
예제 #2
0
 /// <summary>
 /// Set the number of partitions
 /// </summary>
 ///
 /// <param name="sender">object sending the event</param>
 /// <param name="e">event arguments</param>
 private void SetNumPartitions(object sender, RoutedEventArgs e)
 {
     if (onePartition.IsChecked.GetValueOrDefault())
     {
         PartitionManager.SetPartitionType(PartitionType.Single);
     }
     else if (twoPartitionLR.IsChecked.GetValueOrDefault())
     {
         PartitionManager.SetPartitionType(PartitionType.DoubleLeftRight);
     }
     else if (twoPartitionFB.IsChecked.GetValueOrDefault())
     {
         PartitionManager.SetPartitionType(PartitionType.DoubleFrontBack);
     }
     else if (quadPartition.IsChecked.GetValueOrDefault())
     {
         PartitionManager.SetPartitionType(PartitionType.Quad);
     }
 }