private void InitPlatform()
 {
     _localVideoStarted = false;
     try
     {
         Platform.init(_dispatcher);
     }
     catch (Exception)
     {
         MessageBox.Show("oops");
     }
     _isPlatformInitialized = true;
 }
        private void OnADLInitStateChanged(object sender, InitStateChangedEvent e)
        {
            if (e.state == InitStateChangedEvent.InitState.ERROR)
            {
                if (_retryCount <= MaxRetryCount)
                {
                    _retryCount++;
                    Debug.WriteLine("Retying init");
                    Platform.init(_dispatcher);
                    return;
                }
                Debug.WriteLine("Failed to initialize platform. Cause: " + e.errMessage + "(" + e.errCode + ")");
                return;
            }
            InitializeCDOEventListener();

            Debug.WriteLine("Platform initialized. Proceeding with the initialization");

            PostInitializePlatform();
        }