56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Text;
|
|||
|
using System.Linq;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
using DevExpress.XtraEditors;
|
|||
|
using UI.Framework.Forms;
|
|||
|
using Api.Framework.Tools;
|
|||
|
using CsharpHttpHelper;
|
|||
|
using Grant.Framework;
|
|||
|
|
|||
|
namespace BackupAndImport
|
|||
|
{
|
|||
|
public partial class CheckAdminForm : BaseForm
|
|||
|
{
|
|||
|
public CheckAdminForm()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
|
|||
|
private void button2_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.Close();
|
|||
|
}
|
|||
|
|
|||
|
private void button1_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
if (string.IsNullOrWhiteSpace(textBox1.Text.Trim()))
|
|||
|
throw new Exception("请输入软件登录密码");
|
|||
|
|
|||
|
string pass = HttpExtend.DESEncrypt(textBox1.Text.Trim(), "12345678", "12378946");
|
|||
|
//var Config = new Api.Framework.Tools.IniHelper(HttpExtend.MapFile("系统配置.ini", "Config"));
|
|||
|
//var passData = Config.GetValue("帐号信息", "密码");
|
|||
|
if (pass == GrantClient.LoginPassMd5)
|
|||
|
this.DialogResult = DialogResult.OK;
|
|||
|
else
|
|||
|
throw new Exception("密码错误");
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
ShowErrorAutoClose(ex);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void CheckAdminForm_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|