示例#1
0
        public static DialogResult showPopupElectricPassword(IWin32Window host, int roomCutOffStatus, string roomName)
        {
            PopupElectricPassword sPopup = new PopupElectricPassword();

            //
            sPopup.ShowIcon      = false;
            sPopup.ShowInTaskbar = false;
            sPopup.HelpButton    = false;
            sPopup.MinimizeBox   = false;
            sPopup.MaximizeBox   = false;
            sPopup.MaximumSize   = sPopup.MinimumSize = sPopup.Size;
            sPopup.StartPosition = FormStartPosition.CenterScreen;
            //
            sPopup.roomCutOffStatus = roomCutOffStatus;
            //
            if (roomCutOffStatus == 0)
            {
                sPopup.cutMode = "on";
            }
            else
            {
                sPopup.cutMode = "off";
            }
            //
            sPopup.roomName = roomName;
            //
            DialogResult dl = sPopup.ShowDialog(host);

            //
            sPopup.Dispose();
            //
            return(dl);
        }
示例#2
0
 public static DialogResult showPopupElectricPassword(IWin32Window host, int roomCutOffStatus, string roomName)
 {
     PopupElectricPassword sPopup = new PopupElectricPassword();
     //
     sPopup.ShowIcon = false;
     sPopup.ShowInTaskbar = false;
     sPopup.HelpButton = false;
     sPopup.MinimizeBox = false;
     sPopup.MaximizeBox = false;
     sPopup.MaximumSize = sPopup.MinimumSize = sPopup.Size;
     sPopup.StartPosition = FormStartPosition.CenterScreen;
     //
     sPopup.roomCutOffStatus = roomCutOffStatus;
     //
     if (roomCutOffStatus == 0)
         sPopup.cutMode = "on";
     else
         sPopup.cutMode = "off";
     //
     sPopup.roomName = roomName;
     //
     DialogResult dl = sPopup.ShowDialog(host);
     //
     sPopup.Dispose();
     //
     return dl;
 }