Ejemplo n.º 1
0
        public void State_FinishedStream(DriveProxy.API.DriveService.State sender, API.DriveService.Stream stream)
        {
            try
            {
                if (InvokeRequired)
                {
                    BeginInvoke(new DriveProxy.API.DriveService.State.StreamHandler(State_FinishedStream),
                                new object[] { sender, stream });
                    return;
                }

                for (int i = 0; i < panelBody.Controls.Count; i++)
                {
                    var stateControl = panelBody.Controls[i] as StateControl;

                    if (stateControl != null)
                    {
                        if (stateControl.Stream == stream)
                        {
                            if (stream.Failed)
                            {
                                _hasError = true;
                            }
                            break;
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Log.Error(exception, false);
            }
        }
Ejemplo n.º 2
0
        public void State_StartedProcessing(DriveProxy.API.DriveService.State sender)
        {
            try
            {
                if (InvokeRequired)
                {
                    BeginInvoke(new DriveProxy.API.DriveService.State.EventHandler(State_StartedProcessing),
                                new object[] { sender });
                    return;
                }

                _IsProcessing = true;

                timerFinishedProcessing.Stop();

                _hasError = false;

                if (!_isMinimizedByUser)
                {
                    ShowPopup();
                }
            }
            catch (Exception exception)
            {
                Log.Error(exception, false);
            }
        }