Exemple #1
0
        void Start() //Start Logitech ARX INIT
        {
            contextCallback.arxCallBack = new LogitechArx.logiArxCB(this.callback);
            contextCallback.arxContext  = System.IntPtr.Zero;
            bool retVal = LogitechArx.LogiArxInit("de.so.TwitchControl", "TwitchControl", ref contextCallback);

            if (!retVal)
            {
                int retCode = LogitechArx.LogiArxGetLastError();
                Debug.Fail("SDK can't be initalized! Error: " + retCode);
            }
        }
Exemple #2
0
        static void Start()
        {
            LogitechArx.logiArxCbContext contextCallback;
            contextCallback.arxCallBack = arxCallback;
            contextCallback.arxContext  = System.IntPtr.Zero;
            bool retVal = LogitechArx.LogiArxInit("arx.hardware.monitor", "ArxHWM", ref
                                                  contextCallback);

            if (!retVal)
            {
                int retCode = LogitechArx.LogiArxGetLastError();
                Console.WriteLine("loading sdk failed: " + retCode);
            }
        }
Exemple #3
0
        static void SDKCallback(int eventType, int eventValue, System.String eventArg, System.IntPtr context)
        {
            if (eventType == LogitechArx.LOGI_ARX_EVENT_MOBILEDEVICE_ARRIVAL)
            {
                // Initilize Environment
                if (!LogitechArx.LogiArxAddFileAs("view.html", "view.html"))
                {
                    int retCode = LogitechArx.LogiArxGetLastError();
                    Debug.WriteLine("exec failed: " + retCode);
                }

                if (!LogitechArx.LogiArxAddFileAs("bootstrap.min.css", "bootstrap.min.css"))
                {
                    int retCode = LogitechArx.LogiArxGetLastError();
                    Debug.WriteLine("exec failed: " + retCode);
                }

                if (!LogitechArx.LogiArxAddFileAs("bootstrap.min.js", "bootstrap.min.js"))
                {
                    int retCode = LogitechArx.LogiArxGetLastError();
                    Debug.WriteLine("exec failed: " + retCode);
                }

                if (!LogitechArx.LogiArxSetIndex("view.html"))
                {
                    int retCode = LogitechArx.LogiArxGetLastError();
                    Debug.WriteLine("exec failed: " + retCode);
                }
            }
            else if (eventType == LogitechArx.LOGI_ARX_EVENT_MOBILEDEVICE_REMOVAL)
            {
                // Handle Disconnect
            }
            else if (eventType == LogitechArx.LOGI_ARX_EVENT_TAP_ON_TAG)
            {
                // Handle Inputs
            }
        }