feat: Initial commit for LFP_Manager_DBG (V1.1.0.22)

This commit is contained in:
2026-09-22 11:37:05 +09:00
commit df038ae86b
158 changed files with 78308 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
using DevExpress.Pdf.Native;
using DevExpress.XtraEditors;
using LFP_Manager.DataStructure;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LFP_Manager.Forms
{
public partial class FmxPassword : DevExpress.XtraEditors.XtraForm
{
#region DELEGATE
public delegate void PasswordResut(int result);
#endregion
#region VARIABLES
private CommConfig Config;
private int result = -1;
private int mode = 0;
public event PasswordResut OnResult = null;
#endregion
#region CONSTRUCTORS
public FmxPassword(CommConfig aConfig, int aMode)
{
InitializeComponent();
Config = aConfig;
mode = aMode;
}
#endregion
#region FORM EVENT
private void FmxPassword_FormClosed(object sender, FormClosedEventArgs e)
{
OnResult?.Invoke(result);
}
#endregion
#region BUTTON EVENT
private void BtnCancel_Click(object sender, EventArgs e)
{
Close();
}
private void BtnOk_Click(object sender, EventArgs e)
{
if (mode == 0)
{
if (Config.DisablePassword == TePassword.Text)
{
result = 1;
MessageBox.Show("Anti-Theft Protect Clear Success", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
Close();
}
else
{
MessageBox.Show("Wrong Password - Try again", "Result", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else if (mode == 1)
{
if (Config.EnablePassword == TePassword.Text)
{
result = 1;
MessageBox.Show("Enable Success", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
Close();
}
else
{
MessageBox.Show("Wrong Password - Try again", "Result", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else if (mode == 2)
{
if (Config.DisablePassword == TePassword.Text)
{
result = 1;
MessageBox.Show("Disable Success", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
Close();
}
else
{
MessageBox.Show("Wrong Password - Try again", "Result", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
#endregion
}
}