Exemple #1
0
 public object Clone(bool image)
 {
     return(new GuiCapture(
                WindowTitle,
                WindowImage == null || !image ? null : (Bitmap)WindowImage.Clone(),
                WindowLocation,
                new List <GuiEventArgs>(HidEvents),
                WindowId));
 }
Exemple #2
0
 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);
 }
Exemple #3
0
        /// <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;
    }
Exemple #5
0
        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(" ", "&nbsp;");
                            txtPrecautions.InnerHtml       = room.Setting.Precautions.Replace("\r\n", "<br/>").Replace(" ", "&nbsp;");
                            txtApplicationInfo.InnerHtml   = room.Setting.ApplicationInfo.Replace("\r\n", "<br/>").Replace(" ", "&nbsp;");

                            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;
                        }
                    }
                }
            }
        }
Exemple #6
0
 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(" ", "&nbsp;");
                     txtPrecautions.InnerHtml       = room.Setting.Precautions.Replace("\r\n", "<br/>").Replace(" ", "&nbsp;");
                     txtApplicationInfo.InnerHtml   = room.Setting.ApplicationInfo.Replace("\r\n", "<br/>").Replace(" ", "&nbsp;");
                     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 = "本研习间暂不开放";
                     }
                 }
             }
         }
     }
 }
Exemple #7
0
    private static void OpenWindow()
    {
        WindowImage window = GetWindow <WindowImage>();

        window.titleContent = new GUIContent("Window Image");
    }
Exemple #8
0
 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);
 }
Exemple #9
0
 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);
 }
Exemple #10
0
 /// <inheritdoc />
 public void Dispose()
 {
     WindowImage.DisposeIfNotNull();
 }
Exemple #11
0
 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);
 }