本文整理汇总了C#中PageType类的典型用法代码示例。如果您正苦于以下问题:C# PageType类的具体用法?C# PageType怎么用?C# PageType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PageType类属于命名空间,在下文中一共展示了PageType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GoToPage
public void GoToPage(PageType pageType)
{
if (_currentPageType == pageType)
return;
Page pageToCreate = null;
if (pageType == PageType.MenuPage)
{
pageToCreate = new MainMenuPage();
}
if (pageType == PageType.GamePage)
{
pageToCreate = new GamePage ();
}
if (pageType == PageType.FinalPage)
{
pageToCreate = new FinalPage ();
}
if (pageToCreate != null) {
_currentPageType = pageType;
if (_currentPage != null) {
_stage.RemoveAllChildren();
}
_currentPage = pageToCreate;
_stage.AddChild (_currentPage);
_currentPage.Start ();
}
}
示例2: PageContent
public PageContent(int id, string content, string laguage, PageType pageType)
{
Id = id;
Content = content;
Language = laguage;
PageType = pageType;
}
示例3: AddContentAreaProperty
public static void AddContentAreaProperty(PageType pageType, string name, string description)
{
Predicate<PageDefinition> match = null;
if (pageType.Definitions.Find(def => def.Name == name) == null)
{
match = delegate(PageDefinition def)
{
return def.Name == name;
};
if (pageType.Definitions.Find(match) == null)
{
var item = new PageDefinition
{
PageTypeID = pageType.ID,
Name = name,
EditCaption = name,
HelpText = string.IsNullOrEmpty(description) ? string.Empty : description,
DefaultValueType = DefaultValueType.None,
DefaultValue = "",
Type = PageTypeManager.ContentAreaPropertyType,
ID = 0,
Searchable = true,
Tab = PageTypeManager.LoadExtensionTab(),
DisplayEditUI = false,
LanguageSpecific = false,
LongStringSettings = 0
};
item.Save();
item.ClearCache();
pageType.Definitions.Add(item);
PageDefinitionType.ClearCache();
}
}
}
示例4: InteractImagePage
// public InteractImagePage(XmlNode node)
// : this(node, null)
// {
// }
public InteractImagePage(XmlNode node, MenuElement menuElement)
{
_node = node;
_menuElement = menuElement;
buildBg();
if (node.Attributes["type"] != null){
_pageType = (PageType)Enum.Parse(typeof(PageType), node.Attributes["type"].Value);
switch (_pageType){
case PageType.Zoomable:
buildZoomable();
break;
case PageType.Gallary:
buildGallary();
break;
case PageType.GallaryHome:
break;
case PageType.Hotspot:
buildHotspot();
break;
case PageType.Playable:
buildPlayable();
break;
case PageType.Timeline:
buildTimeline();
break;
case PageType.Fadein:
buildFadein();
break;
}
}
}
示例5: Add
// create a new node, and then add it to the nextPages list
public Node Add( PageType p )
{
Node node = new Node(p);
_nextPages.Add (node);
return node;
}
示例6: GoToMenu
public void GoToMenu(PageType pageType)
{
if(currentPageType == pageType) return; // already on this menu
// Get the stage
stage_ = Futile.stage;
// Remove the current page if it exists
if(currentPage != null && stage_ != null){
stage_.RemoveChild(currentPage);
}
// Set new page and page type
switch(pageType){
case PageType.TitlePage:
currentPageType = PageType.TitlePage;
currentPage = new TitlePage();
break;
case PageType.LevelSelectPage:
currentPageType = PageType.LevelSelectPage;
currentPage = new LevelSelectPage();
break;
case PageType.CreditsPage:
currentPageType = PageType.CreditsPage;
currentPage = new CreditsPage();
break;
}
// Add the page and init it
stage_.AddChild(currentPage);
currentPage.Start();
}
示例7: CreatePage
public static StateMachinePage CreatePage(PageType pageType, NavigationPage navPage, StateMachineData stateMachineData, EventHandler HandleSequenceEnd, EventHandler HandleCancel)
{
StateMachinePage page=null;
switch (pageType) {
case PageType.ePageA:
page = new PageA (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
break;
case PageType.ePageB:
page = new PageB (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
break;
case PageType.ePageC:
page = new PageC (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
break;
case PageType.ePageD:
page = new PageD (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
break;
case PageType.ePageE:
page = new PageE (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
break;
case PageType.ePageF:
page = new PageF (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
break;
case PageType.eInvalid:
default:
System.Diagnostics.Debug.WriteLine ("PageFactory.CreatePage() - Error: invalid page type - {0} ", pageType);
break;
}
return page;
}
示例8: GetPageTypeName
public static string GetPageTypeName( PageType type )
{
if( type == PageType.GeneralQuestion )
return "General Question";
return type.ToString();
}
示例9: GoToPage
public void GoToPage(PageType pageType,bool force)
{
if(_currentPageType == pageType) if (!force) return; //we're already on the same page, so don't bother doing anything
Page pageToCreate = null;
Debug.Log(pageType.ToString());
Type type = Type.GetType(pageType.ToString());
object o=Activator.CreateInstance(type);
pageToCreate = (Page)o;
//pageToCreate = (TPage)(System.Reflection.Assembly.GetExecutingAssembly().CreateInstance(pageType.ToString()));
if(pageToCreate != null) //destroy the old page and create a new one
{
_currentPageType = pageType;
if(_currentPage != null)
{
_stage.RemoveChild(_currentPage);
}
_currentPage = pageToCreate;
_stage.AddChild(_currentPage);
_currentPage.Start();
}
}
示例10: GoToPage
public void GoToPage(PageType pageType)
{
Page pageToCreate = null;
if(pageType == PageType.MainMenuPage)
{
pageToCreate = new MainMenuPage();
}
if(pageType == PageType.InGamePage)
{
pageToCreate = new InGamePage();
}
if(pageToCreate != null)
{
_currentPageType = pageType;
if(_currentPage != null)
{
_stage.RemoveChild(_currentPage);
}
_currentPage = pageToCreate;
_stage.AddChild(_currentPage);
_currentPage.Start();
}
}
示例11: GetPage
private ActionResult GetPage(string viewName, string viewFolder, string urlKey,
PageType pageType)
{
InitPageModel();
profileDetails = new ProfileDetailsBuilder(urlKey).Build();
if (profileDetails == null)
{
ErrorController.InvokeHttp404(HttpContext);
return new EmptyResult();
}
if (AccessControlHelper.ShouldDenyAccess(profileDetails))
{
return AccessControlHelper.GetAccessNotAllowedActionResult();
}
PageModel.PageTitle = profileDetails.Title;
ConfigureWithProfile(profileDetails);
if (PageModel.HasExclusiveSkin == false)
{
PageModel.Skin.PartialViewFolder = viewFolder;
}
PageModel.PageType = pageType;
PageModel.DisplayProfileTitle = true;
return View(PageModel.GetSkinView(viewName), PageModel);
}
示例12: GoToPage
public void GoToPage(PageType pageType)
{
if(_currentPageType == pageType) return; //we're already on the same page, so don't bother doing anything
BasePage pageToCreate = null;
if(pageType == PageType.TitlePage)
{
pageToCreate = new TitlePage();
}
if(pageType == PageType.InGamePage)
{
pageToCreate = new InGamePage();
}
else if (pageType == PageType.ScorePage)
{
pageToCreate = new ScorePage();
}
if(pageToCreate != null) //destroy the old page and create a new one
{
_currentPageType = pageType;
if(_currentPage != null)
{
_currentPage.Destroy();
_stage.RemoveChild(_currentPage);
}
_currentPage = pageToCreate;
_stage.AddChild(_currentPage);
_currentPage.Start();
}
}
示例13: AddContentAreaProperty
public static void AddContentAreaProperty(PageType pageType, string name, string description)
{
Predicate<PageDefinition> match = null;
if (pageType.Definitions.Find(def => def.Name == name) == null)
{
match = delegate(PageDefinition def)
{
return def.Name == name;
};
if (pageType.Definitions.Find(match) == null)
{
var item = new PageDefinition();
item.PageTypeID = pageType.ID;
item.Name = name;
item.EditCaption = name;
item.HelpText = description;
item.DefaultValueType = DefaultValueType.None;
item.DefaultValue = "";
item.Type = PageTypeManager.ContentAreaPropertyType;
item.ID = 0;
item.Searchable = true;
item.Tab = PageTypeManager.LoadExtensionTab();
item.DisplayEditUI = false;
item.LanguageSpecific = false;
item.LongStringSettings = 0;
item.Save();
item.ClearCache();
pageType.Definitions.Add(item);
PageDefinitionType.ClearCache();
}
}
}
示例14: GoToPage
public void GoToPage(PageType pageType)
{
RXDebug.Log("Here i am changing the page");
if(_currentPageType == pageType) return;
Page pageToCreate = null;
if(pageType == PageType.MenuPage)
{
pageToCreate = new MenuPage();
}
if(pageType == PageType.InGamePage)
{
pageToCreate = new InGamePage();
}
if(pageToCreate != null)
{
_currentPageType = pageType;
if(_currentPage != null)
{
_stage.RemoveChild(_currentPage);
}
_currentPage = pageToCreate;
_stage.AddChild(_currentPage);
_currentPage.Start();
}
}
示例15: SelectComplaintTargetsGump
public SelectComplaintTargetsGump( string m_text, PageType type )
: base(0, 0)
{
text = m_text;
m_Type = type;
AddBackground( 50, 50, 400, 400, 0xA28 );
AddPage( 0 );
AddHtmlLocalized( 165, 70, 200, 20, 1070961, false, false ); // Select Complaint Targets
AddHtmlLocalized( 75, 95, 350, 145, 1074790, false, false ); // You may select up to three players as the targets of this complaint. Please select one of the options below to select the players by either targeting them, typing their names or selecting their names from a list. Since their may be several players with the same name, targeting the players is the most accurate way to identify the players.
AddHtmlLocalized( 110, 240, 350, 145, 1074789, false, false ); // Target Involved Players
AddButton( 80, 240, 0xD0, 0xD1, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 110, 270, 350, 145, 1074785, false, false ); // Type Names of Involved Players
AddButton( 80, 270, 0xD0, 0xD1, 2, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 110, 300, 350, 145, 1074786, false, false ); // Select Names of Involved Players From List
AddButton( 80, 300, 0xD0, 0xD1, 3, GumpButtonType.Reply, 0 );
AddButton( 320, 360, 0x819, 0x818, 0, GumpButtonType.Reply, 0 );
}