GTB FrmFwUpdate: Set upgrade permission to 0xFF to allow upgrade of GENESISFLOW
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using ProductionUiCordonel.Properties;
|
||||
|
||||
namespace ProductionUiCordonel.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Concatenation of state and string
|
||||
/// </summary>
|
||||
public static class FinalTestStateInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Build state information
|
||||
/// </summary>
|
||||
private static readonly FinalTestStateText[] StateInfos;
|
||||
|
||||
/// <summary>
|
||||
/// Ctor
|
||||
/// </summary>
|
||||
static FinalTestStateInfo()
|
||||
{
|
||||
StateInfos = new FinalTestStateText[(Int32)FinalTestState.StateListDelimiter];
|
||||
StateInfos[(Int32)FinalTestState.Idle].State = FinalTestState.Idle;
|
||||
StateInfos[(Int32)FinalTestState.Idle].Message = Resources.StrStateIdle;
|
||||
|
||||
StateInfos[(Int32)FinalTestState.StartInitial].State = FinalTestState.StartInitial;
|
||||
StateInfos[(Int32)FinalTestState.StartInitial].Message = Resources.StrStateStartInitial;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the current information
|
||||
/// </summary>
|
||||
/// <param name="state">state to search for information text</param>
|
||||
public static String GetTextFromState(FinalTestState state)
|
||||
{
|
||||
return (from stateInfo in StateInfos
|
||||
where stateInfo.State == state
|
||||
select stateInfo.Message).FirstOrDefault();
|
||||
}
|
||||
/// <summary>
|
||||
/// Get the state of the text
|
||||
/// </summary>
|
||||
/// <param name="text">information text to search if state is assigned</param>
|
||||
public static FinalTestState GetStateFromText(String text)
|
||||
{
|
||||
return (from stateInfo in StateInfos
|
||||
where stateInfo.Message == text
|
||||
select stateInfo.State).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user