Esempio n. 1
0
        /// <inheritdoc />
        /// <summary>
        ///     Creates new instance of PhaserViewModel
        /// </summary>
        public PhaserViewModel(PhaserParameters parameters)
        {
            PhaserParameters = parameters;

            PhaserParameters.PropertyChanged += (sender, args) =>
            {
                if (args.PropertyName == nameof(PhaserParameters.Mode))
                {
                    NotifyOfPropertyChange(nameof(IsRateModeSelected));
                }
            };
        }
Esempio n. 2
0
        /// <summary>
        /// This method opens a selected filter's window where the user
        /// can set the parameters for the filter. Once the parameters
        /// are set, the user can then apply, cancel, or remove the filter.
        /// This method is called when a user selects a new filter under
        /// the filters menu or when a user selects an already applied filter
        /// in the filter queue.
        /// </summary>
        private void OpenFilterWindow(String filterType, String inputElement)
        {
            EffectParameters parameters;

            if (inputElement.Equals("MenuItem"))
            {
                switch (filterType)
                {
                case "Echo":
                    parameters = new EchoParameters();
                    break;

                case "Amplify":
                    parameters = new AmplifyParameters();
                    break;

                case "Bass Boost":
                    parameters = new BassBoostParameters();
                    break;

                case "Phaser":
                    parameters = new PhaserParameters();
                    break;

                case "Fade In":
                    parameters = new FadeInParameters();
                    break;

                case "Fade Out":
                    parameters = new FadeOutParameters();
                    break;

                case "Distortion":
                    parameters = new DistortionParameters();
                    break;

                default:
                    StatusText.Content = filterType + " is an invalid filter. ";
                    return;
                }
            }
            else
            {
                parameters = filtersList[inputElement].param;
            }

            FilterWindow winFilter = new FilterWindow(filterType, inputElement, parameters);

            winFilter.Owner = this;
            winFilter.Show();
        }