Esempio n. 1
0
        public static DialogResultEx Show(String messageText, MessageBoxButtonType messageBoxButtons)
        {
            MessageBoxEX messageBoxEx = new MessageBoxEX();

            messageBoxEx.MessageBoxButtons = messageBoxButtons;
            messageBoxEx.MessageText       = messageText;
            messageBoxEx.ShowDialog();
            return(messageBoxEx.DialogResult);
        }
Esempio n. 2
0
 private void WaitForUnLockMsg_f()
 {
     if (MenuFormManager.LockResult == 1)
     {
         MessageBoxEX.Show("程序已注册", MessageBoxButtonType.OK);
         MenuFormManager.IsActed = 1;
         ibActive.Visible        = false;
     }
     else
     {
         MessageBoxEX.Show("请输入正确激活码", MessageBoxButtonType.OK);
     }
 }
Esempio n. 3
0
        private void SaveWarnInfo()
        {
            lblWarn.Text   = warnString;
            lblWarnID.Text = warnID;
            MachineInfoDAO machineInfoDAO = new MachineInfoDAO();
            String         strVersion     = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.BoardCodeVersion);
            String         language       = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.UseLanguage);
            String         useLanaguage   = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.UseLanguage);

            warnInfoFormManager.BoardCodeVersion = strVersion;
            switch (useLanaguage)
            {
            case "中文":
                lblWarn.Font     = new Font(FontFamily.GenericMonospace, 16, FontStyle.Bold);
                lblWarn.Size     = new Size(172, 51);
                lblWarn.Location = new Point(112, 62);
                this.Size        = new Size(301, 204);
                this.Location    = new Point(100, 300);
                btnOK.Size       = new Size(123, 46);
                btnOK.Location   = new Point(87, 116);
                break;

            case "英文":
                lblWarn.Font     = new Font(FontFamily.GenericMonospace, 12, FontStyle.Regular);
                lblWarn.Size     = new Size(271, 53);
                lblWarn.Location = new Point(112, 62);
                this.Size        = new Size(385, 214);
                this.Location    = new Point(50, 300);
                btnOK.Size       = new Size(143, 46);
                btnOK.Location   = new Point(121, 128);
                break;

            default:
                break;
            }
            String dateTime = String.Empty;

            try
            {
                dateTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm");
            }
            catch
            {
                MessageBoxEX.Show("读取系统日期出错!");
            }
            finally
            {
                warnInfoFormManager.PromptOccurTime = dateTime;
            }
            warnInfoFormManager.SavePromptInfo();
        }
Esempio n. 4
0
        private void Return_Click(object sender, EventArgs e)
        {
            if (EditManager.EditShouldPadInfoList.Count > 1)
            {
                DialogResultEx dialogResultEx = MessageBoxEX.Show("图形已经被修改,是否进行保存!", MessageBoxButtonType.YesCancel);

                if (dialogResultEx == DialogResultEx.Yes)
                {
                    if (EditManager.HaveIrregularPoint)
                    {
                        MessageBoxEX.Show("图中存在无效点,请重新编辑!");
                    }
                    else if (EditManager.GetShapePointLength > 300)
                    {
                        MessageBoxEX.Show("花型针数超过300针,请重新编辑!");
                    }
                    else
                    {
                        EditManager.Edit_SaveAllParam();
                        EditManager.ShouldPadShapeInfo = EditManager.EditShouldPadInfoList[EditManager.EditShouldPadInfoList.Count - 1].ShouldPadShapeInfo;
                        LowerMachineStatueData.LowerMachineStatueDateEx.EditStatue = false;
                        this.Close();
                    }
                }
                else
                {
                    EditManager.ShouldPadShapeInfo = EditManager.EditShouldPadInfoList[0].ShouldPadShapeInfo;
                    LowerMachineStatueData.LowerMachineStatueDateEx.EditStatue = false;
                    this.Close();
                }
            }
            else
            {
                this.Close();
                LowerMachineStatueData.LowerMachineStatueDateEx.EditStatue = false;
            }
        }
Esempio n. 5
0
        private void ShapeFixed_Click(object sender, EventArgs e)
        {
            if (EditManager.ShouldPadShapeInfo == null || EditManager.ShouldPadShapeInfo.ShapePoints == null)
            {
                MessageBoxEX.Show("该界面没有图形,无法打开修正模式!");
            }
            else
            {
                if (modifyShapeForm == null)
                {
                    modifyShapeForm = new ModifyShapeForm();
                }
                modifyShapeForm.ShouldPadShapeInfo = EditManager.ShouldPadShapeInfo;
                ScreenStatueData.ScreenStatueDataEX.InterfaceMode = ShouldPadMachine.ShouldPadMachineAssist.Enum.InterfaceMode.ModifyFormMode;

                modifyShapeForm.ShowDialog();

                ScreenStatueData.ScreenStatueDataEX.InterfaceMode = ShouldPadMachine.ShouldPadMachineAssist.Enum.InterfaceMode.EditFormMode;
                if (modifyShapeForm.DialogResult == DialogResult.Yes)
                {
                    picShapeImage.Image = EditManager.SetShouldPadPoints(modifyShapeForm.ShouldPadShapeInfo.ShapePoints);
                }
            }
        }