Upload to server

uploading
This commit is contained in:
2025-08-02 05:20:17 +07:00
commit a5eccbd452
984 changed files with 3031800 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Net;
using System.Text;
using System.Windows.Forms;
using Omega.Properties;
using System.Globalization;
using System.Threading;
using System.Xml;
using System.Xml.Linq;
using System.Linq;
namespace Omega.Forms
{
public partial class frmLogin : Omega.BasicForms.frmCommon
{
public frmLogin()
{
InitializeComponent();
}
private void OK_Click(object sender, EventArgs e)
{
string fileToLoad = Application.StartupPath + @"\Settings.xml";
XElement root = XElement.Load(fileToLoad);
var selected = (from cli in root.Descendants("user")
where cli.Element("username").Value == UserName.EditValue.ToString()
select cli).FirstOrDefault();
if (selected.Element("Password").Value == common.MD5Hash(Password.Text))
{
this.Hide();
SettingInfo.UserName = this.UserName.EditValue.ToString().Trim();
var frm = new frmMain();
frm.ShowDialog();
this.Close();
}
else
{
MessageBox.Show("Bạn nhập sai mật khẩu hoặc tên truy cập", "Cảnh báo", MessageBoxButtons.OK);
}
}
private void Cancel_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}