Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     Help    = FindObjectOfType(typeof(OnHelp)) as OnHelp;
     Setting = FindObjectOfType(typeof(OnSettings)) as OnSettings;
     FB      = FindObjectOfType(typeof(OnFb)) as OnFb;
     cup     = FindObjectOfType(typeof(OnCup)) as OnCup;
 }
Exemplo n.º 2
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;
            }
        }
Exemplo n.º 3
0
 private void BtnSettings_OnClick()
 {
     OnSettings?.Invoke();
 }
Exemplo n.º 4
0
 void SettingsButton(object sender, RoutedEventArgs e)
 {
     OnSettings?.Invoke();
 }
 private void cmdSettings_Click(object sender, EventArgs e)
 {
     OnSettings?.Invoke(this, EventArgs.Empty);
 }