annotate IChunkyViewer.cs @ 0:8439bec53421

Initial commit under the GPLv3
author IBBoard <dev@ibboard.co.uk>
date Sat, 06 Oct 2018 20:00:56 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 using System;
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 using System.Collections;
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 using System.Windows.Forms;
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 using System.Threading;
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 namespace IBBoard.Relic.IChunkyViewer
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 {
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 /// <summary>
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 /// Summary description for IChunkyViewer.
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 /// </summary>
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 public class IChunkyViewer
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 {
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 private ArrayList windows;
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 public IChunkyViewer()
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 {
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 windows = new ArrayList();
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 }
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 public void CreateForm(string path)
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 {
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 Form1 frm = new Form1(path);
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 windows.Add(frm);
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 frm.ShowDialog();
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 }
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 public void RemoveForm(Form1 frm)
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 {
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 if (windows.Contains(frm))
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 {
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 windows.Remove(frm);
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 }
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 if (windows.Count==0)
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 {
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 Application.Exit();
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 }
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 }
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 /*
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 * /// <summary>
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 /// The main entry point for the application.
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 /// </summary>
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 [STAThread]
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 static void Main()
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 {
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 IChunkyViewer viewer = new IChunkyViewer();
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 viewer.CreateForm("");
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 }*/
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 }
8439bec53421 Initial commit under the GPLv3
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52 }