public object Clone(bool image) { return(new GuiCapture( WindowTitle, WindowImage == null || !image ? null : (Bitmap)WindowImage.Clone(), WindowLocation, new List <GuiEventArgs>(HidEvents), WindowId)); }
public Sprite getImage(WindowImage type) { if (type == WindowImage.INFO) { return(uh.info); } if (type == WindowImage.ERROR) { return(uh.error); } if (type == WindowImage.WARNING) { return(uh.warnning); } return(uh.info); }
/// <summary> /// 窗口关闭回调 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (bContinuous == true)//if Investigating Continuous, Halt Inspection { controler.HaltInv(); } controler.CloseIoCard(); controler.RunCompleted -= new RunCompleted(OnRunCompletedCallBack); controler.UnRegistVisionSystemCallBack(); controler.ShowResult -= new ShowResult(ShowResultCallBack); controler.ShowReadCodeSinal -= new ShowReadCodeSinal(ShowReadCodeSinalCallBack); controler.ShowResetSinal -= new ShowResetSinal(ShowResetSinalCallBack); controler.ShowCount -= new ShowCount(ShowCountCallBack); WindowImage.DisconnectImgWindow();//disconnect display window }
public WindowUIMenu(WindowImage wimg, WindowType wtype, List <string> wbuttons, string wtitle, string werror, bool wexit, int id, ExitDefault ex) { //GameObject unityHook = GameObject.Find("WindowUI"); uh = Resources.FindObjectsOfTypeAll <UnityHook>()[0]; // uh = (UnityHook) unityHook.GetComponent(typeof(UnityHook)); wum = new WindowUIManager(uh); windowUI = uh.windowUI; uh.activeMenu = this; img = wimg; type = wtype; buttons = wbuttons; title = wtitle; error = werror; exit = wexit; this.ex = ex; this.id = id; this.background = false; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.ServerVariables["HTTP_REFERER"] != null) { string url = Request.ServerVariables["HTTP_REFERER"].Trim(); string pageName = SeatManage.SeatManageComm.SeatComm.GetPageName(url); if (pageName != "StudyRoomList.aspx" && pageName != "FormSYS.aspx") { WriteLogs(url); Response.Write("请通过正确方式访问网站!"); Response.End(); return; } } else { WriteLogs(HttpContext.Current.Request.Url.AbsoluteUri); Response.Write("请通过正确方式访问网站!"); Response.End(); return; } } if (Request.QueryString["flag"] == "edit") { if (!IsPostBack) { DataBind(); } extform.Hidden = false; remarkform.Hidden = true; btnApp.Hidden = true; btnSubmit.Hidden = false; } else { string roomNo = Request.QueryString["roomNo"]; if (string.IsNullOrEmpty(roomNo)) { PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); FineUI.Alert.ShowInTop("数据获取失败!"); } else { SeatManage.ClassModel.StudyRoomInfo room = SeatManage.Bll.StudyRoomOperation.GetSingleStudyRoonInfo(roomNo); if (room == null) { PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); FineUI.Alert.ShowInTop("数据获取失败!"); } else { if (!IsPostBack) { DateTime nowT = SeatManage.Bll.ServiceDateTime.Now; tpBookingTime.MinTime = room.Setting.OpenTime; tpBookingTime.MaxTime = room.Setting.CloseTime; tpBookingTime.SelectedDate = room.Setting.OpenTime; dpBookingDate.MinDate = nowT; dpBookingDate.SelectedDate = nowT; nbUseTime.MinValue = 1; string[] cbul = room.Setting.CanUseFacilities.Split(';'); if (cbul.Length > 0) { cbUse.Items.Clear(); foreach (string item in cbul) { if (string.IsNullOrEmpty(item)) { continue; } cbUse.Items.Add(new CheckItem(item, item)); } } txtFacilitiesRenmark.InnerHtml = room.Setting.FacilitiesRenmark.Replace("\r\n", "<br/>").Replace(" ", " "); txtPrecautions.InnerHtml = room.Setting.Precautions.Replace("\r\n", "<br/>").Replace(" ", " "); txtApplicationInfo.InnerHtml = room.Setting.ApplicationInfo.Replace("\r\n", "<br/>").Replace(" ", " "); imgRoomImage.ImageUrl = "~/StudyImage/" + room.RoomImage; string u = Server.UrlEncode(imgRoomImage.ImageUrl); btnImage.OnClientClick = WindowImage.GetShowReference(string.Format("BigImage.aspx?imageurl={0}", u), "大图"); extform.Hidden = true; remarkform.Hidden = false; btnSubmit.Hidden = true; btnApp.Hidden = false; SeatManage.ClassModel.UserInfo user = SeatManage.Bll.Users_ALL.GetUserInfo(this.LoginId); txtApplicantCardNo.Text = this.LoginId; txtApplicantName.Text = user.UserName; } } } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["flag"] == "edit") { if (!IsPostBack) { DataBind(); } extform.Hidden = false; remarkform.Hidden = true; btnApp.Hidden = true; btnSubmit.Hidden = false; } else { string roomNo = Request.QueryString["roomNo"]; if (string.IsNullOrEmpty(roomNo)) { PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); FineUI.Alert.ShowInTop("数据获取失败!"); } else { SeatManage.ClassModel.StudyRoomInfo room = SeatManage.Bll.StudyRoomOperation.GetSingleStudyRoonInfo(roomNo); if (room == null) { PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); FineUI.Alert.ShowInTop("数据获取失败!"); } else { if (!IsPostBack) { DateTime nowT = SeatManage.Bll.ServiceDateTime.Now; tpBookingTime.MinTime = room.Setting.OpenTime; tpBookingTime.MaxTime = room.Setting.CloseTime; tpBookingTime.SelectedDate = room.Setting.OpenTime; dpBookingDate.MinDate = nowT; dpBookingDate.SelectedDate = nowT; nbUseTime.MinValue = 1; string[] cbul = room.Setting.CanUseFacilities.Split(';'); if (cbul.Length > 0) { cbUse.Items.Clear(); foreach (string item in cbul) { if (string.IsNullOrEmpty(item)) { continue; } cbUse.Items.Add(new CheckItem(item, item)); } } txtFacilitiesRenmark.InnerHtml = room.Setting.FacilitiesRenmark.Replace("\r\n", "<br/>").Replace(" ", " "); txtPrecautions.InnerHtml = room.Setting.Precautions.Replace("\r\n", "<br/>").Replace(" ", " "); txtApplicationInfo.InnerHtml = room.Setting.ApplicationInfo.Replace("\r\n", "<br/>").Replace(" ", " "); string imageWebUrl = ConfigurationManager.AppSettings["imageUrl"]; imgRoomImage.ImageUrl = imageWebUrl + "StudyImage/" + room.RoomImage; string u = Server.UrlEncode(imgRoomImage.ImageUrl); btnImage.OnClientClick = WindowImage.GetShowReference(string.Format("BigImage.aspx?imageurl={0}", u), "大图"); extform.Hidden = true; remarkform.Hidden = false; btnSubmit.Hidden = true; btnApp.Hidden = false; if (!room.Setting.IsUseStudyRoom) { btnApp.Enabled = false; btnApp.ToolTip = "本研习间暂不开放"; } } } } } }
private static void OpenWindow() { WindowImage window = GetWindow <WindowImage>(); window.titleContent = new GUIContent("Window Image"); }
public WindowUI(WindowImage image, WindowType type, List <string> buttons, string title, string errorMessage) { WindowUIMenu wum = new WindowUIMenu(image, type, buttons, title, errorMessage, true, 0, ExitDefault.CLOSEOPERATION); }
public WindowUI(WindowImage image, WindowType type, List <string> buttons, string title, string errorMessage, bool exitButton, int id, ExitDefault defaultCloseOperation) { WindowUIMenu wum = new WindowUIMenu(image, type, buttons, title, errorMessage, exitButton, id, defaultCloseOperation); }
/// <inheritdoc /> public void Dispose() { WindowImage.DisposeIfNotNull(); }
public WindowUI(WindowImage image, WindowType type, List <string> buttons, string title, string errorMessage, bool exitButton, int id) { wum = new WindowUIMenu(image, type, buttons, title, errorMessage, exitButton, id, ExitDefault.CLOSEOPERATION); }