Esempio n. 1
0
        public string GetIndexingServerStatusToolTipText(GetDatabaseStatisticsResponse response)
        {
            switch (response.ServerStatus)
            {
            case IndexingServerStatus.Idle:
                return("The server is idle and the index is up to date.\r\n" +
                       "The index is automatically updated as files change on disk.");

            case IndexingServerStatus.Paused:
                return("The server is paused and the index may be out of date.\r\n" +
                       "The index is not automatically updated as files change on disk.\r\n" +
                       "Press the \"Run\" button to resume automatic indexing now.");

            case IndexingServerStatus.Yield:
                return("The server is paused due to heavy disk activity and the index may be out of date.\r\n" +
                       "The index is not automatically updated as files change on disk.\r\n" +
                       "The server will attempt to update the index in a few minutes.\r\n" +
                       "Press the \"Run\" button to resume automatic indexing now.");

            case IndexingServerStatus.Busy:
                return("The server is working on updating the index to match the contents of files on disk.\r\n" +
                       "Press the \"Pause\" button to pause indexing.");

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 2
0
        public string GetIndexStatusText(GetDatabaseStatisticsResponse response)
        {
            var memoryUsageMb = (double)response.ServerNativeMemoryUsage / 1024L / 1024L;
            var message       = String.Format("Index: {0:n0} files - {1:n0} MB", response.SearchableFileCount, memoryUsageMb);

            return(message);
        }
Esempio n. 3
0
 private void UpdateIndexingServerToolbarStatus(GetDatabaseStatisticsResponse response)
 {
     ViewModel.IndexingPaused           = response.ServerStatus == IndexingServerStatus.Paused || response.ServerStatus == IndexingServerStatus.Yield;
     ViewModel.IndexingPausedDueToError = response.ServerStatus == IndexingServerStatus.Yield;
     ViewModel.IndexingBusy             = response.ServerStatus == IndexingServerStatus.Busy;
     ViewModel.IndexStatusText          = _showServerInfoService.GetIndexStatusText(response);
     ViewModel.IndexingServerStateText  = _showServerInfoService.GetIndexingServerStatusText(response);
     ViewModel.ServerStatusToolTipText  = _showServerInfoService.GetIndexingServerStatusToolTipText(response);
 }
Esempio n. 4
0
        public string GetIndexingServerStatusText(GetDatabaseStatisticsResponse response)
        {
            switch (response.ServerStatus)
            {
            case IndexingServerStatus.Idle:
                return("Idle");

            case IndexingServerStatus.Paused:
                return("Paused");

            case IndexingServerStatus.Yield:
                return("Yield");

            case IndexingServerStatus.Busy:
                return("Busy");

            default:
                throw new ArgumentOutOfRangeException();
            }
        }