예제 #1
0
        public RoutinePlayerWindow()
        {
            //Initialization
            InitializeComponent();
            _players         = new BindingList <RoutinePlayer>();
            _fixtureWrappers = new BindingList <FixtureWrapperFAOverride>();
            _active          = false;
            _createNew       = false;

            //Routine list
            foreach (Routine routine in Controller.Routines)
            {
                RoutinePlayer player = new RoutinePlayer(routine);
                _players.Add(player);
            }
            lbxRoutines.ItemsSource = _players;

            lbxPresets.ItemsSource = Controller.AttributePresets;

            //Add Fixtures to Affects list
            foreach (Fixture fixture in Controller.Fixtures)
            {
                _fixtureWrappers.Add(new FixtureWrapperFAOverride(fixture));
            }
            lbxFixturesToAffect.ItemsSource = _fixtureWrappers;

            //create initial preset
            GenerateFreshPreset();
        }
        public RoutinePlayerWindow()
        {
            //Initialization
            InitializeComponent();
            _players = new BindingList<RoutinePlayer>();
            _fixtureWrappers = new BindingList<FixtureWrapperFAOverride>();
            _active = false;
            _createNew = false;

            //Routine list
            foreach (Routine routine in Controller.Routines)
            {
                RoutinePlayer player = new RoutinePlayer(routine);
                _players.Add(player);
            }
            lbxRoutines.ItemsSource = _players;

            lbxPresets.ItemsSource = Controller.AttributePresets;

            //Add Fixtures to Affects list
            foreach (Fixture fixture in Controller.Fixtures)
            {
                _fixtureWrappers.Add(new FixtureWrapperFAOverride(fixture));
            }
            lbxFixturesToAffect.ItemsSource = _fixtureWrappers;

            //create initial preset
            GenerateFreshPreset();
        }
예제 #3
0
 private void btnDeleteRoutine_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show("Do you really want to delete this routine?", "Delete confirmation", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         RoutinePlayer player = (RoutinePlayer)lbxRoutines.SelectedItem;
         int           index  = _players.IndexOf(player);
         _players.Remove(player);
         Controller.Routines.Remove(player.Routine);
         lbxRoutines.SelectedIndex = index;
     }
 }
예제 #4
0
        private void btnPreviewRoutine_Click(object sender, RoutedEventArgs e)
        {
            RoutinePlayer player = new RoutinePlayer();

            player.PreviewRoutine(_routine);
        }
 private void btnPreviewRoutine_Click(object sender, RoutedEventArgs e)
 {
     RoutinePlayer player = new RoutinePlayer();
     player.PreviewRoutine(_routine);
 }