This commit is contained in:
chikyun.kim
2018-10-10 09:33:09 +09:00
parent 7c5391a5e6
commit 68ebe71800
19 changed files with 911 additions and 434 deletions

View File

@@ -6,6 +6,7 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using StackExchange.Redis;
namespace Project
{
@@ -46,12 +47,23 @@ namespace Project
e.Cancel = true;
return;
}
//close redis
if (this.redisConnection != null && this.redisConnection.IsConnected && this.db != null)
{
this.redisConnection.Close();
this.redisConnection.Dispose();
}
Pub.log.Add("Program Close");
Pub.log.Flush();
bBW = false; //backgroundWorker
if (bw.IsBusy) bw.CancelAsync();
}
ConnectionMultiplexer redisConnection;
IDatabase db;
private void __Load(object sender, EventArgs e)
{
this.Text = Application.ProductName + " v" + Application.ProductVersion;
@@ -69,8 +81,7 @@ namespace Project
UpdateControls();
tmDisplay.Start(); //display timer
bw.RunWorkerAsync(); //background worker
Dialog.fLogin flogIn = new Dialog.fLogin();
if (flogIn.ShowDialog() != System.Windows.Forms.DialogResult.OK)
@@ -80,6 +91,11 @@ namespace Project
sbLogin.Text = string.Format("{0} {1}", FCOMMON.info.Login.no, FCOMMON.info.Login.nameK);
Pub.log.Add("Program Start");
bw.RunWorkerAsync(); //background worker
}