本文整理汇总了C#中DisplayType类的典型用法代码示例。如果您正苦于以下问题:C# DisplayType类的具体用法?C# DisplayType怎么用?C# DisplayType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DisplayType类属于命名空间,在下文中一共展示了DisplayType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HexRender
public HexRender(DisplayType displayType, int height, Point worldCenter)
: this()
{
this.worldCenter = worldCenter;
this.DisplayType = displayType;
this.height = height;
}
示例2: CompatibilitySourceToDispPair
protected internal CompatibilitySourceToDispPair(DisplayType disp, SourceType source,
Func<Mapping, SourceType, bool> linkPredicate,
Func<Mapping> createMappingFunc)
: base(disp, source, linkPredicate, createMappingFunc)
{
_jupiterIn = null;
}
示例3: GetResourcesForUpload
//public virtual ResourceForUpload[] GetResourcesForUpload(Display display,
// ResourceDescriptor[] resourceDescriptors,
// out bool isEnoughFreeSpace)
//{
// isEnoughFreeSpace = true;
// return new ResourceForUpload[] { };
//}
public virtual ResourceDescriptor[] GetResourcesForUpload(DisplayType displayType,
ResourceDescriptor[] resourceDescriptors,
out bool isEnoughFreeSpace)
{
isEnoughFreeSpace = true;
return new ResourceDescriptor[] { };
}
示例4: SGLcd
public SGLcd(string portName, DisplayType displayType)
{
// Defaults for SerialPort are the same as the settings for the LCD, but I'll set them explicitly
_serialPort = new SerialPort(portName, 115200, Parity.None, 8, StopBits.One);
_displayType = displayType;
}
示例5: BuildAuthorizeUrl
/// <summary>
/// Constructs an authorize url.
/// </summary>
public static string BuildAuthorizeUrl(
string clientId,
string redirectUrl,
IEnumerable<string> scopes,
ResponseType responseType,
DisplayType display,
ThemeType theme,
string locale,
string state)
{
Debug.Assert(!string.IsNullOrEmpty(clientId));
Debug.Assert(!string.IsNullOrEmpty(redirectUrl));
Debug.Assert(!string.IsNullOrEmpty(locale));
IDictionary<string, string> options = new Dictionary<string, string>();
options[AuthConstants.ClientId] = clientId;
options[AuthConstants.Callback] = redirectUrl;
options[AuthConstants.Scope] = BuildScopeString(scopes);
options[AuthConstants.ResponseType] = responseType.ToString().ToLowerInvariant();
options[AuthConstants.Display] = display.ToString().ToLowerInvariant();
options[AuthConstants.Locale] = locale;
options[AuthConstants.ClientState] = EncodeAppRequestState(state);
if (theme != ThemeType.None)
{
options[AuthConstants.Theme] = theme.ToString().ToLowerInvariant();
}
return BuildAuthUrl(AuthEndpointsInfo.AuthorizePath, options);
}
示例6: DisplayedMolecule
public DisplayedMolecule(string codeName, string realName, string val, DisplayType displayType = DisplayType.MOLECULELIST)
{
_updated = true;
_codeName = codeName;
_realName = realName;
_val = val;
_displayType = displayType;
}
示例7: CreatureList
public CreatureList(int initialPage, DisplayType displayType, string sortedHeader, bool desc) {
this.currentPage = initialPage;
this.displayType = displayType;
this.sortedHeader = sortedHeader;
this.desc = desc;
objects = null;
InitializeComponent();
}
示例8: DisplayMatch
public DisplayMatch(OrganizerViewModel ovm, ObservableMatch match, DisplayType displayType)
{
Match = match;
MatchDisplayType = displayType;
//Modify ViewModel state when an action is initiated
Action startAction = () =>
{
ovm.ErrorMessage = null;
ovm.IsBusy = true;
};
//Modify ViewModel state when an action is completed
Action endAction = () =>
{
ovm.IsBusy = false;
};
//Modify ViewModel state when an action comes back with an exception
Action<Exception> errorHandler = ex =>
{
if (ex.InnerException is ChallongeApiException)
{
var cApiEx = (ChallongeApiException)ex.InnerException;
if (cApiEx.Errors != null) ovm.ErrorMessage = cApiEx.Errors.Aggregate((one, two) => one + "\r\n" + two);
else ovm.ErrorMessage = string.Format("Error with ResponseStatus \"{0}\" and StatusCode \"{1}\". {2}", cApiEx.RestResponse.ResponseStatus,
cApiEx.RestResponse.StatusCode, cApiEx.RestResponse.ErrorMessage);
}
else
{
ovm.ErrorMessage = ex.NewLineDelimitedMessages();
}
ovm.IsBusy = false;
};
Player1Wins = Command.CreateAsync(() => true, () => Match.ReportPlayer1Victory(SetScore.Create(1, 0)), startAction, endAction, errorHandler);
Player2Wins = Command.CreateAsync(() => true, () => Match.ReportPlayer2Victory(SetScore.Create(0, 1)), startAction, endAction, errorHandler);
Player1WinsScored = Command.CreateAsync<SetScore[]>(_ => true, scores => Match.ReportPlayer1Victory(scores), _ => startAction(), _ => endAction(), (_, ex) => errorHandler(ex));
Player2WinsScored = Command.CreateAsync<SetScore[]>(_ => true, scores => Match.ReportPlayer2Victory(scores), _ => startAction(), _ => endAction(), (_, ex) => errorHandler(ex));
Player1ToggleMissing = Command.CreateAsync(() => true, () => Match.Player1.IsMissing = !Match.Player1.IsMissing, startAction, endAction, errorHandler);
Player2ToggleMissing = Command.CreateAsync(() => true, () => Match.Player2.IsMissing = !Match.Player2.IsMissing, startAction, endAction, errorHandler);
AssignStation = Command.CreateAsync<Station>(_ => true, s => Match.AssignPlayersToStation(s.Name), _ => startAction(), _ => endAction(), (_, ex) => errorHandler(ex));
CallMatchAnywhere = Command.CreateAsync(() => true, () => Match.AssignPlayersToStation("Any"), startAction, endAction, errorHandler);
CallMatch = Command.CreateAsync<Station>(_ => true, s =>
{
if (!match.IsMatchInProgress)
{
if (s != null) Match.AssignPlayersToStation(s.Name);
else Match.AssignPlayersToStation("Any");
}
}, _ => startAction(), _ => endAction(), (_, ex) => errorHandler(ex));
UncallMatch = Command.CreateAsync(() => true, () => Match.ClearStationAssignment(), startAction, endAction, errorHandler);
}
示例9: Laptop
//Constructors
public Laptop(int price, string model, string manufacturer, int displaySize, string processor, int ramMemory, string video, DisplayType type)
: base(price, model, manufacturer)
{
this.displaySize = displaySize;
this.processor = processor;
this.ramMemory = ramMemory;
this.video = video;
this.typeOfLaptopDisplay = type;
}
示例10: NotEnoughSpaceRequest
private void NotEnoughSpaceRequest(DisplayType displayType)
{
// запишем в лог - ответ продолжить
_config.EventLog.WriteWarning(string.Format("На агенте {0} закончилось свободное место", displayType.Name));
if (_showPreparator != null)
{
_showPreparator.ResponseForNotEnoughFreeSpaceRequest(displayType, AgentAction.Continue);
}
}
示例11: SecurityPortal
/// <summary>
/// Initializes a new WPF window.
/// </summary>
/// <param name="displayType">Type of the message received from security API which is used to decide controls to be displayed on the screen.</param>
public SecurityPortal(DisplayType displayType)
{
InitializeComponent();
m_displayType = displayType;
Closed += Window_Closed;
MouseDown += Window_MouseDown;
ButtonLogin.Click += ButtonLogin_Click;
ButtonExit.Click += ButtonExit_Click;
ButtonOK.Click += ButtonOK_Click;
ButtonChange.Click += ButtonChange_Click;
ButtonChangePasswordLink.Click += ButtonChangePasswordLink_Click;
ButtonForgotPasswordLink.Click += ButtonForgotPasswordLink_Click;
ButtonLoginLink.Click += ButtonLoginLink_Click;
TextBoxUserName.TextChanged += TextBox_TextChanged;
TextBoxPassword.PasswordChanged += PasswordBox_PasswordChanged;
TextBoxChangePasswordUserName.TextChanged += TextBox_TextChanged;
TextBoxOldPassword.PasswordChanged += PasswordBox_PasswordChanged;
TextBoxNewPassword.PasswordChanged += PasswordBox_PasswordChanged;
TextBoxConfirmPassword.PasswordChanged += PasswordBox_PasswordChanged;
TextBoxUserName.GotFocus += TextBox_GotFocus;
TextBoxPassword.GotFocus += TextBox_GotFocus;
TextBoxChangePasswordUserName.GotFocus += TextBox_GotFocus;
TextBoxOldPassword.GotFocus += TextBox_GotFocus;
TextBoxNewPassword.GotFocus += TextBox_GotFocus;
TextBoxConfirmPassword.GotFocus += TextBox_GotFocus;
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
ConfigurationFile config = ConfigurationFile.Current;
CategorizedSettingsElementCollection settings = config.Settings[SecurityProviderBase.DefaultSettingsCategory];
string setting = settings["ApplicationName"].Value;
if (!string.IsNullOrWhiteSpace(setting))
{
TextBlockApplicationLogin.Text = setting + " :: Login";
TextBlockAccessDenied.Text = setting + " :: Access Denied";
TextBlockChangePassword.Text = setting + " :: Change Password";
}
// Load last user login ID setting
settings.Add("LastLoginID", Thread.CurrentPrincipal.Identity.Name, "Last user login ID", false, SettingScope.User);
setting = settings["LastLoginID"].Value;
if (string.IsNullOrWhiteSpace(setting))
setting = Thread.CurrentPrincipal.Identity.Name;
TextBoxUserName.Text = setting;
// Inititialize screen
ClearErrorMessage();
ManageScreenVisualization();
// Open this window on top of all other windows
Topmost = true;
}
示例12: CompatibilityDispToSourcePair
protected internal CompatibilityDispToSourcePair(DisplayType disp, SourceType source,
Func<Mapping, SourceType, bool> linkPredicate,
Func<Mapping> createMappingFunc)
{
_linkPredicate = linkPredicate;
_createMappingFunc = createMappingFunc;
Source = source;
_disp = disp;
_Compatible = _disp.MappingList.Exists(m => _linkPredicate(m, Source));
}
示例13: BuildWebAuthorizeUrl
/// <summary>
/// Constructs an authorize url.
/// </summary>
public static string BuildWebAuthorizeUrl(
string clientId,
string redirectUrl,
IEnumerable<string> scopes,
DisplayType display,
string locale,
string state)
{
return BuildAuthorizeUrl(clientId, redirectUrl, scopes, ResponseType.Code, display, ThemeType.None, locale, state);
}
示例14: Display2Fields
protected Display2Field Display2Fields(DisplayType dT, params FieldType[] fT)
{
Display2Field field = new Display2Field();
List<FieldType> list = new List<FieldType>();
foreach (FieldType type in fT)
{
list.Add(type);
}
field.Display = dT;
field.Fields = list;
return field;
}
示例15: DisplayTypeToString
public static string DisplayTypeToString(DisplayType type)
{
switch (type)
{
default:
return type.ToString();
case DisplayType.FixedPoint_12_4:
return "Fixed Point 12.4";
case DisplayType.FixedPoint_20_12:
return "Fixed Point 20.12";
}
}