@@ -75,7 +75,9 @@ private void RafadexAutoUpdate600IQ()
75
75
catch ( Exception )
76
76
{
77
77
Console . WriteLine ( "sp0ok3r.tk down :c" ) ;
78
- InfoForm . InfoHelper . CustomMessageBox . Show ( "Alert" , "sp0ok3r.tk down :c. Try https://github.com/sp0ok3r/" ) ;
78
+ InfoForm . InfoHelper . CustomMessageBox . Show ( "Alert" , "sp0ok3r.tk down. Try https://github.com/sp0ok3r/" ) ;
79
+ Process . Start ( "https://github.com/sp0ok3r/ChatLogger/releases" ) ;
80
+ Application . Exit ( ) ;
79
81
}
80
82
}
81
83
@@ -113,14 +115,28 @@ public Main()
113
115
[ Obsolete ]
114
116
private void Main_Shown ( object sender , EventArgs e )
115
117
{
116
- RafadexAutoUpdate600IQ ( ) ;
118
+ var Settingslist = JsonConvert . DeserializeObject < ChatLoggerSettings > ( File . ReadAllText ( Program . SettingsJsonFile ) ) ;
119
+
120
+
121
+ DateTime now = DateTime . Now ;
122
+ var aa = Settingslist . LastTimeCheckedUpdate . Length == 0 ;
123
+ if ( Settingslist . LastTimeCheckedUpdate == null || Settingslist . LastTimeCheckedUpdate . Length == 0 )
124
+ {
125
+ Settingslist . LastTimeCheckedUpdate = now . ToString ( ) ;
126
+ }
127
+
128
+ DateTime old = DateTime . Parse ( Settingslist . LastTimeCheckedUpdate ) ;
129
+ if ( Settingslist . LastTimeCheckedUpdate . Length > 0 && ( now - old ) . TotalDays > 14 ) //check for update 14 days later
130
+ {
131
+ RafadexAutoUpdate600IQ ( ) ;
132
+ }
133
+ File . WriteAllText ( Program . SettingsJsonFile , JsonConvert . SerializeObject ( Settingslist , Formatting . Indented ) ) ;
134
+
117
135
System . Windows . Forms . Timer t = new System . Windows . Forms . Timer ( ) ;
118
136
t . Tick += new EventHandler ( Trolha_Tick ) ;
119
137
t . Interval = 2000 ;
120
138
t . Start ( ) ;
121
-
122
- var Settingslist = JsonConvert . DeserializeObject < ChatLoggerSettings > ( File . ReadAllText ( Program . SettingsJsonFile ) ) ;
123
-
139
+
124
140
combox_Colors . SelectedIndex = Settingslist . startupColor ;
125
141
//
126
142
if ( Settingslist . Separator . Length > 0 )
@@ -183,6 +199,7 @@ private void Main_Shown(object sender, EventArgs e)
183
199
184
200
public void RefreshAccountList ( )
185
201
{
202
+ int i = 0 ;
186
203
AccountsList_Grid . Rows . Clear ( ) ;
187
204
var list = JsonConvert . DeserializeObject < RootObject > ( File . ReadAllText ( Program . AccountsJsonFile ) ) . Accounts ;
188
205
foreach ( var a in list . OrderByDescending ( x => x . LastLoginTime ) )
@@ -196,6 +213,11 @@ public void RefreshAccountList()
196
213
string [ ] row = { a . username , ( a . SteamID ) . ToString ( ) , ( LoginK ) . ToString ( ) } ;
197
214
AccountsList_Grid . Rows . Add ( row ) ;
198
215
216
+ if ( a . password . Length != 0 )
217
+ {
218
+ AccountsList_Grid . Rows [ i ] . Cells [ 0 ] . Style . ForeColor = Color . White ;
219
+ }
220
+ i ++ ;
199
221
}
200
222
Acc_ScrollBar . Maximum = AccountsList_Grid . Rows . Count ;
201
223
AccountsList_Grid . ClearSelection ( ) ;
@@ -244,7 +266,7 @@ public static void LoginusersVDF_ToFile()
244
266
245
267
dynamic volvo = VdfConvert . Deserialize ( File . ReadAllText ( SteamPath . SteamLocation + @"\config\loginusers.vdf" ) ) ;
246
268
VToken v2 = volvo . Value ;
247
- return v2 . Children ( ) . Select ( child => new User2Json . SteamLoginUsers ( child ) ) . Where ( user => user . RememberPassword ) . OrderByDescending ( user => user . LastLoginTime ) . ToList ( ) ;
269
+ return v2 . Children ( ) . Select ( child => new SteamLoginUsers ( child ) ) . OrderByDescending ( user => user . LastLoginTime ) . ToList ( ) ;
248
270
}
249
271
250
272
@@ -256,11 +278,11 @@ private void Form1_Load(object sender, EventArgs e)
256
278
File . WriteAllText ( Program . AccountsJsonFile , DefaultJson ) ;
257
279
}
258
280
259
- try // Saved some gamers (900-10)iq
281
+ try // Saved some gamers
260
282
{
261
283
LoginusersVDF_ToFile ( ) ;
262
284
}
263
- catch ( DirectoryNotFoundException )
285
+ catch ( Exception x )
264
286
{
265
287
Console . WriteLine ( "Directory not found, but starting anyway..." ) ;
266
288
}
0 commit comments