Skip to content

Commit 0b10375

Browse files
Merge pull request #16 from AngelsSoftwareOrg/develop
v1.0.0.5 - Cycle Release - LottoDataManagerSetup_v1.0.0.5_Release - Rename the Form title of Splash screen - Fix the bug wherein the "current winnings on this month" will also shows past year winnings
2 parents f8f991d + 126098e commit 0b10375

File tree

8 files changed

+17485
-17448
lines changed

8 files changed

+17485
-17448
lines changed

Forms/MainFrm.cs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using LottoDataManager.Includes.Utilities;
2424
using AngelsRepositoryLib;
2525
using LottoDataManager.Forms.Ticket;
26+
using LottoDataManager.Includes.Classes.Extensions;
2627

2728
namespace LottoDataManager
2829
{
@@ -35,24 +36,25 @@ public partial class MainForm : Form
3536
private LotteryDataWorker lotteryDataWorker;
3637
private DashboardReport dashboardReport;
3738
private ProcessingStatusLogFrm processingStatusLogFrm;
38-
private String LOG_STATUS_MODULE_NAME_WEBSCRAP = "Web Scraping";
39-
private String LOG_STATUS_MODULE_NAME_GRID_CONTENT = "Grid Content";
40-
private String LOG_STATUS_MODULE_NAME_FIELD_DETAILS = "Refreshing Field Details";
41-
private String LOG_STATUS_MODULE_NAME_WINNING_BETS = "Processing Winning Bets";
42-
private String LOG_STATUS_MODULE_NAME_DRAWN_RESULT = "Download drawn results";
39+
private String LOG_STATUS_MODULE_NAME_WEBSCRAP;
40+
private String LOG_STATUS_MODULE_NAME_GRID_CONTENT;
41+
private String LOG_STATUS_MODULE_NAME_FIELD_DETAILS;
42+
private String LOG_STATUS_MODULE_NAME_WINNING_BETS;
43+
private String LOG_STATUS_MODULE_NAME_DRAWN_RESULT;
4344
private int processingLogStatusCtr = 0;
4445

4546
public MainForm()
4647
{
4748
InitializeComponent();
4849
this.lotteryDetails = GameFactory.GetPreviousOpenGameInstance();
4950
this.processingStatusLogFrm = new ProcessingStatusLogFrm();
51+
5052
this.Text = String.Format("{0} - {1}", ResourcesUtils.GetMessage("mainf_title"), AppSettings.GetAppVersionWithPrefix());
5153
this.label1.Text = ResourcesUtils.GetMessage("mainf_labels_1");
5254
this.label3.Text = ResourcesUtils.GetMessage("mainf_labels_2");
5355
this.label4.Text = ResourcesUtils.GetMessage("mainf_labels_3");
5456
this.label5.Text = ResourcesUtils.GetMessage("mainf_labels_4");
55-
AddProcessingStatusLogs(LOG_STATUS_MODULE_NAME_WEBSCRAP, ResourcesUtils.GetMessage("mainf_labels_5"));
57+
5658
this.toolStripProcessingLogs.Text = ResourcesUtils.GetMessage("mainf_labels_46");
5759
this.tabPage1.Text = ResourcesUtils.GetMessage("mainf_labels_6");
5860
this.groupBox1.Text = ResourcesUtils.GetMessage("mainf_labels_7");
@@ -96,6 +98,13 @@ public MainForm()
9698
this.tabPageBetFilter.Text = ResourcesUtils.GetMessage("mainf_labels_49");
9799
this.tabPageDrawFilter.Text = ResourcesUtils.GetMessage("mainf_labels_50");
98100

101+
this.LOG_STATUS_MODULE_NAME_WEBSCRAP = ResourcesUtils.GetMessage("mainf_labels_51");
102+
this.LOG_STATUS_MODULE_NAME_GRID_CONTENT = ResourcesUtils.GetMessage("mainf_labels_52");
103+
this.LOG_STATUS_MODULE_NAME_FIELD_DETAILS = ResourcesUtils.GetMessage("mainf_labels_53");
104+
this.LOG_STATUS_MODULE_NAME_WINNING_BETS = ResourcesUtils.GetMessage("mainf_labels_54");
105+
this.LOG_STATUS_MODULE_NAME_DRAWN_RESULT = ResourcesUtils.GetMessage("mainf_labels_55");
106+
AddProcessingStatusLogs(LOG_STATUS_MODULE_NAME_WEBSCRAP, ResourcesUtils.GetMessage("mainf_labels_5"));
107+
99108
ReinitateLotteryServices();
100109
GenerateLotteriesGameMenu();
101110
InitializesFormContent();

Forms/SplashScreenFrm.Designer.cs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Forms/SplashScreenFrm.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using LottoDataManager.Includes;
22
using LottoDataManager.Includes.Classes;
33
using LottoDataManager.Includes.Model;
4+
using LottoDataManager.Includes.Utilities;
45
using System;
56
using System.Collections.Generic;
67
using System.ComponentModel;
@@ -35,6 +36,7 @@ public void DisposeInstance()
3536
private void SplashScreen_Load(object sender, EventArgs e)
3637
{
3738
lblVersion.Text = AppSettings.GetAppVersionWithPrefix();
39+
this.Text = ResourcesUtils.GetMessage("app_const_app_title");
3840
TestDatabaseSourceConnection();
3941
}
4042
private void TestDatabaseSourceConnection()

Forms/SplashScreenFrm.resx

Lines changed: 17441 additions & 17441 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Reflection;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Windows.Forms;
8+
9+
namespace LottoDataManager.Includes.Classes.Extensions
10+
{
11+
public static class ControlExtensions
12+
{
13+
//This is to avoid flickering on Listview
14+
public static void DoubleBuffering(this Control control, bool enable)
15+
{
16+
var method = typeof(Control).GetMethod("SetStyle", BindingFlags.Instance | BindingFlags.NonPublic);
17+
method.Invoke(control, new object[] { ControlStyles.OptimizedDoubleBuffer, enable });
18+
}
19+
}
20+
}

Includes/Database/DAO/Impl/LotteryWinningBetDaoImpl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public double GetTotalWinningsAmountThisMonth(GameMode gameMode)
133133
" WHERE a.active = true " +
134134
" AND b.game_cd = @game_cd " +
135135
" AND MONTH(target_draw_date) = MONTH(NOW()) " +
136+
" AND YEAR(target_draw_date) = YEAR(NOW()) " +
136137
" AND a.claim_status = true";
137138
command.Parameters.AddWithValue("@game_cd", (int)gameMode);
138139
command.Connection = conn;

LottoDataManager.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
<Compile Include="Includes\Classes\Comparers\AbstractSorter.cs" />
164164
<Compile Include="Includes\Classes\Comparers\ListviewIntSorter.cs" />
165165
<Compile Include="Includes\Classes\Comparers\ListviewTextSorter.cs" />
166+
<Compile Include="Includes\Classes\Extensions\ControlExtensions.cs" />
166167
<Compile Include="Includes\Classes\Generator\AbstractSequenceGenerator.cs" />
167168
<Compile Include="Includes\Classes\Generator\GeneratorParamType.cs" />
168169
<Compile Include="Includes\Classes\Generator\GeneratorType.cs" />

Resources/messages_en.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ mainf_labels_47=Date To:
104104
mainf_labels_48=Date To:
105105
mainf_labels_49=Latest Bets Filter
106106
mainf_labels_50=Latest Draw Results Filter
107+
mainf_labels_51=Web Scraping
108+
mainf_labels_52=Grid Content
109+
mainf_labels_53=Refreshing Field Details
110+
mainf_labels_54=Processing Winning Bets
111+
mainf_labels_55=Download drawn results
107112

108113
#~~~~~~~~~~~ PICK GENERATOR FORM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109114
pick_grp_gen_type=Step 1: Choose Generator Type

0 commit comments

Comments
 (0)