Пример #1
0
        public void Initialize(string applicationName)
        {
            this.platform = new UccPlatform();
            this.platform.Initialize(applicationName, null);

            this.traceSettings = this.platform as IUccTraceSettings;
        }
Пример #2
0
        public void Cleanup()
        {
            this.CleanupEndpoint();

            this.traceSettings = null;
            if (this.platform != null)
            {
                try { this.platform.Shutdown(null); }
                catch (InvalidComObjectException) { }
            }
            this.platform = null;
        }
Пример #3
0
        /// <summary>
        /// Create platform
        /// </summary>
        public void CreatePlatform()
        {
            this.platform = new UccPlatformClass();
            if (this.platform != null)
            {
                // Register this client with the platform to receive
                // notifications of the platform events
                Advise <_IUccPlatformEvents>(this.platform, this);

                // Initialize the platform
                this.platform.Initialize("UccpSample", null);
                IUccTraceSettings traceSettings = (IUccTraceSettings)this.platform;
                traceSettings.EnableTracing();
            }
        }
Пример #4
0
 void _IUccPlatformEvents.OnShutdown(
     UccPlatform eventSource,
     IUccOperationProgressEvent eventData)
 {
     if (eventData.IsComplete)
     {
         if (eventData.StatusCode >= 0)
         {
             this.platform = null;
         }
         else
         {
             this.mainForm.WriteStatusMessage("Failed to shutdown platform. Error: " +
                                              eventData.StatusCode.ToString("X"));
         }
     }
 }