Ejemplo n.º 1
0
        // Checks whether the system is able to use the app.
        void DetectSystem()
        {
            GraphicsAdapter graphicsAdapter = DetectGraphicsAdapter();

            supportLevel = graphicsAdapter.SupportLevel;

            if (graphicsAdapter.SupportLevel != SupportLevel.Full)
            {
                forceModeCheckBox.Visibility = Visibility.Visible;
            }

            // Has graphics adapter but not app (probably driver update needed).
            if (graphicsAdapter.SupportLevel != SupportLevel.None && !DetectApp())
            {
                MessageBox.Show("I was unable to locate 'C:/Program Files/NVIDIA Corporation/NVIDIA NvDLISR/nvdlisrwrapper.exe'. Without this app, I cannot do what I am supposed to do.\n\nIt is very likely that your Display Adapter Driver needs updating.", "Prerequisites Missing", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            // Has neither the graphics adapter nor the app (probably not NVIDIA).
            else if (graphicsAdapter.SupportLevel == SupportLevel.None && !DetectApp())
            {
                MessageBox.Show("An NVIDIA GeForce GTX or RTX display adapter is required and neither could not be found.", "Prerequisites Missing", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            // Has the app but not the graphics adapter (probably used to have NVIDIA but not anymore; could also be the app not recognising the graphics adapter properly).
            else if (graphicsAdapter.SupportLevel == SupportLevel.None && DetectApp())
            {
                MessageBox.Show("An NVIDIA GeForce GTX or RTX display adapter is required and neither could not be found.\n\nIf you feel like this is a mistake, enable 'Force Mode'.", "Prerequisites Missing", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            UpdateOptions();

            systemCheckComplete = true;
        }
Ejemplo n.º 2
0
 public TicketEntity(int number, SupportLevel difficulty, Dictionary <SupportLevel, int> difficultyToSolveDurationMin, int createAtTicks)
 {
     Number     = number;
     Difficulty = difficulty;
     DifficultyToSolveDurationMin = difficultyToSolveDurationMin;
     this.createAtTicks           = createAtTicks;
 }
Ejemplo n.º 3
0
 public Protocol(string scheme, SupportLevel username, SupportLevel password, SupportLevel userAndPass)
 {
     this.Scheme          = scheme;
     this.Username        = username;
     this.Password        = password;
     this.UserAndPassword = userAndPass;
 }
Ejemplo n.º 4
0
 public EmployeeType(string name, SupportLevel level, int hourlyWage, decimal successRate, decimal durationFactor)
 {
     Name           = name;
     Level          = level;
     HourlyWage     = hourlyWage;
     SuccessRate    = successRate;
     DurationFactor = durationFactor;
 }
Ejemplo n.º 5
0
 public void EscalateTo(SupportLevel supportLevel, TicketEntity entity)
 {
     if (Enum.GetValues(typeof(SupportLevel)).Cast <SupportLevel>().Any(t => t == (supportLevel)))
     {
         supportLevelToTicketQueue[supportLevel].Enqueue(entity);
         return;
     }
     throw new ArgumentException("Invalid support level!");
 }
Ejemplo n.º 6
0
 public void StopSolving(int ticks, SupportLevel solvedByLevel)
 {
     if (solvedByLevel >= Difficulty)
     {
         if (stopTicks == null || stopTicks < ticks)
         {
             stopTicks = ticks;
         }
     }
 }
Ejemplo n.º 7
0
 public TicketEntity Dequeue(SupportLevel supportLevel, out bool lowerLevel)
 {
     lock (supportLevelToTicketQueue)
     {
         lowerLevel = false;
         for (SupportLevel startLevel = supportLevel; startLevel >= SupportLevel.Level1st; startLevel--)
         {
             if (supportLevelToTicketQueue[startLevel].TryDequeue(out var rv))
             {
                 return(rv);
             }
             lowerLevel = true;
         }
         return(null);
     }
 }
Ejemplo n.º 8
0
 public int TicksToSolve(SupportLevel sp)
 {
     return(DifficultyToSolveDurationMin[sp]);
 }
Ejemplo n.º 9
0
 public bool MoreDifficultyThen(SupportLevel sp)
 {
     return(sp < Difficulty);
 }
Ejemplo n.º 10
0
 public void Enqueue(SupportLevel supportLevel, TicketEntity entity)
 {
     supportLevelToTicketQueue[supportLevel].Enqueue(entity);
 }
Ejemplo n.º 11
0
 public int Count(SupportLevel supportLevel)
 {
     return(supportLevelToTicketQueue[supportLevel].Count);
 }
Ejemplo n.º 12
0
 public bool Available(SupportLevel supportLevel)
 {
     return(supportLevelToTicketQueue[supportLevel].Count != 0);
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SupportPriority"/> class.
 /// </summary>
 /// <param name="pLevel">The level.</param>
 /// <param name="pSubPriority">The sub priority.</param>
 public SupportPriority(SupportLevel pLevel, int pSubPriority)
 {
     this.Level       = pLevel;
     this.SubPriority = pSubPriority;
 }