annotate FrmAbout.cs @ 125:42d2aa87dfa7

Re #361: Add XML export UI to GTK# * Add basic UI that works (needs improvement) * Open the dialog using Run() so that we can close it properly
author IBBoard <dev@ibboard.co.uk>
date Sat, 01 Oct 2011 14:52:39 +0100
parents b4416ca69153
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 // This file (FrmAbout.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2010 IBBoard
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 //
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 using System;
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 using Gtk;
80
9c9af2ce8c43 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
7 using IBBoard.GtkSharp.Translatable;
96
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
8 using IBBoard.Lang;
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 namespace IBBoard.WarFoundry.GUI.GTK
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 {
80
9c9af2ce8c43 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
12 public partial class FrmAbout : TranslatableDialog
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 {
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 private static FrmAbout frm;
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 public static FrmAbout GetForm()
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 {
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 if (frm == null)
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 {
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 frm = new FrmAbout();
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 }
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 return frm;
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 }
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 private FrmAbout()
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 {
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 this.Build();
96
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
29 Translation.TranslationChanged += Retranslate;
93
e40d892a2298 Fixes #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 80
diff changeset
30 Translate();
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 }
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32
96
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
33 private void Retranslate()
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
34 {
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
35 Translate();
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
36 }
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
37
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
38 public override void Dispose()
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
39 {
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
40 Translation.TranslationChanged -= Retranslate;
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
41 base.Dispose();
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
42 }
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 94
diff changeset
43
93
e40d892a2298 Fixes #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 80
diff changeset
44 protected virtual void CloseClicked(object sender, System.EventArgs e)
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 {
93
e40d892a2298 Fixes #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 80
diff changeset
46 Respond(ResponseType.Close);
94
26e4525b49cf Fixes #334: Add credits to "About" page
IBBoard <dev@ibboard.co.uk>
parents: 93
diff changeset
47 }
26e4525b49cf Fixes #334: Add credits to "About" page
IBBoard <dev@ibboard.co.uk>
parents: 93
diff changeset
48
26e4525b49cf Fixes #334: Add credits to "About" page
IBBoard <dev@ibboard.co.uk>
parents: 93
diff changeset
49 protected virtual void BttnCreditsClicked(object sender, System.EventArgs e)
26e4525b49cf Fixes #334: Add credits to "About" page
IBBoard <dev@ibboard.co.uk>
parents: 93
diff changeset
50 {
26e4525b49cf Fixes #334: Add credits to "About" page
IBBoard <dev@ibboard.co.uk>
parents: 93
diff changeset
51 FrmAboutCredits credits = new FrmAboutCredits();
26e4525b49cf Fixes #334: Add credits to "About" page
IBBoard <dev@ibboard.co.uk>
parents: 93
diff changeset
52 credits.Run();
26e4525b49cf Fixes #334: Add credits to "About" page
IBBoard <dev@ibboard.co.uk>
parents: 93
diff changeset
53 credits.Hide();
26e4525b49cf Fixes #334: Add credits to "About" page
IBBoard <dev@ibboard.co.uk>
parents: 93
diff changeset
54 }
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 }
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 }
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57