HamBook – Blame information for rev 53
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
53 | office | 1 | using Jot; |
2 | using System; |
||
3 | using System.Collections.Generic; |
||
4 | using System.Linq; |
||
5 | using System.Text; |
||
6 | using System.Threading.Tasks; |
||
7 | using System.Windows.Forms; |
||
8 | |||
9 | namespace HamBook.Utilities |
||
10 | { |
||
11 | public static class WindowState |
||
12 | { |
||
13 | // expose the tracker instance |
||
14 | public static Tracker FormTracker = new Tracker(); |
||
15 | |||
16 | static WindowState() |
||
17 | { |
||
18 | // tell Jot how to track Window objects |
||
19 | FormTracker.Configure<Form>() |
||
20 | .Id(w => w.Name) |
||
21 | .Properties(w => new { w.Height, w.Width, w.Left, w.Top, w.WindowState }) |
||
22 | .PersistOn(nameof(Form.FormClosed)); |
||
23 | |||
24 | } |
||
25 | } |
||
26 | } |