本文整理汇总了C#中PageType类的典型用法代码示例。如果您正苦于以下问题:C# PageType类的具体用法?C# PageType怎么用?C# PageType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PageType类属于命名空间,在下文中一共展示了PageType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 ();
}
}
开发者ID:riktothepast,项目名称:LD30,代码行数:34,代码来源:Game.cs
示例2: PageContent
public PageContent(int id, string content, string laguage, PageType pageType)
{
Id = id;
Content = content;
Language = laguage;
PageType = pageType;
}
开发者ID:EventPromo,项目名称:WeddingAgency,代码行数:7,代码来源:PageContent.cs
示例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();
}
}
}
开发者ID:nordseth,项目名称:ComposerBuilder,代码行数:35,代码来源:PageTypeHelper.cs
示例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;
}
}
}
开发者ID:meekr,项目名称:Haima,代码行数:36,代码来源:InteractImagePage.cs
示例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;
}
开发者ID:populvuh,项目名称:StateMachine,代码行数:8,代码来源:Node.cs
示例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();
}
开发者ID:remy22,项目名称:Game-Design-Class,代码行数:32,代码来源:ImmunityMenu.cs
示例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;
}
开发者ID:populvuh,项目名称:StateMachine,代码行数:30,代码来源:PageFactory.cs
示例8: GetPageTypeName
public static string GetPageTypeName( PageType type )
{
if( type == PageType.GeneralQuestion )
return "General Question";
return type.ToString();
}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:7,代码来源:PageQueue.cs
示例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();
}
}
开发者ID:tanis2000,项目名称:Futile,代码行数:28,代码来源:Main.cs
示例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();
}
}
开发者ID:riktothepast,项目名称:LD29,代码行数:29,代码来源:Game.cs
示例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);
}
开发者ID:PublicHealthEngland,项目名称:fingertips-open,代码行数:33,代码来源:SingleProfileWithFrontPageController.cs
示例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();
}
}
开发者ID:jrendel,项目名称:LD27,代码行数:34,代码来源:Main.cs
示例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();
}
}
}
开发者ID:jarlef,项目名称:ComposerBuilder,代码行数:33,代码来源:PageTypeHelper.cs
示例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();
}
}
开发者ID:riktothepast,项目名称:SuperFutileBox,代码行数:31,代码来源:SuperFutileBox.cs
示例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 );
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:26,代码来源:Harassment.cs
示例16: PageEntry
public PageEntry( Mobile sender, string message, PageType type )
{
m_Sender = sender;
m_Sent = DateTime.Now;
m_Message = Utility.FixHtml( message );
m_Type = type;
m_PageLocation = sender.Location;
m_PageMap = sender.Map;
PlayerMobile pm = sender as PlayerMobile;
if ( pm != null && pm.SpeechLog != null && Array.IndexOf( SpeechLogAttachment, type ) >= 0 )
m_SpeechLog = new List<SpeechLogEntry>( pm.SpeechLog );
m_Timer = new InternalTimer( this );
m_Timer.Start();
StaffHistory history = Reports.Reports.StaffHistory;
if ( history != null )
{
m_PageInfo = new PageInfo( this );
history.AddPage( m_PageInfo );
}
}
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:25,代码来源:PageQueue.cs
示例17: GoToPage
public void GoToPage(PageType pageType)
{
if(_currentPageType == pageType) return; //we're already on the same page, so don't bother doing anything
AbstractPage pageToCreate = null;
switch (pageType) {
case PageType.BitmaskPuzzleShapesGame:
pageToCreate = new BitmaskPuzzleGame();
break;
}
if(pageToCreate != null) //destroy the old page and create a new one
{
_currentPageType = pageType;
if(_currentPage != null)
{
_currentPage.Destroy();
Futile.stage.RemoveChild(_currentPage);
}
_currentPage = pageToCreate;
Futile.stage.AddChild(_currentPage);
_currentPage.Start();
}
}
开发者ID:soshimozi,项目名称:Match-Puzzle-Shapes-Using-Bitmasks,代码行数:27,代码来源:Main.cs
示例18: AddExtensionPageProperty
public static void AddExtensionPageProperty(PageType pageType)
{
if (pageType.Definitions.Find(def => def.Name == "ExtensionPageProperty") == null)
{
if (pageType.Definitions.Find(def => def.Name == "ExtensionPageProperty") == null)
{
var item = new PageDefinition();
item.PageTypeID = pageType.ID;
item.Name = "ExtensionPageProperty";
item.EditCaption = "ExtensionPageProperty";
item.HelpText = "Specialized For Extension Added By Extension (Do not remove)";
item.DefaultValueType = DefaultValueType.None;
item.DefaultValue = "";
item.Type = PageTypeManager.ExtensionPageDefinitionType;
item.ID = 0;
item.Searchable = true;
item.Tab = PageTypeManager.LoadExtensionTab();
item.DisplayEditUI = true;
item.LanguageSpecific = true;
item.LongStringSettings = 0;
item.Save();
item.ClearCache();
pageType.Definitions.Add(item);
}
}
PageDefinitionType.ClearCache();
}
开发者ID:nordseth,项目名称:ComposerBuilder,代码行数:28,代码来源:PageTypeHelper.cs
示例19: WebCrawler
/// <summary>
/// 构造函数,设置、查询URL、查询起始页、查询范围等
/// </summary>
/// <param name="user">被爬取微博的用户</param>
/// <param name="type">要爬取的页面类型</param>
/// <param name="startPage">爬取起始页</param>
/// <param name="queryRange">爬取范围</param>
public WebCrawler(User user, PageType type, int startPage, int queryRange)
{
this.Name = "Web";
this.Type = type;
this.startPage = startPage;
this.queryRange = queryRange;
this.user = user;
}
开发者ID:CaseyYang,项目名称:WebProjects,代码行数:15,代码来源:WebCrawler.cs
示例20: ControlView_Instance_changePage
void ControlView_Instance_changePage (PageType page)
{
if (page == PageType.MAIN) {
this.scrollView.enabled = true;
} else {
this.scrollView.enabled = false;
}
}
开发者ID:imlovee,项目名称:WatchRemember_Final,代码行数:8,代码来源:ControlListScroll.cs
注:本文中的PageType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论