Horizon – Diff between revs 1 and 8

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 1 Rev 8
1 using System; 1 using System;
2 using System.Windows.Forms; 2 using System.Windows.Forms;
3 using Horizon.Utilities; 3 using Horizon.Utilities;
4   4  
5 namespace Horizon.Snapshots 5 namespace Horizon.Snapshots
6 { 6 {
7 public partial class SnapshotNoteForm : Form 7 public partial class SnapshotNoteForm : Form
8 { 8 {
9 #region Private Delegates, Events, Enums, Properties, Indexers and Fields 9 #region Private Delegates, Events, Enums, Properties, Indexers and Fields
10   10  
11 private readonly SnapshotManagerForm _snapshotManagerForm; 11 private readonly SnapshotManagerForm _snapshotManagerForm;
12   12  
13 #endregion 13 #endregion
14   14  
15 #region Public Events & Delegates 15 #region Public Events & Delegates
16   16  
17 public event EventHandler<SaveNoteEventArgs> SaveNote; 17 public event EventHandler<SaveNoteEventArgs> SaveNote;
18   18  
19 #endregion 19 #endregion
20   20  
21 #region Constructors, Destructors and Finalizers 21 #region Constructors, Destructors and Finalizers
22   22  
23 public SnapshotNoteForm() 23 public SnapshotNoteForm()
24 { 24 {
25 InitializeComponent(); 25 InitializeComponent();
26 Utilities.WindowState.FormTracker.Track(this); -  
27 } 26 }
28   27  
29 public SnapshotNoteForm(SnapshotManagerForm snapshotManagerForm, SnapshotPreview snapshotPreview) : this() 28 public SnapshotNoteForm(SnapshotManagerForm snapshotManagerForm, SnapshotPreview snapshotPreview) : this()
30 { 29 {
31 _snapshotManagerForm = snapshotManagerForm; 30 _snapshotManagerForm = snapshotManagerForm;
32 _snapshotManagerForm.PreviewRetrieved += SnapshotManagerForm_PreviewRetrieved; 31 _snapshotManagerForm.PreviewRetrieved += SnapshotManagerForm_PreviewRetrieved;
33   32  
34 richTextBox1.InvokeIfRequired(richTextBox => { richTextBox.Text = snapshotPreview.Note; }); 33 richTextBox1.InvokeIfRequired(richTextBox => { richTextBox.Text = snapshotPreview.Note; });
35 } 34 }
36   35  
37 /// <summary> 36 /// <summary>
38 /// Clean up any resources being used. 37 /// Clean up any resources being used.
39 /// </summary> 38 /// </summary>
40 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 39 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
41 protected override void Dispose(bool disposing) 40 protected override void Dispose(bool disposing)
42 { 41 {
43 if (disposing && components != null) 42 if (disposing && components != null)
44 { 43 {
45 components.Dispose(); 44 components.Dispose();
46 } 45 }
47   46  
48 _snapshotManagerForm.PreviewRetrieved -= SnapshotManagerForm_PreviewRetrieved; 47 _snapshotManagerForm.PreviewRetrieved -= SnapshotManagerForm_PreviewRetrieved;
49   48  
50 base.Dispose(disposing); 49 base.Dispose(disposing);
51 } 50 }
52   51  
53 #endregion 52 #endregion
54   53  
55 #region Event Handlers 54 #region Event Handlers
-   55 private void SnapshotNoteForm_Load(object sender, EventArgs e)
-   56 {
-   57 Utilities.WindowState.FormTracker.Track(this);
56   58 }
57 private void SnapshotManagerForm_PreviewRetrieved(object sender, PreviewRetrievedEventArgs e) 59 private void SnapshotManagerForm_PreviewRetrieved(object sender, PreviewRetrievedEventArgs e)
58 { 60 {
59 richTextBox1.InvokeIfRequired(richTextBox => { richTextBox.Text = e.SnapshotPreview.Note; }); 61 richTextBox1.InvokeIfRequired(richTextBox => { richTextBox.Text = e.SnapshotPreview.Note; });
60 } 62 }
61   63  
62 private void Button1_Click(object sender, EventArgs e) 64 private void Button1_Click(object sender, EventArgs e)
63 { 65 {
64 richTextBox1.InvokeIfRequired(richTextBox => 66 richTextBox1.InvokeIfRequired(richTextBox =>
65 { 67 {
66 SaveNote?.Invoke(this, new SaveNoteEventArgs(richTextBox.Text)); 68 SaveNote?.Invoke(this, new SaveNoteEventArgs(richTextBox.Text));
67 }); 69 });
68 } 70 }
69   71  
70 private void Button2_Click(object sender, EventArgs e) 72 private void Button2_Click(object sender, EventArgs e)
71 { 73 {
72 Close(); 74 Close();
73 } 75 }
74   76  
75 #endregion 77 #endregion
-   78  
-   79  
76 } 80 }
77 } 81 }
78   82  
79
Generated by GNU Enscript 1.6.5.90.
83
Generated by GNU Enscript 1.6.5.90.
80   84  
81   85  
82   86