74 lines
1.8 KiB
C#
74 lines
1.8 KiB
C#
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;
|
|
using Api.Framework.Tools;
|
|
|
|
namespace CSIMTurnMoney
|
|
{
|
|
public partial class MainForm : Form
|
|
{
|
|
public MainForm()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void CloseForm()
|
|
{
|
|
try
|
|
{
|
|
if (!this.IsDisposed)
|
|
{
|
|
this.Invoke(new Action(delegate
|
|
{
|
|
this.Close();
|
|
this.Dispose();
|
|
}));
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message);
|
|
}
|
|
}
|
|
|
|
private void MainForm_Load(object sender, EventArgs e)
|
|
{
|
|
textBox1.Text = Class1.Config.TurnCMD;
|
|
textBox2.Text = Class1.Config.MessInfo;
|
|
numericUpDown1.Value = (decimal)Class1.Config.MaxMoney;
|
|
}
|
|
|
|
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
Class1.Config.TurnCMD = textBox1.Text;
|
|
Class1.Config.MessInfo = textBox2.Text;
|
|
Class1.Config.MaxMoney = (double)numericUpDown1.Value;
|
|
|
|
Util.Save(Class1.Config);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message);
|
|
}
|
|
}
|
|
|
|
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
|
{
|
|
textBox1.Text = @"转\s(?<金额>[0-9]{0,}.{0,1}[0-9]{1,})";
|
|
}
|
|
|
|
private void label3_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|