本文整理汇总了C#中Page类的典型用法代码示例。如果您正苦于以下问题:C# Page类的具体用法?C# Page怎么用?C# Page使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Page类属于命名空间,在下文中一共展示了Page类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetInfoList
public Page<CaptainInfo> GetInfoList(string creator ,string subject, int pageNum)
{
ICriteria criteria = this.ICaptainInfoManage.NativeHibernateSession.CreateCriteria(typeof(CaptainInfo));
Page<CaptainInfo> InfoPage = new Page<CaptainInfo>
{
CurrentPageIndex = pageNum
};
try
{
if ( creator.Trim() != "")
{
criteria.Add(Restrictions.Like("Creator", "%" + creator + "%"));
}
if (subject.Trim() != "")
{
criteria.Add(Restrictions.Like("Subject", "%" + subject + "%"));
}
criteria.AddOrder(new Order("CreateTime", false));
InfoPage.TotalCount = criteria.SetResultTransformer(CriteriaUtil.DistinctRootEntity).List<CaptainInfo>().Count;
InfoPage.Data = criteria.SetResultTransformer(CriteriaUtil.DistinctRootEntity).SetFirstResult((InfoPage.CurrentPageIndex - 1) * InfoPage.PageSize).SetMaxResults(InfoPage.PageSize).List<CaptainInfo>();
}
catch (Exception)
{
InfoPage = null;
}
return InfoPage;
}
开发者ID:dalinhuang,项目名称:captainclub,代码行数:31,代码来源:InfoManageBLL.cs
示例2: OnHide
public void OnHide(Page page)
{
var sb = FindResource("OnHide") as Storyboard;
if (page != null)
sb.Completed += (sender, args) => page.Visibility = Visibility.Collapsed;
sb.Begin();
}
开发者ID:Colliotv,项目名称:WMediaPlayer,代码行数:7,代码来源:Page.xaml.cs
示例3: Initialize
public override void Initialize()
{
base.Initialize();
new AssetCollector(this);
GetService<AssetCollector>().LoadXML(@"Content/AsteroidsGame/assets.xml");
//Change bgcolor to black
EntityGame.BackgroundColor = Color.Black;
EntityGame.DebugInfo.Color = Color.White;
_player = new PlayerShip(this, "PlayerShip");
//SpawnAsteroids(5);
//TEST ASTEROIDS
var a = new Asteroid(this, "Asteroid1");
a.Body.Position = new Vector2(300, 100);
a.Physics.AddForce(-a.Physics.Force);
var b = new Asteroid(this, "Asteroid2");
b.Body.Position = new Vector2(100, 100);
b.Physics.AddForce(-b.Physics.Force);
b.Physics.AddForce(30, 0);
Page p = new Page(this, "Page");
p.Show();
_statusLabel = new Label(p, "StatusLabel", new Point(0, 0));
_statusLabel.Color = Color.White;
_statusLabel.Visible = false;
}
开发者ID:redcodefinal,项目名称:EntityEngineV4TestBed,代码行数:30,代码来源:AsteroidsGame.cs
示例4: Close
public static void Close(Page page, object result)
{
page.Response.Clear();
page.Response.ContentType = "text/html";
page.Response.Buffer = true;
StringBuilder sb = new StringBuilder();
sb.Append("<html>");
sb.Append("<head>");
sb.Append("<script type='text/javascript'>");
sb.Append("if (parent && parent.DayPilot && parent.DayPilot.ModalStatic) {");
sb.Append("parent.DayPilot.ModalStatic.result(" +
DayPilot.Web.Ui.Json.SimpleJsonSerializer.Serialize(result) + ");");
sb.Append("if (parent.DayPilot.ModalStatic.hide) parent.DayPilot.ModalStatic.hide();");
sb.Append("}");
sb.Append("</script>");
sb.Append("</head>");
sb.Append("</html>");
string output = sb.ToString();
byte[] s = Encoding.UTF8.GetBytes(output);
page.Response.AddHeader("Content-Length", s.Length.ToString());
page.Response.Write(output);
page.Response.Flush();
page.Response.Close();
}
开发者ID:johncada27,项目名称:Cloud-Nine,代码行数:29,代码来源:Modal.cs
示例5: Difference
public Difference(string value, Page parent)
{
SelectedValue = "";
_value = value;
_parent = parent;
_ignoreSelectedCommand = new RelayCommand(param => AddIgnoreSelected(), emnu => SelectedValue != "" );
}
开发者ID:Jalliz,项目名称:UrlChangeAlert,代码行数:7,代码来源:Difference.cs
示例6: GetPage
public Page GetPage(int PageId)
{
Page page = new Page();
DbCommand command = DbProviderHelper.CreateCommand("SELECTPage",CommandType.StoredProcedure);
command.Parameters.Add(DbProviderHelper.CreateParameter("@PageId",DbType.Int32,PageId));
DbDataReader dataReader = DbProviderHelper.ExecuteReader(command);
while (dataReader.Read())
{
page.PageId = Convert.ToInt32(dataReader["PageId"]);
page.PageGuid = (Guid) dataReader["PageGuid"];
if(dataReader["MetaKeywords"] != DBNull.Value)
page.MetaKeywords = Convert.ToString(dataReader["MetaKeywords"]);
if(dataReader["MetaDesc"] != DBNull.Value)
page.MetaDesc = Convert.ToString(dataReader["MetaDesc"]);
page.Title = Convert.ToString(dataReader["Title"]);
if(dataReader["ContentHtml"] != DBNull.Value)
page.ContentHtml = Convert.ToString(dataReader["ContentHtml"]);
page.TemplatePath = Convert.ToString(dataReader["TemplatePath"]);
page.ReleasePath = Convert.ToString(dataReader["ReleasePath"]);
page.Hits = Convert.ToInt32(dataReader["Hits"]);
if(dataReader["DateCreated"] != DBNull.Value)
page.DateCreated = Convert.ToDateTime(dataReader["DateCreated"]);
}
dataReader.Close();
return page;
}
开发者ID:htawab,项目名称:wiscms,代码行数:30,代码来源:PageManager.cs
示例7: AddPage
public static void AddPage(TabControl tabControl, string tapName, Page page, bool maxSize = true)
{
if (maxSize)
{
page.Width = double.NaN;
page.Height = double.NaN;
page.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
page.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
}
Frame frame = new Frame();
if (maxSize)
{
frame.Width = double.NaN;
frame.Height = double.NaN;
frame.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
frame.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
}
frame.Content = page;
TabItem tabItem = new TabItem();
tabItem.Header = tapName;
tabItem.Content = frame;
tabControl.Items.Add(tabItem);
}
开发者ID:vesteksoftware,项目名称:VT8642,代码行数:25,代码来源:UIUtility.cs
示例8: 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
示例9: GetInfoList
public Page<CaptainInfo> GetInfoList(string creator, string subject, int pageNum)
{
InfoManageBLL adminBLL = new InfoManageBLL();
Page<CaptainInfo> InfoPage = new Page<CaptainInfo>();
InfoPage = adminBLL.GetInfoList(creator, subject, pageNum);
return InfoPage;
}
开发者ID:dalinhuang,项目名称:captainclub,代码行数:7,代码来源:Infolist.aspx.cs
示例10: ChangePageLayout
/// <summary>
/// Changes the page layout.
/// </summary>
/// <param name="page">The page.</param>
/// <param name="fromLayoutTemplate">From layout template.</param>
/// <param name="toLayoutTemplate">To layout template.</param>
public static void ChangePageLayout(Page page, PageLayoutTemplate fromLayoutTemplate,
PageLayoutTemplate toLayoutTemplate)
{
if (fromLayoutTemplate == null || toLayoutTemplate == null)
return;
page.PageLayout.LayoutTemplate = toLayoutTemplate;
if (fromLayoutTemplate.ColumnsNumber > toLayoutTemplate.ColumnsNumber)
{
page.Widgets.Update(
wd =>
{
wd.OrderNumber =
wd.ColumnNumber > toLayoutTemplate.ColumnsNumber
? page.Widgets.Where(w => w.ColumnNumber == toLayoutTemplate.ColumnsNumber).Count
() + 1
: wd.OrderNumber;
wd.ColumnNumber =
wd.ColumnNumber > toLayoutTemplate.ColumnsNumber
? toLayoutTemplate.ColumnsNumber
: wd.ColumnNumber;
}
);
}
var pageService = ServiceLocator.Current.GetInstance<IPageService>();
pageService.Save(page);
}
开发者ID:coreframework,项目名称:Core-Framework,代码行数:35,代码来源:LayoutHelper.cs
示例11: Page
public Page()
{
//Point
_Page = this;
InitializeComponent();
Loaded += new RoutedEventHandler(Page_Loaded);
}
开发者ID:vonhacker,项目名称:counterstrike,代码行数:7,代码来源:Page.xaml.cs
示例12: GetDemoXmlDocument
public static XmlDocument GetDemoXmlDocument(Page page) {
//if(BasePage.demoXmlDocument == null) {
BasePage.demoXmlDocument = new XmlDocument();
BasePage.demoXmlDocument.Load(page.MapPath("~/App_Data/Demos.xml"));
//}
return BasePage.demoXmlDocument;
}
开发者ID:BiYiTuan,项目名称:soa,代码行数:7,代码来源:Utils.cs
示例13: GetPageByID
/// <summary>
/// Gets the page by ID.
/// </summary>
/// <param name="pageId">The page ID.</param>
/// <returns></returns>
public static Page GetPageByID(int pageId)
{
return CacheHelper.CacheObject<Page>(delegate {
Page pageItem = new Page(pageId);
return !pageItem.IsNew ? pageItem : null;
}, MakePageItemKey(pageId), CacheLength.GetDefaultCacheTime, CacheItemPriority.BelowNormal);
}
开发者ID:montyclift,项目名称:dashcommerce-3,代码行数:12,代码来源:PageCache.cs
示例14: Awake
void Awake()
{
frontPage = Instantiate(pagePrefab);
frontPage.transform.SetParent(frontSpace, false);
backPage = Instantiate(pagePrefab);
backPage.transform.SetParent(backSpace, false);
}
开发者ID:LittleBulldozer,项目名称:regime2015,代码行数:7,代码来源:Book.cs
示例15: Handle
public void Handle(ThreadEntity CurrentThreadEntity, Page.Page CurrentPageClass)
{
_threadEntity = CurrentThreadEntity;
_threadEntity.ControlIndex += 1;
Xy.WebSetting.WebSettingItem _tempWebConfig = null;
if (_webConfig != null) {
_tempWebConfig = _threadEntity.WebSetting;
_threadEntity.WebSetting = _webConfig;
}
InitSourceHtml();
//if (_enableScript) {
// ControlCollection cc = new Control.ControlAnalyze(ref _innerHtml, _threadEntity).ControlCollection;
// cc.Handle(ref _innerHtml, ref _threadEntity);
//}
if (_enableScript) {
ControlCollection cc;
if (_threadEntity.WebSetting.DebugMode) {
cc = new Control.ControlAnalyze(_innerHtml, _threadEntity).ControlCollection;
} else {
cc = _cacheItem._controlCollection;
}
cc.Handle(_innerHtml, _threadEntity, CurrentPageClass);
}
if (_webConfig != null) {
_threadEntity.WebSetting = _tempWebConfig;
}
_threadEntity.ControlIndex -= 1;
}
开发者ID:BrookHuang,项目名称:XYFrame,代码行数:28,代码来源:IncludeControl-bak.cs
示例16: AddToCycleRetry
protected Page AddToCycleRetry(Request request, Site site)
{
Page page = new Page(request);
object cycleTriedTimesObject = request.GetExtra(Request.CycleTriedTimes);
if (cycleTriedTimesObject == null)
{
// 把自己加到目标Request中(无法控制主线程再加载此Request), 传到主线程后会把TargetRequest加到Pool中
request.Priority = 0;
page.AddTargetRequest(request.PutExtra(Request.CycleTriedTimes, 1));
}
else
{
long cycleTriedTimes = (long)cycleTriedTimesObject;
cycleTriedTimes++;
if (cycleTriedTimes >= site.CycleRetryTimes)
{
// 超过最大尝试次数, 返回空.
return null;
}
request.Priority = 0;
page.AddTargetRequest(request.PutExtra(Request.CycleTriedTimes, cycleTriedTimes));
}
page.SetNeedCycleRetry(true);
return page;
}
开发者ID:hwpayg,项目名称:DotnetSpider,代码行数:25,代码来源:BaseDownloader.cs
示例17: GetMetadataLinkTag
/// <summary>
/// Gets the metadata link tag.
/// </summary>
/// <param name="metadata">The metadata.</param>
/// <param name="metadataListPage">Metadata filtered list page, can be null.</param>
/// <returns></returns>
public static string GetMetadataLinkTag(Metadata metadata, Page metadataListPage)
{
string tag = string.Empty;
if (metadata == null)
return string.Empty;
if (metadataListPage == null)
{
metadataListPage = Litium.Plus.Utilities.PageUtilities.GetFirstPublishedPageTypeInstance("MetadataFilteredList", CurrentState.Current.WebSiteID, Litium.Foundation.GUI.FoundationContext.Current.Token);
}
string metadataTranslation = metadata.Translations.GetMetadataTranslation(CurrentState.Current.WebSite.Culture).Translation;
if (string.IsNullOrEmpty(metadataTranslation))
return string.Empty;
if (metadataListPage == null)
{
tag = "<span class=\"metadataSpanTag\">" + metadataTranslation + "</span>";
}
else
{
string linkTag = string.Format("<a href=\"{0}?MetadataID={1}\">{2}</a>", metadataListPage.GetUrlToPage(), metadata.ID, metadata.Translations.GetMetadataTranslation(CurrentState.Current.WebSite.Culture).Translation);
tag = "<span class=\"metadataSpanTag\">" + linkTag + "</span>";
}
return tag;
}
开发者ID:huttan1,项目名称:profit,代码行数:35,代码来源:SearchListUtilities.cs
示例18: Alert
public void Alert(string message, Page page)
{
ScriptManager.RegisterStartupScript(page, page.GetType(),
"err_msg",
"alert('" + message + "');",
true);
}
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:7,代码来源:ODS_POLICY.aspx.cs
示例19: GridFieldDefinition
/// <summary>
/// Constructor of the Grid Field Definition
/// </summary>
/// <param name="frm">The main form</param>
/// <param name="page">The current page</param>
public GridFieldDefinition(MainForm frm, Page page)
: base(frm)
{
InitializeComponent();
this.mode = FormMode.Create;
this.page = page;
}
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:12,代码来源:GridFieldDefinition.cs
示例20: SideBar
public SideBar(Game game)
{
sideButton = new Button(true, ">>", 0, 0, 32, Editor.Graphics.PreferredBackBufferHeight);
hitBox = new Rectangle(0, 0, WIDTH, Editor.Graphics.PreferredBackBufferHeight);
PageIndex = 0;
pages = new Page[3];
// File page
pages[0] = new Page();
pages[0].Add(new Button(true, "New", 21, 64));
pages[0].Add(new Button(true, "Save", 71, 64));
pages[0].Add(new Button(true, "Load", 132, 64));
pages[0].Add(new Button(true, "Draw static\n polygon", 37, 128));
pages[0].Add(new Button(true, "Done", 74, 185));
// Tiles page
pages[1] = new Page();
string[] files = Directory.GetFiles("Content\\tiles");
foreach (string f in files)
Console.WriteLine(f);
List<string> tiles = new List<string>();
for (int i = 0; i < files.Length; i++)
tiles.Add(files[i].Replace(".xnb", "").Split('\\')[files[i].Split('\\').Length - 1]);
for (int i = 0; i < tiles.Count; i++)
pages[1].Add(new Button(tiles[i], 24 + (i % 2) * 86, 48 + 90 * (int)(i / 2), 72, 72));
// Objects page
pages[2] = new Page();
}
开发者ID:TadCordle,项目名称:MrGuyXNA,代码行数:33,代码来源:SideBar.cs
注:本文中的Page类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论