/// <summary> /// Resets element values to their loaded values /// </summary> internal static void ResetZoom(bool animate = true) { if (ConfigureWindows.GetMainWindow.MainImage.Source == null) { return; } if (animate) { BeginZoomAnimation(1); } else { scaleTransform.ScaleX = scaleTransform.ScaleY = 1.0; translateTransform.X = translateTransform.Y = 0.0; } Tooltip.CloseToolTipMessage(); ZoomValue = 1; // Display non-zoomed values if (Pics.Count == 0) { /// Display values from web SetTitle.SetTitleString((int)ConfigureWindows.GetMainWindow.MainImage.Source.Width, (int)ConfigureWindows.GetMainWindow.MainImage.Source.Height); } else { SetTitle.SetTitleString((int)ConfigureWindows.GetMainWindow.MainImage.Source.Width, (int)ConfigureWindows.GetMainWindow.MainImage.Source.Height, FolderIndex); } UC.GetQuickSettingsMenu.ZoomSlider.Value = 1.0; }
protected void Page_Load(object sender, EventArgs e) {//WWWWW1231231231231231231123123 this.Title = Title + SetTitle.getTitle(); string msg = Request.QueryString["msg"].ToString(); this.Label1.Text = msg; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); int currentPage; try { currentPage = Convert.ToInt32(Request.QueryString["p"]); } catch { currentPage = 1; } if (currentPage == 0) { currentPage = 1; } PagedDataSource ps = new PagedDataSource(); PopOperate op = new PopOperate(); ps.DataSource = op.viewAll(); ps.AllowPaging = true; ps.CurrentPageIndex = currentPage - 1; ps.PageSize = 6; this.Pagination1.pageCount = ps.PageCount; this.Pagination1.currentPage = currentPage; this.Pagination1.pageUrl = "pop.aspx"; this.Pagination1.paramName = "p"; this.DataListPop.DataSource = ps; this.DataListPop.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); } if (Convert.ToString(Session["admin"]) != "admin") { Response.Redirect("~/refresh.aspx?msg=" + "对不起,只有管理员才能对文章进行相关的操作0!"); return; } int aid = Convert.ToInt32(Request.QueryString["aid"]); ArticleOperate aop = new ArticleOperate(); bool b = aop.delete(aid); if (b) { Response.Redirect("~/refresh.aspx?msg=" + "文章删除成功!"); } else { Response.Redirect("~/refresh.aspx?msg=" + "文章删除失败!"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); } }
protected void Page_Load(object sender, EventArgs e) { //????asdfasdfasdf2131232112311231212312312123123123.0.021321321356 if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.Title = SetTitle.getTitle(); dataListDatabind(); } }
public static void initializeInGameEditor() { Omni.self.Print(" % - Initializing In-game GUI Editor"); SetTitle.initialize(); WindowSettings.initialize(); ChangeFontSize.initialize(); ObjectCreator oIngameContext = new ObjectCreator("GuiControl", "IngameContext, IngameGuiGroup", typeof(InGameContext)); oIngameContext.Create(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); } if (Convert.ToString(Session["admin"]) != "admin") { Response.Redirect("~/refresh.aspx?msg=" + "对不起,只有管理员才能对文章进行相关的操作0!"); return; } }
internal static void CloseCrop() { if (Pics.Count == 0) { SetTitle.SetTitleString((int)ConfigureWindows.GetMainWindow.MainImage.Source.Width, (int)ConfigureWindows.GetMainWindow.MainImage.Source.Height); } else { SetTitle.SetTitleString((int)ConfigureWindows.GetMainWindow.MainImage.Source.Width, (int)ConfigureWindows.GetMainWindow.MainImage.Source.Height, FolderIndex); } ConfigureWindows.GetMainWindow.ParentContainer.Children.Remove(GetCropppingTool); CanNavigate = true; }
void HandleSetTitle(SetTitle packet) { // -1 at none if (packet.TitleID > 0) { if (!GetPlayer().HasTitle((uint)packet.TitleID)) return; } else packet.TitleID = 0; GetPlayer().SetChosenTitle((uint)packet.TitleID); }
internal static async void PerformCrop() { if (Pics.Count == 0) { SetTitle.SetTitleString((int)ConfigureWindows.GetMainWindow.MainImage.Source.Width, (int)ConfigureWindows.GetMainWindow.MainImage.Source.Height); } else { SetTitle.SetTitleString((int)ConfigureWindows.GetMainWindow.MainImage.Source.Width, (int)ConfigureWindows.GetMainWindow.MainImage.Source.Height, FolderIndex); } await SaveCrop().ConfigureAwait(false); CanNavigate = true; }
public void OnSetTitle(SetTitle setTitle) { FormInvoke invoke = new FormInvoke( delegate { _form.SetTitle(setTitle.Body.Title); } ); WinFormsServicePort.Post(invoke); _state.Title = setTitle.Body.Title; setTitle.ResponsePort.Post(DefaultUpdateResponseType.Instance); DoSendNotification(setTitle); }
protected void Page_Load(object sender, EventArgs e) { if (Convert.ToString(Session["admin"]) != "admin") { Response.Redirect("~/refresh.aspx?msg=" + "对不起,只有管理员才能登陆发表文章!"); return; } if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); MyClassOperate mop = new MyClassOperate(); this.DropDownListClass.DataSource = mop.getAllCidCname(); this.DropDownListClass.DataTextField = "cname"; this.DropDownListClass.DataValueField = "cid"; this.DropDownListClass.DataBind(); } }
void HandleSetTitle(SetTitle packet) { // -1 at none if (packet.TitleID > 0 && packet.TitleID < PlayerConst.MaxTitleIndex) { if (!GetPlayer().HasTitle((uint)packet.TitleID)) { return; } } else { packet.TitleID = 0; } GetPlayer().SetUInt32Value(PlayerFields.ChosenTitle, (uint)packet.TitleID); }
public Loader(string imagePath, Image image, LoadOption load) { this.Image = image; this.loadOption = load; isPrevious = false; SetTitleCallback = this.DefaltSetTitle; if (imagePath != null) { Load(imagePath); } else if (loadOption.CurrentFile != null) { imagePath = loadOption.CurrentFile; Load(imagePath); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); string s; try { s = Request.QueryString["s"].ToString(); if (s.Length > 20) { s = s.Substring(0, 20); } ArticleOperate aop = new ArticleOperate(); int currentPage; try { currentPage = Convert.ToInt32(Request.QueryString["p"]); } catch { currentPage = 1; } if (currentPage == 0) { currentPage = 1; } PagedDataSource ps = new PagedDataSource(); ps.DataSource = aop.search(s); ps.AllowPaging = true; ps.PageSize = 20; ps.CurrentPageIndex = currentPage - 1; this.Pagination1.pageCount = ps.PageCount; this.Pagination1.paramName = "p"; this.Pagination1.currentPage = currentPage; this.Pagination1.pageUrl = "res.aspx?s=" + s; this.DataListArticleList.DataSource = ps; this.DataListArticleList.DataBind(); } catch { Response.Redirect("refresh.aspx?msg=" + "请输入要查询的关键字!"); } } }
protected void Page_Load(object sender, EventArgs e) { if (Convert.ToString(Session["admin"]) != "admin") { Response.Redirect("~/refresh.aspx?msg=" + "对不起,只有管理员才能对文章进行相关的操作!"); return; } if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); try { int currentPage; try { currentPage = Convert.ToInt32(Request.QueryString["p"]); } catch { currentPage = 1; } if (currentPage == 0) { currentPage = 1; } ArticleOperate aop = new ArticleOperate(); PagedDataSource ps = new PagedDataSource(); ps.DataSource = aop.viewList(); ps.AllowPaging = true; ps.PageSize = 20; ps.CurrentPageIndex = currentPage - 1; this.Pagination1.pageCount = ps.PageCount; this.Pagination1.currentPage = currentPage; this.Pagination1.pageUrl = "list.aspx"; this.Pagination1.paramName = "p"; this.DataListArticleList.DataSource = ps; this.DataListArticleList.DataBind(); } catch { Response.Redirect("~/refresh.aspx?msg=" + "显示出错,请稍候尝试!"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); try { int cid = Convert.ToInt32(Request.QueryString["cid"]); int currentPage; try { currentPage = Convert.ToInt32(Request.QueryString["p"]); } catch { currentPage = 1; } if (currentPage == 0) { currentPage = 1; } ArticleOperate aop = new ArticleOperate(); PagedDataSource ps = new PagedDataSource(); ps.DataSource = aop.viewAllByCid(cid); ps.AllowPaging = true; ps.PageSize = 20; ps.CurrentPageIndex = currentPage - 1; this.Pagination1.currentPage = currentPage; this.Pagination1.pageCount = ps.PageCount; this.Pagination1.pageUrl = "list.aspx?cid=" + cid; this.Pagination1.paramName = "p"; MyClassOperate mop = new MyClassOperate(); this.Page.Title = (mop.getByCid(cid)).cname + this.Page.Title; this.DataListArticleList.DataSource = ps; this.DataListArticleList.DataBind(); } catch { Response.Redirect("refresh.aspx?msg=" + "对不起没有此分类的信息"); } } }
protected void Page_Load(object sender, EventArgs e) { this.Title = Title + SetTitle.getTitle(); if (Convert.ToString(Session["admin"]) == "admin") { int pid; try { pid = Convert.ToInt32(Request.QueryString["p"]); } catch { Response.Redirect("~/refresh.aspx?msg=" + "对不起,请选中要回复的留言"); } } else { Response.Redirect("~/refresh.aspx?msg=" + "对不起,只有管理员才能对文章进行相关的操作!"); } }
protected void Page_Load(object sender, EventArgs e) { //asdfasdfasdfasdfaasddf if (!IsPostBack) { this.Title = SetTitle.getTitle(); try { int aid = Convert.ToInt32(Request.QueryString["aid"]); Article at = (new ArticleOperate()).getByAid(aid); if (at == null || at.Equals(null)) { this.Page.Title = "此文章不存在,或被管理员删除,请见谅" + " " + Title; this.lblcontent.Text = "此文章不存在,或被管理员删除,请见谅!"; this.txtComment.Text = "此文章不存在,不允许发表评论"; this.txtComment.Enabled = false; this.btnCommit.EnableTheming = false; } else { this.lbltitle.Text = at.title; this.Page.Title = at.title + " " + Title; this.lblposttime.Text = at.posttime.ToString(); this.lblcontent.Text = at.content; this.lblcname.Text = at.cname; this.hklist.NavigateUrl = "list.aspx?cid=" + at.cid.ToString(); this.hklastArticle.NavigateUrl = "article.aspx?aid=" + (at.aid - 1).ToString(); this.hknextArticle.NavigateUrl = "article.aspx?aid=" + (at.aid + 1).ToString(); this.lblCommet.Text = at.countcomment.ToString(); CommentOperate cop = new CommentOperate(); this.DataListAllComment.DataSource = cop.viewAllbyAid(aid); this.DataListAllComment.DataBind(); } } catch { Response.Redirect("refresh.aspx?msg=" + "此文章不存在,或被管理员删除,请见谅!"); } } }
public Task Handle(object command) { return(command switch { Create cmd => HandleCreate(cmd), Update cmd => HandleFullUpdate(cmd), SetTitle cmd => HandleUpdate(cmd.Id, (a) => a.SetTitle(cmd.Title), (a) => Repository.Update(a)), SetReleaseYear cmd => HandleUpdate(cmd.Id, (a) => a.SetReleaseYear(cmd.ReleaseYear), (a) => Repository.Update(a)), SetPageCount cmd => HandleUpdate(cmd.Id, (a) => a.SetPageCount(cmd.PageCount), (a) => Repository.Update(a)), SetWordCount cmd => HandleUpdate(cmd.Id, (a) => a.SetWordCount(cmd.WordCount), (a) => Repository.Update(a)), SetIsbn cmd => HandleUpdate(cmd.Id, (a) => a.SetIsbn(cmd.Isbn), (a) => Repository.Update(a)), SetBookCoverPath cmd => HandleUpdate(cmd.Id, (a) => a.SetBookCoverPath(cmd.BookCoverPath), (a) => Repository.Update(a)), SetDescription cmd => HandleUpdate(cmd.Id, (a) => a.SetDescription(cmd.Description), (a) => Repository.Update(a)), SetNotes cmd => HandleUpdate(cmd.Id, (a) => a.SetNotesOld(cmd.Notes), (a) => Repository.Update(a)), SetIsRead cmd => HandleUpdate(cmd.Id, (a) => a.SetIsRead(cmd.IsRead), (a) => Repository.Update(a)), SetLanguage cmd => HandleUpdateAsync(cmd.Id, async a => await UpdateLanguageAsync(a, cmd.Language.Id)), SetPublisher cmd => HandleUpdateAsync(cmd.Id, async a => await UpdatePublisherAsync(a, cmd.Publisher.Id)), SetAuthors cmd => HandleUpdateAsync(cmd.Id, async a => await UpdateBookAuthorsAsync(a, cmd.Authors)), SetFormats cmd => HandleUpdateAsync(cmd.Id, async a => await UpdateBookFormatsAsync(a, cmd.Formats)), SetGenres cmd => HandleUpdateAsync(cmd.Id, async a => await UpdateBookGenresAsync(a, cmd.Genres)), SetBookReadDates cmd => HandleUpdateAsync(cmd.Id, async a => await UpdateBookReadDatesAsync(a, cmd.BookReadDates)), Delete cmd => HandleDeleteAsync(cmd), _ => Task.CompletedTask });
/// <summary> /// Zooms to given value /// </summary> /// <param name="value"></param> internal static void Zoom(double value) { if (value > UC.GetQuickSettingsMenu.ZoomSlider.Maximum) { return; } ZoomValue = value; BeginZoomAnimation(ZoomValue); /// Displays zoompercentage in the center window if (!string.IsNullOrEmpty(ZoomPercentage)) { Tooltip.ShowTooltipMessage(ZoomPercentage, true); } else { Tooltip.CloseToolTipMessage(); } /// Display updated values if (Pics.Count == 0) { /// Display values from web SetTitle.SetTitleString((int)ConfigureWindows.GetMainWindow.MainImage.Source.Width, (int)ConfigureWindows.GetMainWindow.MainImage.Source.Height); } else { SetTitle.SetTitleString((int)ConfigureWindows.GetMainWindow.MainImage.Source.Width, (int)ConfigureWindows.GetMainWindow.MainImage.Source.Height, FolderIndex); } if (UC.GetQuickSettingsMenu.ZoomSlider.Value != value) { UC.GetQuickSettingsMenu.ZoomSlider.Value = value; } }
protected void Page_Load(object sender, EventArgs e) { if (Convert.ToString(Session["admin"]) != "admin") { Response.Redirect("~/refresh.aspx?msg=" + "对不起,只有管理员才能对文章进行相关的操作!"); return; } if (!IsPostBack) { this.Title = Title + SetTitle.getTitle(); MyClassOperate mop = new MyClassOperate(); this.DropDownListClass.DataSource = mop.getAllCidCname(); this.DropDownListClass.DataTextField = "cname"; this.DropDownListClass.DataValueField = "cid"; this.DropDownListClass.DataBind(); try { int aid = Convert.ToInt32(Request.QueryString["aid"]); Article at = (new ArticleOperate()).getByAid(aid); if (at == null || at.Equals(null)) { this.lblcontext.Text = "对不起,此文章不存在,或被管理员删除"; } else { this.txtTitle.Text = at.title; Page.Title = at.title + Title; this.DropDownListClass.SelectedValue = at.cid.ToString(); this.txtBody.Value = at.content; } } catch { Response.Redirect("~/refresh.aspx?msg=" + "此文章不存在,或被管理员删除,请见谅!"); } } }
public static void Run() { try { Console.Clear(); while (_running) { ConsoleEx.WrapInOutputLock(() => { Console.CursorVisible = false; Console.SetCursorPosition(0, 0); ConsoleEx.WriteLineEnh(SetTitle.Invoke().FixedWidthEnh(ConsoleEx.WindowWidth - 12) + " " + DateTime.Now.ToStringHH24mmss()); ConsoleEx.WriteLineEnh(SetKeysHelp.Invoke().FixedWidthEnh(ConsoleEx.WindowWidth - 8 /*16*/) + " " + "- *Q*U|T" /*$" * R*estart - *Q*U|T"*/); OnRefresh?.Invoke(); Console.CursorVisible = true; }); var keyInfo = ConsoleEx.ReadKeyWithTimeout(RefreshInterval); if (keyInfo == null) { continue; } if (keyInfo.Value.KeyChar != 'Q' && keyInfo.Value.KeyChar != '|') { OnKey?.Invoke(keyInfo.Value.KeyChar.ToString()); } HandleStandardKey(keyInfo); } } finally { _cts.Cancel(); } }
public IActionResult Put([FromServices] SetTitleHandler handler, SetTitle request) { handler.Handle(request); return(Ok()); }
public Game1(Form1 form, Control control) : base(control) { this.form = form; setTitle = form.SetTitle; }