Exemplo n.º 1
0
        public void GenerateParametersFromKBRecord()
        {
            Parameters = new List <InputParameter>();
            if (KBRecord == null)
            {
                ParametersChanged?.Invoke(this, null);
                return;
            }

            switch (KBRecord.Params)
            {
            case KnowledgeBase.Record.Parameterization.ConfigurableRange:
                Parameters.Add(new InputParameterNumeric("Range lower bound", (float)KBRecord.MinimumValue, (float)KBRecord.MaximumValue));
                Parameters.Add(new InputParameterNumeric("Range upper bound", (float)KBRecord.MinimumValue, (float)KBRecord.MaximumValue));
                break;

            case KnowledgeBase.Record.Parameterization.Enumeration:
                Parameters.Add(new InputParameterEnumeration("Enumeration", KBRecord.EnumerationValues));
                break;

            case KnowledgeBase.Record.Parameterization.FixedRange:
                Parameters.Add(new InputParameterNumeric("Ceiling", (float)KBRecord.MinimumValue, (float)KBRecord.MaximumValue));
                break;
            }

            ParametersChanged?.Invoke(this, null);
        }
Exemplo n.º 2
0
        public void GenerateParametersFromKBRecord()
        {
            Parameters = new List <InputParameter>();
            if (KBRecord == null)
            {
                ParametersChanged?.Invoke(this, null);
                return;
            }

            switch (KBRecord.Params)
            {
            case KnowledgeBase.Record.Parameterization.ConfigurableRange:
                Parameters.Add(new InputParameter("Range lower bound", -1e6f, 1e6f));
                Parameters.Add(new InputParameter("Range upper bound", -1e6f, 1e6f));
                break;

            case KnowledgeBase.Record.Parameterization.Enumeration:
                // TODO - implement enumerated parameters
                break;

            case KnowledgeBase.Record.Parameterization.FixedRange:
                Parameters.Add(new InputParameter("Range", -1e6f, 1e6f));
                break;
            }

            ParametersChanged?.Invoke(this, null);
        }
Exemplo n.º 3
0
        internal void Internal_OnAnimationGraphChanged()
        {
            // Clear cached data
            _parametersHash++;
            _parameters = null;

            ParametersChanged?.Invoke(this);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Обработчик события выбора цвета заливки
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonFillColor_Click(object sender, EventArgs e)
 {
     if (colorDialogLineColor.ShowDialog() != DialogResult.OK)
     {
         return;
     }
     buttonFillColor.BackColor   = colorDialogLineColor.Color;
     _figureParameters.FillColor = colorDialogLineColor.Color;
     ParametersChanged?.Invoke(this, _figureParameters);
 }
Exemplo n.º 5
0
        private void SetParameterProvider()
        {
            switch (Type)
            {
            case IntegraChorusTypes.Chorus:    Parameters = new CommonChorus(this); break;

            case IntegraChorusTypes.Delay:     Parameters = new CommonDelay(this); break;

            case IntegraChorusTypes.GM2Chorus: Parameters = new CommonChorusGM2(this); break;

            default:
                Parameters = new CommonChorusOff(this);
                break;
            }
            ;

            ParametersChanged?.Invoke(this, new IntegraParametersChangedEventArgs(Parameters.GetType()));
            NotifyPropertyChanged(string.Empty);
        }
Exemplo n.º 6
0
        private void SetParameterProvider()
        {
            switch (Type)
            {
            case IntegraReverbTypes.Room1:
            case IntegraReverbTypes.Room2:
            case IntegraReverbTypes.Hall1:
            case IntegraReverbTypes.Hall2:
            case IntegraReverbTypes.Plate:
                Parameters = new CommonReverb(this);
                break;

            case IntegraReverbTypes.GM2:
                Parameters = new CommonReverbGM2(this);
                break;

            default:
                Parameters = new CommonReverbOff(this);
                break;
            }

            ParametersChanged?.Invoke(this, new IntegraParametersChangedEventArgs(Parameters.GetType()));
            NotifyPropertyChanged(string.Empty);
        }
Exemplo n.º 7
0
 protected void OnParametersChanged()
 {
     ParametersChanged?.Invoke(this, new EventArgs());
 }
Exemplo n.º 8
0
 internal void Internal_ClearParams()
 {
     _parametersHash++;
     _parameters = null;
     ParametersChanged?.Invoke(this);
 }
Exemplo n.º 9
0
 /// <summary>
 /// Обработчик события изменения значения типа линии
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cbLineType_SelectedIndexChanged(object sender, EventArgs e)
 {
     _figureParameters.LineStyle = cbLineType.SelectedIndex;
     ParametersChanged?.Invoke(this, _figureParameters);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Обработчик изменения толщины линии
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void nudLineThickness_ValueChanged(object sender, EventArgs e)
 {
     _figureParameters.LineThickness = Convert.ToInt32(nudLineThickness.Value);
     ParametersChanged?.Invoke(this, _figureParameters);
 }
Exemplo n.º 11
0
        //--------------------------------------------------------------------------------------------------

        void _RaiseParametersChanged()
        {
            ParametersChanged?.Invoke(this);
        }
Exemplo n.º 12
0
 public void OnParametersChanged()
 {
     ParametersChanged?.Invoke(this, EventArgs.Empty);
     DoRender();
 }
Exemplo n.º 13
0
 protected virtual void OnParametersChanged()
 {
     ParametersChanged?.Invoke(this, EventArgs.Empty);
 }
Exemplo n.º 14
0
 private void OnParametersChanged()
 {
     ParametersChanged?.Invoke(this, EventArgs.Empty);
 }