comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:8439bec53421
1 using System;
2 using System.Collections;
3 using System.Windows.Forms;
4 using System.Threading;
5
6 namespace IBBoard.Relic.IChunkyViewer
7 {
8 /// <summary>
9 /// Summary description for IChunkyViewer.
10 /// </summary>
11 public class IChunkyViewer
12 {
13 private ArrayList windows;
14
15 public IChunkyViewer()
16 {
17 windows = new ArrayList();
18 }
19
20 public void CreateForm(string path)
21 {
22 Form1 frm = new Form1(path);
23 windows.Add(frm);
24
25 frm.ShowDialog();
26 }
27
28 public void RemoveForm(Form1 frm)
29 {
30 if (windows.Contains(frm))
31 {
32 windows.Remove(frm);
33 }
34
35 if (windows.Count==0)
36 {
37 Application.Exit();
38 }
39 }
40
41 /*
42 * /// <summary>
43 /// The main entry point for the application.
44 /// </summary>
45 [STAThread]
46 static void Main()
47 {
48 IChunkyViewer viewer = new IChunkyViewer();
49 viewer.CreateForm("");
50 }*/
51 }
52 }