/[EmuXPortal]/branches/mono/EmuXPortal/Form1.cs
ViewVC logotype

Contents of /branches/mono/EmuXPortal/Form1.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 180 - (show annotations) (download)
Mon Aug 4 07:31:53 2014 UTC (5 years, 6 months ago) by william
Original Path: trunk/EmuXPortal/Form1.cs
File size: 28348 byte(s)

1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9 using EmuXPortal.Api;
10 using EmuXPortal.Logging;
11 using System.Diagnostics;
12 using System.Reflection;
13 using System.Threading;
14
15 namespace EmuXPortal
16 {
17 public partial class Form1 : Form
18 {
19 IEmuConfig CurrentSelectedRom = null;
20 PlatformControl CurrentPlatformControl = null;
21 GameControl CurrentGameControl = null;
22 logger log = new logger();
23 public Form1()
24 {
25 InitializeComponent();
26 platform_flow.Dock = DockStyle.Fill;
27 rom_flow.Dock = DockStyle.Fill;
28 log.OpenLog();
29 }
30
31 private void Form1_Load(object sender, EventArgs e)
32 {
33 Config.LoadConfig(log);
34 Config.InitializePresentationForm(log,this);
35 }
36 private void Form1_Shown(object sender, EventArgs e) { platform_flow.Visible = true; Cursor.Hide(); }
37 void platform_ctrl_LostFocus(object sender, EventArgs e)
38 {
39 PlatformControl c = sender as PlatformControl;
40 c.BorderStyle = BorderStyle.None;
41 }
42
43 void platform_ctrl_GotFocus(object sender, EventArgs e)
44 {
45 PlatformControl c = sender as PlatformControl;
46 c.BorderStyle = BorderStyle.FixedSingle;
47 CurrentPlatformControl = c;
48 }
49 void game_ctrl_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
50 {
51 GameControl c = sender as GameControl;
52
53 int changeAmount = 0;
54 int currentPosition = 0;
55 if (e.KeyCode == Keys.Up)
56 {
57 int index = 0;
58 var ctl = game_ctrl_get_selected(out index);
59 if (index == 0)
60 {
61 rom_flow.Controls[index].Select();
62 rom_flow.ScrollControlIntoView(rom_flow.Controls[index]);
63 }
64 else
65 {
66 rom_flow.Controls[index].Select();
67 rom_flow.ScrollControlIntoView(rom_flow.Controls[index]);
68 }
69 }
70 if (e.KeyCode == Keys.Down)
71 {
72 int index = 0;
73 var ctl = game_ctrl_get_selected(out index);
74 if (index == rom_flow.Controls.Count)
75 {
76 rom_flow.Controls[0].Select();
77 rom_flow.ScrollControlIntoView(rom_flow.Controls[0]);
78 }
79 else
80 {
81 rom_flow.Controls[index].Select();
82 rom_flow.ScrollControlIntoView(rom_flow.Controls[index]);
83 }
84 }
85
86 if (e.KeyCode == Keys.F && e.Modifiers.HasFlag(Keys.Control))
87 {
88 IRomConfig config = c.Tag as IRomConfig;
89 if (config == null)
90 {
91 log.WriteLine("Unable to add/remove from/to favorites (config is null): {0} [{1}]", config.RomTitle, config.RomFile);
92 }
93 else
94 {
95 var isFavorite = RomFavorite.IsFavorite(log, config);
96 if (isFavorite)
97 {
98 // add to favorites
99 log.WriteLine("Removing from favorites: {0} [{1}]", config.RomTitle, config.RomFile);
100 if (!RomFavorite.RemoveFavorite(log, config))
101 {
102 log.WriteLine("Failed to remove from favorites: {0} [{1}]", config.RomTitle, config.RomFile);
103 }
104 else
105 {
106 log.WriteLine("Removed from favorites: {0} [{1}]", config.RomTitle, config.RomFile);
107 if (config.Config.PlatformNameShort == "Favorites")
108 {
109 var parent = c.Parent;
110 if (parent != null)
111 {
112 parent.Controls.Remove(c);
113 if (parent.Controls.Count > 0)
114 {
115 var next_ctrl = parent.Controls[0];
116 if (next_ctrl != null)
117 {
118 next_ctrl.Select();
119 }
120 }
121 }
122 }
123 }
124 }
125 else
126 {
127 // add to favorites
128 log.WriteLine("Adding to favorites: {0} [{1}]", config.RomTitle, config.RomFile);
129 if (!RomFavorite.AddFavorite(log,config))
130 {
131 log.WriteLine("Failed to add to favorites: {0} [{1}]", config.RomTitle, config.RomFile);
132 }
133 else
134 {
135 log.WriteLine("Added to favorites: {0} [{1}]", config.RomTitle, config.RomFile);
136 }
137 }
138 log.WriteLine("Updateing favorites");
139 if (!RomFavorite.UpdateFavorites(log))
140 {
141 log.WriteLine("Failed to update favorites");
142 }
143 else
144 {
145 log.WriteLine("Updated favorites");
146 }
147 }
148 return; // stop processing other keys
149
150 }
151 if (e.KeyCode == Keys.Home)
152 {
153 rom_flow.Controls[0].Select();
154 rom_flow.ScrollControlIntoView(rom_flow.Controls[0]);
155 }
156 if (e.KeyCode == Keys.End)
157 {
158 rom_flow.Controls[rom_flow.Controls.Count - 1].Select();
159 rom_flow.ScrollControlIntoView(rom_flow.Controls[rom_flow.Controls.Count - 1]);
160 }
161 if (e.KeyCode == Keys.PageUp)
162 {
163 changeAmount = rom_flow.VerticalScroll.LargeChange;
164 currentPosition = rom_flow.VerticalScroll.Value;
165 if ((currentPosition - changeAmount) > rom_flow.VerticalScroll.Minimum)
166 {
167 try
168 {
169 rom_flow.VerticalScroll.Value -= changeAmount;
170 }
171 catch
172 {
173 rom_flow.Controls[0].Select();
174 rom_flow.ScrollControlIntoView(rom_flow.Controls[0]);
175 rom_flow.PerformLayout();
176 return;
177 }
178 }
179 else
180 {
181 rom_flow.Controls[0].Select();
182 rom_flow.ScrollControlIntoView(rom_flow.Controls[0]);
183 }
184 GameControl s = game_ctrl_get_last_visible();
185 s.Select();
186 rom_flow.ScrollControlIntoView(s);
187 rom_flow.PerformLayout();
188 }
189 if (e.KeyCode == Keys.PageDown)
190 {
191 changeAmount = rom_flow.VerticalScroll.LargeChange;
192 currentPosition = rom_flow.VerticalScroll.Value;
193 if ((currentPosition - changeAmount) < rom_flow.VerticalScroll.Maximum)
194 {
195 rom_flow.VerticalScroll.Value += changeAmount;
196 }
197 else
198 {
199 rom_flow.VerticalScroll.Value = rom_flow.VerticalScroll.Maximum;
200 }
201 GameControl s = game_ctrl_get_last_visible();
202 s.Select();
203 rom_flow.ScrollControlIntoView(s);
204 rom_flow.PerformLayout();
205 }
206
207 if (e.KeyCode == Keys.Enter)
208 {
209 IRomConfig config = c.Tag as IRomConfig;
210
211 Process p = new Process();
212
213 p.StartInfo.FileName = config.Config.GameExe == "" ? config.Config.EmuPath : config.Config.GameExe;
214 p.StartInfo.Arguments = config.Config.GameExeArgs == "" ? EmuConfigLoader.GetEMUOptions(log, config) : config.Config.GameExeArgs;
215 p.Start();
216
217 // minimize EmuXPortal
218 this.WindowState = FormWindowState.Minimized;
219 // wait for exit of game
220 p.WaitForExit();
221 // maximize EmuXPortal
222 this.WindowState = FormWindowState.Maximized;
223 }
224 if (e.KeyCode == Keys.Back)
225 {
226 rom_flow.Visible = false;
227 platform_flow.Visible = true;
228 }
229
230 if ((e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z) ||
231 (e.KeyCode >= Keys.D0 && e.KeyCode <= Keys.D9))
232 {
233 char t = (char)e.KeyCode;
234 GameControl ctrl = (rom_flow.GetNextControl(CurrentPlatformControl, true) as GameControl);
235 if (ctrl == null) { ctrl = (rom_flow.GetNextControl(rom_flow.Controls[0], true) as GameControl); }
236 bool found = false;
237 GameControl pc = CurrentGameControl;
238 bool wrapped = false;
239 bool not_found = true;
240 while (!found)
241 {
242 if (wrapped)
243 {
244 foreach (Control ctl in rom_flow.Controls)
245 {
246 GameControl p_ctl = ctl as GameControl; if (p_ctl.GameName.ToLower().StartsWith(t.ToString().ToLower())) { not_found = false; }
247 }
248 if (not_found) { found = true; }
249 }
250 ctrl = (rom_flow.GetNextControl(pc, true) as GameControl);
251 if (ctrl == null)
252 {
253 ctrl = rom_flow.Controls[0] as GameControl;
254 wrapped = true;
255 }
256 if (ctrl.GameName.ToLower().StartsWith(t.ToString().ToLower()))
257 {
258 rom_flow.ScrollControlIntoView(ctrl);
259 ctrl.Select();
260 found = true;
261 }
262 pc = ctrl;
263 }
264 }
265 }
266 void platform_ctrl_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
267 {
268 PlatformControl c = sender as PlatformControl;
269 int changeAmount = 0;
270 int currentPosition = 0;
271 if (e.KeyCode == Keys.Up)
272 {
273 int index = 0;
274 var ctl = platform_ctrl_get_selected(out index);
275 if (index == 0)
276 {
277 platform_flow.Controls[index].Select();
278 platform_flow.ScrollControlIntoView(platform_flow.Controls[index]);
279 }
280 else
281 {
282 platform_flow.Controls[index].Select();
283 platform_flow.ScrollControlIntoView(platform_flow.Controls[index]);
284 }
285 }
286 if (e.KeyCode == Keys.Down)
287 {
288 int index = 0;
289 var ctl = platform_ctrl_get_selected(out index);
290 if (index == platform_flow.Controls.Count)
291 {
292 platform_flow.Controls[0].Select();
293 platform_flow.ScrollControlIntoView(platform_flow.Controls[0]);
294 }
295 else
296 {
297 platform_flow.Controls[index ].Select();
298 platform_flow.ScrollControlIntoView(platform_flow.Controls[index]);
299 }
300 }
301 if (e.KeyCode == Keys.Home)
302 {
303 platform_flow.Controls[0].Select();
304 platform_flow.ScrollControlIntoView(platform_flow.Controls[0]);
305 }
306 if (e.KeyCode == Keys.End)
307 {
308 platform_flow.Controls[platform_flow.Controls.Count -1].Select();
309 platform_flow.ScrollControlIntoView(platform_flow.Controls[platform_flow.Controls.Count - 1]);
310 }
311 if (e.KeyCode == Keys.PageUp)
312 {
313 changeAmount = platform_flow.VerticalScroll.LargeChange;
314 currentPosition = platform_flow.VerticalScroll.Value;
315 if ((currentPosition - changeAmount) > platform_flow.VerticalScroll.Minimum)
316 {
317 platform_flow.VerticalScroll.Value -= changeAmount;
318 }
319 else
320 {
321 platform_flow.VerticalScroll.Value = platform_flow.VerticalScroll.Minimum;
322 }
323 PlatformControl s = platform_ctrl_get_last_visible();
324 s.Select();
325 platform_flow.ScrollControlIntoView(s);
326 platform_flow.PerformLayout();
327 }
328 if (e.KeyCode == Keys.PageDown)
329 {
330 changeAmount = platform_flow.VerticalScroll.LargeChange;
331 currentPosition = platform_flow.VerticalScroll.Value;
332 if ((currentPosition - changeAmount) < platform_flow.VerticalScroll.Maximum)
333 {
334 try
335 {
336 platform_flow.VerticalScroll.Value += changeAmount;
337 }
338 catch
339 {
340 platform_flow.Controls[0].Select();
341 platform_flow.ScrollControlIntoView(platform_flow.Controls[0]);
342 rom_flow.PerformLayout();
343 return;
344 }
345 }
346 else
347 {
348 platform_flow.Controls[0].Select();
349 platform_flow.ScrollControlIntoView(platform_flow.Controls[0]);
350 }
351 PlatformControl s = platform_ctrl_get_last_visible();
352 s.Select();
353 platform_flow.ScrollControlIntoView(s);
354 platform_flow.PerformLayout();
355 }
356 if (e.KeyCode == Keys.Enter)
357 {
358 // load this platform
359 platform_flow.Visible = false;
360 CurrentSelectedRom = c.Tag as IEmuConfig;
361 rom_flow.Visible = true;
362 rom_flow.BringToFront();
363 }
364 if (e.KeyCode == Keys.Back)
365 {
366 this.Close();
367 }
368 if ((e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z) ||
369 (e.KeyCode >= Keys.D0 && e.KeyCode <= Keys.D9))
370 {
371 char t = (char)e.KeyCode;
372 PlatformControl ctrl = (platform_flow.GetNextControl(CurrentPlatformControl, true) as PlatformControl);
373 if (ctrl == null) { ctrl = (platform_flow.GetNextControl(platform_flow.Controls[0], true) as PlatformControl); }
374 bool found = false;
375 PlatformControl pc = CurrentPlatformControl;
376 bool wrapped = false;
377 bool not_found = true;
378 while (!found)
379 {
380 if (wrapped)
381 {
382 foreach (Control ctl in platform_flow.Controls)
383 {
384 PlatformControl p_ctl = ctl as PlatformControl; if (p_ctl.PlatformName.ToLower().StartsWith(t.ToString().ToLower())) { not_found = false; }
385 }
386 if (not_found) { found = true; }
387 }
388 ctrl = (platform_flow.GetNextControl(pc, true) as PlatformControl);
389 if (ctrl == null)
390 {
391 ctrl = platform_flow.Controls[0] as PlatformControl;
392 wrapped = true;
393 }
394 if (ctrl.PlatformName.ToLower().StartsWith(t.ToString().ToLower()))
395 {
396 platform_flow.ScrollControlIntoView(ctrl);
397 ctrl.Select();
398 found = true;
399 }
400 pc = ctrl;
401 }
402 }
403 }
404
405 private void platform_flow_VisibleChanged(object sender, EventArgs e)
406 {
407 if (!platform_flow.Visible) return;
408 platform_flow.Controls.Clear();
409 platform_flow.BringToFront();
410 Stopwatch t = new Stopwatch();
411 t.Start();
412 platformWorker.RunWorkerAsync(t);
413 }
414
415 private void rom_flow_VisibleChanged(object sender, EventArgs e)
416 {
417 if (!rom_flow.Visible) return;
418 rom_flow.Controls.Clear();
419 rom_flow.BringToFront();
420 Stopwatch t = new Stopwatch();
421 t.Start();
422 gameWorker.RunWorkerAsync(t);
423 }
424
425 void game_ctrl_LostFocus(object sender, EventArgs e)
426 {
427 GameControl c = sender as GameControl;
428 c.BorderStyle = BorderStyle.None;
429 }
430
431 void game_ctrl_GotFocus(object sender, EventArgs e)
432 {
433 GameControl c = sender as GameControl;
434 c.BorderStyle = BorderStyle.FixedSingle;
435 CurrentGameControl = c;
436 }
437
438 private GameControl game_ctrl_get_last_visible()
439 {
440 GameControl s = new GameControl();
441 foreach (GameControl c in rom_flow.Controls)
442 {
443 if (c.Bounds.IntersectsWith(rom_flow.Bounds))
444 s = c;
445 }
446 return s;
447 }
448 private GameControl game_ctrl_get_selected(out int index)
449 {
450 index = rom_flow.Controls.IndexOf(CurrentGameControl);
451 return CurrentGameControl;
452 }
453 private PlatformControl platform_ctrl_get_selected(out int index)
454 {
455 index = platform_flow.Controls.IndexOf(CurrentPlatformControl);
456 return CurrentPlatformControl;
457 }
458 private PlatformControl platform_ctrl_get_last_visible()
459 {
460 PlatformControl s = new PlatformControl();
461 foreach (PlatformControl c in platform_flow.Controls)
462 {
463 if (c.Bounds.IntersectsWith(platform_flow.Bounds))
464 s = c;
465 }
466 return s;
467 }
468
469
470 #region Background Workers
471
472 private int GetFormWidth()
473 {
474 if (this.InvokeRequired)
475 {
476 return Convert.ToInt32(this.Invoke((MethodInvoker)delegate() { GetFormWidth(); }));
477 }
478 else
479 {
480 return this.Width;
481 }
482 }
483 //private void AddPlatformControl(Control c)
484 //{
485 // if (platform_flow.InvokeRequired) { platform_flow.Invoke((MethodInvoker)delegate() { AddPlatformControl(c); }); }
486 // else
487 // {
488 // platform_flow.Controls.Add(c);
489 // }
490 //}
491 //private void UpdatePlatformControls()
492 //{
493 // //if (platform_flow.InvokeRequired) { platform_flow.Invoke((MethodInvoker)delegate() { UpdatePlatformControls(); }); }
494 // //else { this.Update(); }
495 //}
496 //private void AddGameControl(Control c)
497 //{
498 // if (rom_flow.InvokeRequired) { rom_flow.Invoke((MethodInvoker)delegate() { AddGameControl(c); }); }
499 // else
500 // {
501 // rom_flow.Controls.Add(c);
502 // }
503 //}
504 //private void UpdateGameControls()
505 //{
506 // //if (rom_flow.InvokeRequired) { rom_flow.Invoke((MethodInvoker)delegate() { UpdateGameControls(); }); }
507 // //else { this.Update(); }
508 //}
509 #region gameWorker
510 private static Image DefaultGameImage = Properties.Resources.DefaultGameImage;
511 private object gameimage_lock = new object();
512 private void gameWorker_DoWork(object sender, DoWorkEventArgs e)
513 {
514 Stopwatch t = e.Argument as Stopwatch;
515 RomParser parser = new RomParser(log, CurrentSelectedRom);
516
517 ProgressBar bar = new ProgressBar();
518 if (rom_flow.InvokeRequired) { rom_flow.Invoke((MethodInvoker)delegate() { rom_flow.Controls.Add(bar); }); }
519 else { rom_flow.Controls.Add(bar); }
520 //UpdateGameControls();
521 //Application.DoEvents();
522 //Thread.Sleep(10);
523 bar.Invoke(new MethodInvoker(delegate
524 {
525 //bar.Message = "Please Wait...";
526 //bar.ShowPercentageLabel = true;
527 bar.Margin = new System.Windows.Forms.Padding(0);
528 bar.Size = new Size(GetFormWidth() - 25, 100);
529 }));
530
531 double count = 0;
532 double total_count = parser.Roms.Count;
533 foreach (IRomConfig config in parser.Roms)
534 {
535 GameControl game_ctrl = new GameControl();
536 game_ctrl.Dock = DockStyle.Top;
537 game_ctrl.Width = this.Width - 10;
538 game_ctrl.Tag = config;
539 try
540 {
541 lock (gameimage_lock)
542 {
543 game_ctrl.GameImage = config.RomImage == null ? (Image)DefaultGameImage.Clone() : (Image)config.RomImage.Clone();
544 config.ReleaseRomImageResource();
545 }
546 }
547 catch (Exception ex)
548 {
549 throw ex;
550 }
551 if (CurrentSelectedRom.PlatformNameShort == "Favorites")
552 {
553 //game_ctrl.GameName = config.RomTitle;
554 game_ctrl.GameName = RomFavorite.GetRomTitleFromConfig(config);
555 }
556 else
557 {
558 game_ctrl.GameName = config.RomTitle;
559 }
560 game_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(game_ctrl_PreviewKeyDown);
561 game_ctrl.GotFocus += new EventHandler(game_ctrl_GotFocus);
562 game_ctrl.LostFocus += new EventHandler(game_ctrl_LostFocus);
563 if (rom_flow.InvokeRequired) { rom_flow.Invoke((MethodInvoker)delegate() { rom_flow.Controls.Add(game_ctrl); }); }
564 else { rom_flow.Controls.Add(game_ctrl); }
565 //UpdateGameControls();
566 //Application.DoEvents();
567 //int percent = (int)(100.0 * (count / total_count));
568 //log.WriteLine("gameWorker_DoWork(): count={0} total={1} percent={2}", count, total_count, (int)(100.0 * (count / total_count)));
569 bar.Invoke(new MethodInvoker(delegate
570 {
571 bar.Value = (int)(100.0 * (count / total_count));
572 }));
573 count++;
574 }
575 e.Result = t;
576 parser.Dispose();
577 }
578 private void gameWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { }
579 private void gameWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
580 {
581 Stopwatch t = e.Result as Stopwatch;
582 rom_flow.Controls.RemoveAt(0);
583 rom_flow.Controls[0].Select();
584 (rom_flow.Controls[0] as GameControl).BorderStyle = BorderStyle.FixedSingle;
585 t.Stop();
586 log.WriteLine("RomParser took: {0}s to parse roms", (int)t.Elapsed.TotalSeconds);
587 }
588 #endregion
589 #region platformWorker
590 private static Image DefaultPlatformImage = Properties.Resources.DefaultPlatformImage;
591 private object platformimage_lock = new object();
592 private void platformWorker_DoWork(object sender, DoWorkEventArgs e)
593 {
594 Stopwatch t = e.Argument as Stopwatch;
595 PlatformParser parser = new PlatformParser(log, Config.RomPath);
596 double count = 0;
597 double total_count = parser.Platforms.Count;
598 ProgressBar bar = new ProgressBar();
599 if (platform_flow.InvokeRequired) { platform_flow.Invoke((MethodInvoker)delegate() { platform_flow.Controls.Add(bar); }); }
600 else { platform_flow.Controls.Add(bar); }
601 //UpdatePlatformControls();
602 //Application.DoEvents();
603 //Thread.Sleep(10);
604 bar.Invoke(new MethodInvoker(delegate
605 {
606 bar.Margin = new System.Windows.Forms.Padding(0);
607 bar.Size = new Size(GetFormWidth() - 25, 100);
608 }));
609 foreach (IEmuConfig config in parser.Platforms)
610 {
611 PlatformControl platform_ctrl = new PlatformControl();
612 platform_ctrl.Dock = DockStyle.Top;
613 platform_ctrl.Width = this.Width - 10;
614 platform_ctrl.Tag = config;
615 try
616 {
617 lock (platformimage_lock)
618 {
619 platform_ctrl.PlatformImage = config.PlatformImage == null ? (Image)DefaultPlatformImage.Clone() : (Image)config.PlatformImage.Clone();
620 config.ReleasePlatformImageResource();
621 }
622 }
623 catch (Exception ex)
624 {
625 throw ex;
626 }
627 platform_ctrl.PlatformName = config.ToString();
628 platform_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(platform_ctrl_PreviewKeyDown);
629 platform_ctrl.GotFocus += new EventHandler(platform_ctrl_GotFocus);
630 platform_ctrl.LostFocus += new EventHandler(platform_ctrl_LostFocus);
631 if (platform_flow.InvokeRequired) { platform_flow.Invoke((MethodInvoker)delegate() { platform_flow.Controls.Add(platform_ctrl); }); }
632 else { platform_flow.Controls.Add(platform_ctrl); }
633 //Application.DoEvents();
634 //int percent = (int)(100.0 * (count / total_count));
635 //log.WriteLine("platformWorker_DoWork(): count={0} total={1} percent={2}", count, total_count, (int)(100.0 * (count / total_count)));
636 bar.Invoke(new MethodInvoker(delegate
637 {
638 bar.Value = (int)(100.0 * (count / total_count));
639 }));
640 count++;
641 }
642 e.Result = t;
643 parser.Dispose();
644 }
645 private void platformWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { }
646 private void platformWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
647 {
648 Stopwatch t = e.Result as Stopwatch;
649 platform_flow.Controls.RemoveAt(0);
650 platform_flow.Controls[0].Select();
651 (platform_flow.Controls[0] as PlatformControl).BorderStyle = BorderStyle.FixedSingle;
652 log.WriteLine("PlatformParser took: {0}s to parse platforms", (int)t.Elapsed.TotalSeconds);
653 }
654 #endregion
655
656 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
657 {
658 Cursor.Show();
659 log.CloseLog();
660 }
661 #endregion
662 }
663 }

  ViewVC Help
Powered by ViewVC 1.1.22