Example #1
0
        public StatusDetailCollection GetStatus()
        {
            OneDriveLib.WriteLog.WriteToFile = true;
            OneDriveLib.WriteLog.WriteInformationEvent(String.Format("Is Interactive: {0}, Is UAC Enabled: {1}, Is Elevated: {2}", Environment.UserInteractive, OneDriveLib.UacHelper.IsUacEnabled,
                                                                     OneDriveLib.UacHelper.IsProcessElevated));

            StatusDetailCollection statuses = new StatusDetailCollection();

            foreach (var status in GetStatusInternal())
            {
                if (status.Status != ServiceStatus.OnDemandOrUnknown)
                {
                    if (status.Status == ServiceStatus.Error)
                    {
                        status.StatusString = API.GetStatusByDisplayName(status.DisplayName);
                    }
                    statuses.Add(status);
                }
            }
            foreach (var status in GetStatusInternalGroove())
            {
                if (status.Status != ServiceStatus.OnDemandOrUnknown)
                {
                    if (status.Status == ServiceStatus.Error)
                    {
                        status.StatusString = API.GetStatusByDisplayName(status.DisplayName);
                    }
                    statuses.Add(status);
                }
            }
            return(statuses);
        }
Example #2
0
        public StatusDetailCollection GetStatus()
        {
            StatusDetailCollection statuses = new StatusDetailCollection();

            foreach (var status in GetStatusInternal())
            {
                statuses.Add(status);
            }
            return(statuses);
        }