Example #1
0
 protected virtual void OnParameterChanged(object sender, ParameterEventArgs e)
 {
     EventHandler<ParameterEventArgs> handler = ParameterChangedEvent;
     if (handler != null)
     {
         handler(sender, e);
     }
 }
Example #2
0
 private void _connectedDevice_LocalParameterChangedEvent(object sender, ParameterEventArgs e)
 {
     var channel = sender != null ? (sender as Parameters).Tag : 0;
     SetParameterValueLocal(e.Parameter, channel);
 }
Example #3
0
        private void _connectedDevice_ParameterChangedEvent(object sender, ParameterEventArgs e)
        {
            var parameters = sender as Parameters;
            var channel = parameters != null ? parameters.Tag : 0;
            SetParameterValueMicro(e.Parameter, channel);

            // if (DeviceType == DEVICE_TYPE.REMOTE_DISPLAY && e.Parameter.Name == RemoteDisplayParameters.UnitsName)
            {
                //  var rdParameters = parameters as RemoteDisplayParameters;
                //  RefreshParameterValue(rdParameters.AbsoluteOffsetParameter, channel);
                //  RefreshParameterValue(rdParameters.HighToleranceParameter, channel);
                //  RefreshParameterValue(rdParameters.LowToleranceParameter, channel);
                //  RefreshParameterValue(rdParameters.AnalogScaleParameter, channel);
            }
        }
Example #4
0
        /// <summary>
        /// Handles the stop storyboard event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void StopStoryboard(object sender, ParameterEventArgs<string> e)
        {
            try
            {
                var storyboardName = e.Parameter1;
                try
                {
                    if (!string.IsNullOrEmpty(storyboardName))
                    {
                        var sb = FindName(storyboardName) as Storyboard;
                        if (sb != null)
                        {
                            sb.Stop();
                        }
                    }
                }
                // ReSharper disable EmptyGeneralCatchClause
                catch
                {
                }
                // ReSharper restore EmptyGeneralCatchClause
            }
            catch (Exception exception)
            {
                Debug.WriteLine(exception.Message);
            }

        }
 private void ManageUsersOnLogonControllerOnCustomCancelLogonParameter(object sender, ParameterEventArgs parameterEventArgs){
     parameterEventArgs.Handled=((IModelOptionsAuthentication) Application.Model.Options).Athentication.AnonymousAuthentication.Enabled;
 }
 /// <summary>
 /// Saves the last param.
 /// </summary>
 /// <param name="args">The <see cref="ParameterEventArgs"/> instance containing the event data.</param>
 /// <param name="lastParams">The last params.</param>
 public void SaveTheLastParam(ParameterEventArgs args, IParameters lastParams)
 {
     lastParams.SetParameter(args.Parameter.Key, args.Parameter.Value);
 }
Example #7
0
 /// <summary>
 /// Called when output parameter sended.
 /// </summary>
 /// <param name="outputParameter">The output parameter.</param>
 private void OnEventOutputParameterToSend(IParameter outputParameter)
 {
     this.SetParameter(outputParameter.Key, outputParameter.Value);
     var output = new ParameterEventArgs(this.basicComponent.Code, outputParameter);
     OutputChangeNotificationHandler notificationHandler = this.EventOutputChange;
     if (notificationHandler != null) notificationHandler(this, output);
 }
Example #8
0
 /// <summary>
 /// Setters the param (Analog and Digital).
 /// </summary>
 /// <param name="args">The <see cref="ParameterEventArgs"/> instance containing the event data.</param>
 public void SetParameter(ParameterEventArgs args)
 {
     if (args != null && args.Parameter != null && args.Parameter.Value != null)
     {
         this.SetParameter(args.Parameter.Key, args.Parameter.Value);
     }
 }