You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.5 KiB
74 lines
2.5 KiB
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel;
|
||
|
using System.Configuration;
|
||
|
using System.Data;
|
||
|
using System.Drawing;
|
||
|
using System.Text;
|
||
|
using System.Windows.Forms;
|
||
|
using Microsoft.VisualBasic;
|
||
|
namespace ControlSystem
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Creator:Richard.liu
|
||
|
/// ��ϻ��ά��
|
||
|
/// </summary>
|
||
|
public partial class FrmDarkCasket : Form
|
||
|
{
|
||
|
private static FrmDarkCasket _formInstance;
|
||
|
|
||
|
public static FrmDarkCasket FormInstance
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
if (_formInstance == null)
|
||
|
{
|
||
|
_formInstance = new FrmDarkCasket();
|
||
|
}
|
||
|
return _formInstance;
|
||
|
}
|
||
|
set { _formInstance = value; }
|
||
|
}
|
||
|
public FrmDarkCasket()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
_formInstance = this;
|
||
|
}
|
||
|
|
||
|
private void button1_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
if (Information.IsNumeric(this.tbDarkCasketDays.Text.Trim()) == false)
|
||
|
{
|
||
|
MessageBox.Show("��ϻ���ļ��ı����������������֣�", "������ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||
|
this.tbDarkCasketDays.Focus();
|
||
|
return;
|
||
|
}
|
||
|
if (Information.IsNumeric(this.tbDarkCasketSize.Text.Trim()) == false)
|
||
|
{
|
||
|
MessageBox.Show("��ϻ���ļ���С������ֵ���������֣�", "������ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||
|
this.tbDarkCasketSize.Focus();
|
||
|
return;
|
||
|
}
|
||
|
double ssize;
|
||
|
ssize = 1048576 * Convert.ToDouble( this.tbDarkCasketSize.Text);
|
||
|
CommonClassLib.AppSettings.SetValue("DarkCasketSize", ssize.ToString());
|
||
|
CommonClassLib.AppSettings.SetValue("DarkCasketSum", this.tbDarkCasketDays.Text);
|
||
|
MessageBox.Show("�����ɹ���", "������ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||
|
this.Close();
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void FrmDarkCasket_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
//20100521
|
||
|
this.tbDarkCasketDays.Text=CommonClassLib.AppSettings.GetValue("DarkCasketSum");
|
||
|
this.tbDarkCasketSize.Text = Convert.ToString(Convert.ToDouble( CommonClassLib.AppSettings.GetValue("DarkCasketSize")) / 1048576);
|
||
|
}
|
||
|
}
|
||
|
}
|