Exemple #1
0
        private void IPCOnMessage(object sender, MessageReceivedEventArgs e)
        {
            var actionData = Action.FromJson(e.Message);

            switch (actionData?.Type)
            {
            case ActionTypes.Acknowledged:
                OnAcknowledged?.Invoke(this, new EventArgs());
                break;

            case ActionTypes.ClearConsole:
                OnClearConsole?.Invoke(this, new EventArgs());
                break;

            case ActionTypes.Output:
                OnOutput?.Invoke(this, new Events.Output(actionData.Body));
                break;

            case ActionTypes.GetSettings:
                OnSettings?.Invoke(this, new Events.Settings(this, e.Message));
                break;

            case ActionTypes.UpdateSettingFailed:
                OnUpdateSettingFailure?.Invoke(this, new Events.SettingUpdateFailed(actionData.Body));
                break;
            }
        }
 private void BtnSettings_OnClick()
 {
     OnSettings?.Invoke();
 }
 void SettingsButton(object sender, RoutedEventArgs e)
 {
     OnSettings?.Invoke();
 }
 private void cmdSettings_Click(object sender, EventArgs e)
 {
     OnSettings?.Invoke(this, EventArgs.Empty);
 }