コード例 #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;
 }
コード例 #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;
            }
        }
コード例 #3
0
 private void BtnSettings_OnClick()
 {
     OnSettings?.Invoke();
 }
コード例 #4
0
ファイル: Login.xaml.cs プロジェクト: 1aam2am1/SmartControlC3
 void SettingsButton(object sender, RoutedEventArgs e)
 {
     OnSettings?.Invoke();
 }
コード例 #5
0
 private void cmdSettings_Click(object sender, EventArgs e)
 {
     OnSettings?.Invoke(this, EventArgs.Empty);
 }