Пример #1
0
        private void btnBuildId_Click(object sender, EventArgs e)
        {
            txtIdResult.Text = "";
            int count = 1;

            if (!string.IsNullOrEmpty(txtIdCount.Text))
            {
                count = Convert.ToInt32(txtIdCount.Text);
            }

            for (int i = 0; i < count; i++)
            {
                string uuid;
                if (chbUuidTime.Checked)
                {
                    uuid = GenericsUtils.CreateTimeUuid();
                }
                else
                {
                    uuid = GenericsUtils.CreateUuid();
                }

                if (chbIdUpper.Checked)
                {
                    uuid = uuid.ToUpper();
                }

                if (chbDeleteIdLine.Checked)
                {
                    uuid = uuid.Replace("-", "");
                }

                txtIdResult.Text += uuid + "\r\n";
            }
        }
Пример #2
0
        private void btnBuildMd5_Click(object sender, EventArgs e)
        {
            string source = txtMd5Source.Text.Trim();

            if (!string.IsNullOrEmpty(source))
            {
                string md5 = GenericsUtils.Md5(source);
                txtMd5Lower.Text = md5.ToLower();
                txtMd5Upper.Text = md5;
            }
        }