本文整理汇总了C#中LayoutOrientation类的典型用法代码示例。如果您正苦于以下问题:C# LayoutOrientation类的具体用法?C# LayoutOrientation怎么用?C# LayoutOrientation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LayoutOrientation类属于命名空间,在下文中一共展示了LayoutOrientation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeWidget
private void InitializeWidget(LayoutOrientation orientation)
{
TitleImage = new ImageBox();
TitleImage.Name = "TitleImage";
TouchToStartText = new Label();
TouchToStartText.Name = "TouchToStartText";
// TitleImage
TitleImage.Image = new ImageAsset("/Application/assets/images/UI/header.png");
TitleImage.ImageScaleType = ImageScaleType.Center;
// TouchToStartText
TouchToStartText.TextColor = new UIColor(255f / 255f, 255f / 255f, 255f / 255f, 255f / 255f);
TouchToStartText.Font = new UIFont(FontAlias.System, 25, FontStyle.Regular);
TouchToStartText.LineBreak = LineBreak.Character;
TouchToStartText.HorizontalAlignment = HorizontalAlignment.Center;
// TitleScene
this.RootWidget.AddChildLast(TitleImage);
this.RootWidget.AddChildLast(TouchToStartText);
this.Showing += new EventHandler(onShowing);
this.Shown += new EventHandler(onShown);
SetWidgetLayout(orientation);
UpdateLanguage();
}
示例2: InitializeWidget
private void InitializeWidget(LayoutOrientation orientation)
{
Button_1 = new Button();
Button_1.Name = "Button_1";
Label_1 = new Label();
Label_1.Name = "Label_1";
// Button_1
Button_1.TextColor = new UIColor(0f / 255f, 0f / 255f, 0f / 255f, 255f / 255f);
Button_1.TextFont = new UIFont(FontAlias.System, 25, FontStyle.Regular);
// Label_1
Label_1.TextColor = new UIColor(0f / 255f, 0f / 255f, 0f / 255f, 255f / 255f);
Label_1.Font = new UIFont(FontAlias.System, 38, FontStyle.Regular);
Label_1.LineBreak = LineBreak.Character;
Label_1.HorizontalAlignment = HorizontalAlignment.Center;
// MainScene
this.RootWidget.AddChildLast(Button_1);
this.RootWidget.AddChildLast(Label_1);
SetWidgetLayout(orientation);
UpdateLanguage();
}
示例3: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(36, 214);
this.Anchors = Anchors.None;
ScoreText.SetPosition(382, 71);
ScoreText.SetSize(214, 36);
ScoreText.Anchors = Anchors.None;
ScoreText.Visible = true;
break;
default:
this.SetSize(214, 36);
this.Anchors = Anchors.None;
ScoreText.SetPosition(0, 0);
ScoreText.SetSize(214, 36);
ScoreText.Anchors = Anchors.None;
ScoreText.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例4: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetPosition(0, 0);
this.SetSize(544, 960);
this.Anchors = Anchors.None;
playerHp.SetPosition(48, 512);
playerHp.SetSize(362, 16);
playerHp.Anchors = Anchors.Height;
playerHp.Visible = true;
Label_1.SetPosition(0, 508);
Label_1.SetSize(214, 36);
Label_1.Anchors = Anchors.None;
Label_1.Visible = true;
Label_2.SetPosition(0, 0);
Label_2.SetSize(214, 36);
Label_2.Anchors = Anchors.None;
Label_2.Visible = true;
enemyHp.SetPosition(199, 0);
enemyHp.SetSize(362, 16);
enemyHp.Anchors = Anchors.Height;
enemyHp.Visible = true;
break;
default:
this.SetPosition(0, 0);
this.SetSize(960, 544);
this.Anchors = Anchors.None;
playerHp.SetPosition(88, 516);
playerHp.SetSize(200, 16);
playerHp.Anchors = Anchors.Height;
playerHp.Visible = true;
Label_1.SetPosition(0, 505);
Label_1.SetSize(88, 38);
Label_1.Anchors = Anchors.None;
Label_1.Visible = true;
Label_2.SetPosition(0, 0);
Label_2.SetSize(88, 36);
Label_2.Anchors = Anchors.None;
Label_2.Visible = true;
enemyHp.SetPosition(88, 10);
enemyHp.SetSize(850, 16);
enemyHp.Anchors = Anchors.Height;
enemyHp.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例5: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(50, 200);
this.Anchors = Anchors.None;
Label_Story.SetPosition(-86, 0);
Label_Story.SetSize(100, 36);
Label_Story.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
Label_Story.Visible = true;
break;
default:
this.SetSize(200, 50);
this.Anchors = Anchors.None;
Label_Story.SetPosition(8, 7);
Label_Story.SetSize(200, 35);
Label_Story.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
Label_Story.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例6: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(100, 100);
this.Anchors = Anchors.None;
Button_1.SetPosition(-68, 21);
Button_1.SetSize(214, 56);
Button_1.Anchors = Anchors.None;
Button_1.Visible = true;
break;
default:
this.SetSize(100, 100);
this.Anchors = Anchors.None;
Button_1.SetPosition(12, 6);
Button_1.SetSize(76, 88);
Button_1.Anchors = Anchors.Top;
Button_1.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例7: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(544, 960);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(364, 123);
ImageBox_1.SetSize(200, 200);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
default:
this.SetSize(925, 511);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(19, 12);
ImageBox_1.SetSize(886, 486);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例8: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(544, 960);
this.Anchors = Anchors.None;
Label_1.SetPosition(0, 0);
Label_1.SetSize(214, 36);
Label_1.Anchors = Anchors.None;
Label_1.Visible = true;
break;
default:
this.SetSize(530, 426);
this.Anchors = Anchors.None;
Label_1.SetPosition(0, 0);
Label_1.SetSize(214, 36);
Label_1.Anchors = Anchors.None;
Label_1.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例9: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(544, 960);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(385, 176);
ImageBox_1.SetSize(200, 200);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
default:
this.SetSize(924, 511);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(105, -41);
ImageBox_1.SetSize(713, 594);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例10: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(544, 960);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(380, 110);
ImageBox_1.SetSize(200, 200);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
default:
this.SetSize(960, 544);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(-28, -235);
ImageBox_1.SetSize(1017, 849);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例11: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(544, 960);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(491, 125);
ImageBox_1.SetSize(200, 200);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
default:
this.SetSize(924, 511);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(163, -83);
ImageBox_1.SetSize(597, 678);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例12: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetSize(544, 960);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(263, 94);
ImageBox_1.SetSize(200, 200);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
default:
this.SetSize(960, 544);
this.Anchors = Anchors.None;
ImageBox_1.SetPosition(25, -182);
ImageBox_1.SetSize(909, 909);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例13: SetWidgetLayout
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.SetPosition(0, 0);
this.SetSize(300, 500);
this.Anchors = Anchors.None;
download_url.SetPosition(583, 19);
download_url.SetSize(360, 56);
download_url.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
download_url.Visible = true;
DownloadBtn.SetPosition(690, 16);
DownloadBtn.SetSize(214, 56);
DownloadBtn.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
DownloadBtn.Visible = true;
EditableText_1.SetPosition(-99, 108);
EditableText_1.SetSize(360, 56);
EditableText_1.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
EditableText_1.Visible = true;
EditableText_2.SetPosition(118, 124);
EditableText_2.SetSize(360, 56);
EditableText_2.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
EditableText_2.Visible = true;
break;
default:
this.SetPosition(0, 0);
this.SetSize(500, 300);
this.Anchors = Anchors.None;
download_url.SetPosition(49, 30);
download_url.SetSize(419, 56);
download_url.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
download_url.Visible = true;
DownloadBtn.SetPosition(190, 216);
DownloadBtn.SetSize(126, 56);
DownloadBtn.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
DownloadBtn.Visible = true;
EditableText_1.SetPosition(49, 124);
EditableText_1.SetSize(188, 56);
EditableText_1.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
EditableText_1.Visible = true;
EditableText_2.SetPosition(287, 124);
EditableText_2.SetSize(181, 56);
EditableText_2.Anchors = Anchors.Top | Anchors.Height | Anchors.Left | Anchors.Width;
EditableText_2.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
示例14: InitializeWidget
private void InitializeWidget(LayoutOrientation orientation)
{
Button_1 = new Button();
Button_1.Name = "Button_1";
Label_1 = new Label();
Label_1.Name = "Label_1";
// Button_1
Button_1.TextColor = new UIColor(255f / 255f, 255f / 255f, 255f / 255f, 255f / 255f);
Button_1.TextFont = new UIFont(FontAlias.System, 25, FontStyle.Regular);
// Label_1
Label_1.TextColor = new UIColor(255f / 255f, 255f / 255f, 255f / 255f, 255f / 255f);
Label_1.Font = new UIFont(FontAlias.System, 25, FontStyle.Regular);
Label_1.LineBreak = LineBreak.Character;
Label_1.HorizontalAlignment = HorizontalAlignment.Center;
// ErrorDialog
this.AddChildLast(Button_1);
this.AddChildLast(Label_1);
this.ShowEffect = new BunjeeJumpEffect()
{
};
this.HideEffect = new TiltDropEffect();
SetWidgetLayout(orientation);
UpdateLanguage();
}
示例15: InitializeWidget
private void InitializeWidget(LayoutOrientation orientation)
{
sceneBackgroundPanel = new Panel();
sceneBackgroundPanel.Name = "sceneBackgroundPanel";
PagePanel_1 = new PagePanel();
PagePanel_1.Name = "PagePanel_1";
// sceneBackgroundPanel
sceneBackgroundPanel.BackgroundColor = new UIColor(0f / 255f, 0f / 255f, 0f / 255f, 255f / 255f);
// PagePanel_1
PagePanel_1.AddPage(new InstructionsPanel());
PagePanel_1.AddPage(new Instructions2());
PagePanel_1.AddPage(new Insructions3());
PagePanel_1.AddPage(new Instructions4());
PagePanel_1.AddPage(new instruction5Panel());
PagePanel_1.AddPage(new Instructions6Panel());
PagePanel_1.AddPage(new Instructions8Panel());
PagePanel_1.AddPage(new Instructions7Panel());
// InstructionsScene
this.RootWidget.AddChildLast(sceneBackgroundPanel);
this.RootWidget.AddChildLast(PagePanel_1);
SetWidgetLayout(orientation);
UpdateLanguage();
}