Exemplo n.º 1
0
        /// <summary>
        ///     消息提示框
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        public static MvcHtmlString MessageBox(this HtmlHelper htmlHelper, MessageBoxInput input)
        {
            var html =
                string.Format(@"<table class='messagebox' align='center' {0} cellpadding='0' cellspacing='0'>
                <tbody>
                    <tr class='head-no-title'>
                        <td class='left'></td>
                        <td class='center'></td>
                        <td class='right'></td>
                    </tr>
                    <tr class='msg'>
                        <td class='left'></td>
                        <td class='center {1}'>
                            <div class='msg-content'>
                                <strong style='font-size: 14px'>{2}</strong>
                            </div>
                        </td>
                        <td class='right'></td>
                    </tr>
                    <tr class='foot'>
                        <td class='left'></td>
                        <td class='center'><b></b></td>
                        <td class='right'></td>
                    </tr>
                </tbody>
            </table>", input.HtmlAttributes, input.MessageBoxType, input.Msg);

            return(new MvcHtmlString(html));
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Show a Metro Input Message Box
        /// </summary>
        /// <param name="title">The title of the Message Box.</param>
        /// <param name="message">The message to display inside the Message Box.</param>
        /// <param name="defaultText">The default text to show in the input box.</param>
        /// <param name="placeholder">The placeholder text to put in the Input Box.</param>
        /// <returns>The string the user entered.</returns>
        public static string Show(string title, string message, string defaultText, string placeholder)
        {
            var dialog = new MessageBoxInput(title, message, placeholder, null, defaultText);

            dialog.ShowDialog();

            return(dialog.Result);
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Show a Metro Input Message Box
        /// </summary>
        /// <param name="title">The title of the Message Box.</param>
        /// <param name="message">The message to display inside the Message Box.</param>
        /// <returns>The string the user entered.</returns>
        public static string Show(string title, string message)
        {
            var dialog = new MessageBoxInput(title, message, "", null, "");

            dialog.ShowDialog();

            return(dialog.Result);
        }
Exemplo n.º 4
0
        private void btnCalcular_Click(object sender, EventArgs e)
        {
            MessageBoxInput messageBox = new MessageBoxInput();

            messageBox.nota1    = Convert.ToDouble(txtNota1.Text);
            messageBox.nota2    = Convert.ToDouble(txtNota2.Text);
            messageBox.trabalho = Convert.ToDouble(txtTrabalho.Text);
            txtMedia.Text       = messageBox.Executar();
        }
Exemplo n.º 5
0
        private string ShowMyDialogBox()
        {
            MessageBoxInput TestDialog = new MessageBoxInput();

            if (TestDialog.ShowDialog() == true)
            {
                if (TestDialog.GetCharacterName != "")
                {
                    return(TestDialog.GetCharacterName);
                }
                else
                {
                    return(GlobalTranslator.Instance.Translator.ProvideValue("NoName"));
                }
            }
            else
            {
                return(GlobalTranslator.Instance.Translator.ProvideValue("NoName"));
            }
        }
Exemplo n.º 6
0
        private void Button_本月结账_Click(object sender, RoutedEventArgs e)
        {
            if (vsy.ValidateRuning() == false)
            {
                MessageBoxCommon.Show("试用期已过,不能使用此功能!");
                return;
            }
            if (CommonInfo.权限值 < 2)
            {
                MessageBoxCommon.Show("权限不足,不能使用此功能!");
                return;
            }
            this.Button_隐藏.Focus();
            bool mark = false;

            if (CommonInfo.是否初始化年初数)
            {
                mark = true;
            }
            else
            {
                MessageBoxCommon.Show("当前未初始化年初金额,请先初始化年初数!");
                return;
            }
            if (!vmp.IsReview(CommonInfo.当前期))
            {
                Button_凭证审核_Click(this, null);
                mark = false;
                MessageBoxCommon.Show("检测到还有当前期未审核的凭证单,请先做审核!");
            }
            int temp = 0;

            if (mark)
            {
                bool?result2 = MessageBoxDel.Show("注意", "正在进行第" + CommonInfo.当前期 + "期结账操作,确认是否继续?");
                if (result2 == true)
                {
                    bool?result = MessageBoxInput.Show("安全确认,请输入密码");
                    if (result == true)
                    {
                        if (CommonInfo.验证密码.Equals(CommonInfo.登录密码))
                        {
                            bool flag = vm.CheckOut(CommonInfo.当前期);
                            if (flag)
                            {
                                MessageBoxCommon.Show("结账完毕!");
                                if (CommonInfo.当前期 <= 12)
                                {
                                    vmb.UpdatePeriod(CommonInfo.当前期);
                                }
                                temp  = CommonInfo.当前期;
                                mr.日志 = "进行了结账操作,结算第:" + temp + "期账";
                                vmr.Insert(mr);
                                OnTabChange(1, 0, "本月结账");
                            }
                        }
                        else
                        {
                            MessageBoxCommon.Show("当前输入密码错误!");
                        }
                    }
                }
            }
        }