private void ShowErrorDialog(string label, string text, string type)
        {
            string msg1 = String.Format("{0:s}的值{1:s}的格式非法或者超出范围!");
            string msg2 = String.Empty;

            switch (type)
            {
            case "BIT": msg2 = string.Format("{0}(0~1)。", Properties.Resources.Valid_Range); break;

            case "WORD": msg2 = string.Format("{0}(-(2^31)~(2^31)-1)。", Properties.Resources.Valid_Range); break;

            case "DWORD": msg2 = string.Format("{0}(-(2^63)~(2^63)-1)。", Properties.Resources.Valid_Range); break;

            default: break;
            }
            LocalizedMessageBox.Show(msg1 + msg2, LocalizedMessageIcon.Warning);
        }
        private void EnsureButton_Click(object sender, RoutedEventArgs e)
        {
            if (IsSettingChecked && File.Exists(PathContent + @"\" + NameContent + "." + FileHelper.ExtensionName))
            {
                string title = Properties.Resources.Message_Is_Override;
                string text  = String.Format("{2:s} {1},{0}?", Properties.Resources.Message_Is_Override, Properties.Resources.Message_Already_Exist, NameContent);
                LocalizedMessageResult mbret = LocalizedMessageBox.Show(text, title, LocalizedMessageButton.YesNoCancel, LocalizedMessageIcon.Warning);
                switch (mbret)
                {
                case LocalizedMessageResult.Yes:
                    break;

                case LocalizedMessageResult.No:
                case LocalizedMessageResult.Cancel:
                default:
                    return;
                }
            }
            if (EnsureButtonClick != null)
            {
                EnsureButtonClick.Invoke(this, new RoutedEventArgs());
            }
        }