本文整理汇总了C#中PositionType类的典型用法代码示例。如果您正苦于以下问题:C# PositionType类的具体用法?C# PositionType怎么用?C# PositionType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PositionType类属于命名空间,在下文中一共展示了PositionType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBallyTenderInfoListOverrideSettings
private static Dictionary<string, string> GetBallyTenderInfoListOverrideSettings(string denomTemplateName, StylePropertyBag style, string onRowSelectFunction,
string headerCssClass, string footerCssClass, bool grantTotalRequired, string cssClass, bool otherAmountRequired, string otherAmountLabelKey, string actionUrl, PositionType otherAmountPosition, bool isViewMode, string validationMessageKey, DenomModeType denomMode, string undefinedRowReadonlyColumns, string undefinedRowEditableColumns, bool movementIndicatorRequired, string movementIndicatorColumn)
{
Dictionary<string, string> overrideSettings;
overrideSettings = new Dictionary<string, string>();
overrideSettings.Add(ControlLibConstants.DENOM_ON_ROWSELECT_FUNCTION, onRowSelectFunction);
overrideSettings.Add(ControlLibConstants.DENOM_TEMPLATE_KEY, denomTemplateName);
overrideSettings.Add(ControlLibConstants.DENOM_HEADER_CSS, headerCssClass);
overrideSettings.Add(ControlLibConstants.DENOM_FOOTER_CSS, footerCssClass);
overrideSettings.Add(ControlLibConstants.DENOM_GRANT_TOTAL_REQUIRED, grantTotalRequired.ToString());
overrideSettings.Add(ControlLibConstants.CSS_CLASS, cssClass);
overrideSettings.Add(ControlLibConstants.DENOM_OTHERAMOUNT_REQUIRED, otherAmountRequired.ToString());
overrideSettings.Add(ControlLibConstants.DENOM_OTHERAMOUNT_LABELKEY, otherAmountLabelKey);
overrideSettings.Add(ControlLibConstants.ACTION_URL, actionUrl);
overrideSettings.Add(ControlLibConstants.OTHER_AMOUNT_POSITION, otherAmountPosition.ToString());
overrideSettings.Add(ControlLibConstants.IS_VIEW_MODE, isViewMode.ToString());
overrideSettings.Add(ControlLibConstants.VALIDATION_MESSAGE_KEY, validationMessageKey);
overrideSettings.Add(ControlLibConstants.DENOM_MODE, denomMode.ToString());
overrideSettings.Add(ControlLibConstants.UNDEFINEDROW_READONLY_COLUMNS, undefinedRowReadonlyColumns);
overrideSettings.Add(ControlLibConstants.UNDEFINEDROW_EDITABLE_COLUMNS, undefinedRowEditableColumns);
overrideSettings.Add(ControlLibConstants.MOVEMENT_INDICATOR_COLUMN, movementIndicatorColumn);
overrideSettings.Add(ControlLibConstants.MOVEMENT_INDICATOR_REQUIRED, movementIndicatorRequired.ToString());
SetStyleSettings(style, overrideSettings);
return overrideSettings;
}
示例2: DockItemToolbar
internal DockItemToolbar (DockItem parentItem, PositionType position)
{
this.parentItem = parentItem;
frame = new CustomFrame ();
switch (position) {
case PositionType.Top:
frame.SetMargins (0, 0, 1, 1);
frame.SetPadding (0, 2, 2, 0);
break;
case PositionType.Bottom:
frame.SetMargins (0, 1, 1, 1);
frame.SetPadding (2, 2, 2, 0);
break;
case PositionType.Left:
frame.SetMargins (0, 1, 1, 0);
frame.SetPadding (0, 0, 2, 2);
break;
case PositionType.Right:
frame.SetMargins (0, 1, 0, 1);
frame.SetPadding (0, 0, 2, 2);
break;
}
this.position = position;
if (position == PositionType.Top || position == PositionType.Bottom)
box = new HBox (false, 3);
else
box = new VBox (false, 3);
box.Show ();
frame.Add (box);
frame.GradientBackround = true;
}
示例3: Helper
public Helper(StateSystem statesystem, String label, TextSection textsection)
: base(statesystem, label, textsection)
{
m_helpertype = textsection.GetAttribute<HelperType>("helpertype", HelperType.Normal);
m_name = textsection.GetAttribute<String>("name", null);
m_id = textsection.GetAttribute<Evaluation.Expression>("id", null);
m_position = textsection.GetAttribute<Evaluation.Expression>("pos", null);
m_postype = textsection.GetAttribute<PositionType>("postype", PositionType.P1);
m_facing = textsection.GetAttribute<Evaluation.Expression>("facing", null);
m_statenumber = textsection.GetAttribute<Evaluation.Expression>("stateno", null);
m_keyctrl = textsection.GetAttribute<Evaluation.Expression>("keyctrl", null);
m_ownpal = textsection.GetAttribute<Evaluation.Expression>("ownpal", null);
m_supermovetime = textsection.GetAttribute<Evaluation.Expression>("SuperMoveTime", null);
m_pausemovetime = textsection.GetAttribute<Evaluation.Expression>("PauseMoveTime", null);
m_xscale = textsection.GetAttribute<Evaluation.Expression>("size.xscale", null);
m_yscale = textsection.GetAttribute<Evaluation.Expression>("size.yscale", null);
m_groundback = textsection.GetAttribute<Evaluation.Expression>("size.ground.back", null);
m_groundfront = textsection.GetAttribute<Evaluation.Expression>("size.ground.front", null);
m_airback = textsection.GetAttribute<Evaluation.Expression>("size.air.back", null);
m_airfront = textsection.GetAttribute<Evaluation.Expression>("size.air.front", null);
m_height = textsection.GetAttribute<Evaluation.Expression>("size.height", null);
m_projectscaling = textsection.GetAttribute<Evaluation.Expression>("size.proj.doscale", null);
m_headpos = textsection.GetAttribute<Evaluation.Expression>("size.head.pos", null);
m_midpos = textsection.GetAttribute<Evaluation.Expression>("size.mid.pos", null);
m_shadowoffset = textsection.GetAttribute<Evaluation.Expression>("size.shadowoffset", null);
}
示例4: Explod
public Explod(StateSystem statesystem, String label, TextSection textsection)
: base(statesystem, label, textsection)
{
m_animationnumber = textsection.GetAttribute<Evaluation.PrefixedExpression>("anim", null);
m_id = textsection.GetAttribute<Evaluation.Expression>("id", null);
m_position = textsection.GetAttribute<Evaluation.Expression>("pos", null);
m_postype = textsection.GetAttribute<PositionType>("postype", PositionType.P1);
m_facing = textsection.GetAttribute<Evaluation.Expression>("facing", null);
m_verticalfacing = textsection.GetAttribute<Evaluation.Expression>("vfacing", null);
m_bindtime = textsection.GetAttribute<Evaluation.Expression>("BindTime", null);
Evaluation.Expression exp_vel = textsection.GetAttribute<Evaluation.Expression>("vel", null);
Evaluation.Expression exp_velocity = textsection.GetAttribute<Evaluation.Expression>("velocity", null);
m_velocity = exp_vel ?? exp_velocity;
m_acceleration = textsection.GetAttribute<Evaluation.Expression>("accel", null);
m_randomdisplacement = textsection.GetAttribute<Evaluation.Expression>("random", null);
m_removetime = textsection.GetAttribute<Evaluation.Expression>("removetime", null);
m_supermove = textsection.GetAttribute<Evaluation.Expression>("supermove", null);
m_supermovetime = textsection.GetAttribute<Evaluation.Expression>("supermovetime", null);
m_pausemovetime = textsection.GetAttribute<Evaluation.Expression>("pausemovetime", null);
m_scale = textsection.GetAttribute<Evaluation.Expression>("scale", null);
m_spritepriority = textsection.GetAttribute<Evaluation.Expression>("sprpriority", null);
m_drawontop = textsection.GetAttribute<Evaluation.Expression>("ontop", null);
m_shadow = textsection.GetAttribute<Evaluation.Expression>("shadow", null);
m_ownpalette = textsection.GetAttribute<Evaluation.Expression>("ownpal", null);
m_removeongethit = textsection.GetAttribute<Evaluation.Expression>("removeongethit", null);
m_explodignorehitpause = textsection.GetAttribute<Evaluation.Expression>("ignorehitpause", null);
m_blending = textsection.GetAttribute<Blending>("trans", new Blending());
m_alpha = textsection.GetAttribute<Evaluation.Expression>("alpha", null);
}
示例5: GetPosition
private Vector3 GetPosition(PositionType positionType)
{
Vector3 position = new Vector3();
switch (positionType)
{
case PositionType.ScreenRandom:
//position = GetRandomPosition();
break;
case PositionType.LeftWall:
break;
case PositionType.RightWall:
break;
case PositionType.TopWall:
break;
case PositionType.BottomWall:
break;
case PositionType.RandomWall:
break;
default:
Debug.Log("삐이");
break;
}
return position;
}
示例6: ToRectangle
public static RectCollider ToRectangle(
Vector2 position, double width, double height, PositionType positionType)
{
var x = position.X;
var y = position.Y;
switch (positionType)
{
case PositionType.TopLeft:
return new RectCollider(x, y, width, height);
case PositionType.TopRight:
return new RectCollider(x - width, y, width, height);
case PositionType.BottomLeft:
return new RectCollider(x, y - height, width, height);
case PositionType.BottomRight:
return new RectCollider(x - width, y - height, width, height);
case PositionType.Center:
return new RectCollider(x - width / 2f, y - height / 2f, width, height);
case PositionType.TopCenter:
return new RectCollider(x - width / 2f, y, width, height);
case PositionType.BottomCenter:
return new RectCollider(x - width / 2f, y - height, width, height);
case PositionType.LeftCenter:
return new RectCollider(x, y - height / 2f, width, height);
case PositionType.RightCenter:
return new RectCollider(x + width, y - height / 2f, width, height);
default:
throw new ArgumentException("Invalid PositionType supplied.");
}
}
示例7: StaticPositionSize
public StaticPositionSize(decimal maximumCost, bool riskIsPercent, decimal riskAmount, decimal buySellPrice, PositionType positionType)
{
_maximumCost = maximumCost;
_riskIsPercent = riskIsPercent;
_riskAmount = riskAmount;
_buySellPrice = buySellPrice;
_positionType = positionType;
}
示例8: Initialize
//used for testing purposes, Creates crew to fill it on initialization
public override void Initialize()
{
positionarray = new PositionType[] { PositionType.Pilot, PositionType.Engineer};
base.Initialize ();
foreach (CrewSlot c in crewslots) {
c.BoardAndOverwrite (new Crew (this.transform.root.GetComponentInChildren<Mothership>().gameObject, position : c.assignedposition)); //assuming this is on a player ship in the units section...
}
}
示例9: GetPositionList
public PositionScript[] GetPositionList(PositionType type)
{
if(positionListDic.ContainsKey(type))
{
return positionListDic[type];
}
return null;
}
示例10: Opposite
/// <summary>
/// Returns Positions.Left if the position is Positions.Right,
/// Positions.Right if the position is Left, or the position
/// otherwise.
/// </summary>
/// <param name="position"></param>
public static PositionType Opposite(PositionType position)
{
if (position == PositionType.Left)
return PositionType.Right;
if (position == PositionType.Right)
return PositionType.Left;
return position;
}
示例11: InitValues
protected override void InitValues()
{
enemyName = "EnemyM001";
int posChoice = MZMath.RandomFromRange( 0, 2 );
_innerPositionType = ( posChoice == 0 )? PositionType.Mid : ( posChoice == 1 )? PositionType.Right : PositionType.Left;
_showTime = 0.5f;
}
示例12: PositionRecord
public PositionRecord(DateTime startTradeTime, Currency currencyToTrade, Currency baseCurrency, PositionType type, PositionRuntime positionRuntime)
{
_currencyInPosition = currencyToTrade;
_startTime = startTradeTime;
_baseCurrency = baseCurrency;
_type = type;
_positionRuntime = positionRuntime;
}
示例13: GamePattern
public GamePattern(Data dataToMeasure, float radius, PositionType startPos, PositionType endPos, float time)
{
DataToMeasure = new List<Data>();
DataToMeasure.Add(dataToMeasure);
Radius = radius;
//StartPos = startPos;
//EndPos = endPos;
Time = time;
}
示例14: OneLineBanter
public OneLineBanter(string content, PositionType position = PositionType.None, PersonalityType personality = PersonalityType.None, int lowPersonality = 0, int highPersonality = 100, bool onAir = true)
{
line = content;
crewPosition = position;
personalityType = personality;
minPersonality = lowPersonality;
maxPersonality = highPersonality;
radioBroadcast = onAir;
}
示例15: InitPositionList
private void InitPositionList(PositionType type)
{
Transform posRoot = transform.FindChild(string.Format(POSITION_ROOT_NAME, type));
if (posRoot != null)
{
PositionScript[] positionArray = posRoot.GetComponentsInChildren<PositionScript>();
positionListDic[type] = positionArray;
}
}