-
Notifications
You must be signed in to change notification settings - Fork 6
/
Ft8Auto.cs
82 lines (75 loc) · 2.84 KB
/
Ft8Auto.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using System;
using System.Runtime.InteropServices;
namespace DigiRite
{
[ComVisible(true),
/* FIXME
** If you want to modify DigiRite and simply replace the executable WriteLog invokes,
** you need do NOTHING here.
**
** If you want to add an alternative exe that WriteLog invokes, you must change
** the GUID and ProgId below and arrange for your new exe to be COM registered.
**
** If you don't want to integrate with WriteLog at all, you may ignore this
** class altogether from this project and figure out how to get DigiRite connected
** to your application your own way. Leave this class unchanged (and leave the code that
** registers it as a COM server in Program.cs) and your customized DigiRite retains
** binary compatibility such that WriteLog will find it.
**
** These are the GUID and ProgId that the DigiRite Installer msi at
** at writelog.com place in the Windows registry. If you use these, you
** replace the installed one when invoked from WriteLog
*/
Guid("4CC973B6-9BFB-3E4B-8157-E55774DD50C0"),
ProgId("DigiRite.Ft8Auto")
/* For reference:
** WriteLog uses the registry key HKEY_LOCAL_MACHINE\SOFTWARE\W5XD\WriteLog\DigitalProductIds
** (on 64b Windows, do the drill with WOW6432Node)
** Name/Value pairs under DigitialProductIds are used by WriteLog to populate its
** right mouse context in its Entry Window. The value is the COM ProgId above.
** the name populates the context menu.
** The executable invoked by using the standard COM ProgId activation process
** WriteLog expects to implement the inteface of the "ComVisible" methods below.
*/
]
public class Ft8Auto
{
[ComVisible(true)]
public void Show()
{
Program.applicationContext.CreateMainForm();
}
[ComVisible(true)]
public void CloseWindow()
{
Program.applicationContext.CloseMainWindow();
}
[ComVisible(true)]
public void AbortMessage()
{
Program.applicationContext.AbortMessage();
}
[ComVisible(true)]
public int SendMessage(String s)
{
Program.applicationContext.SendRttyMessage(s);
return 0;
}
[ComVisible(true)]
public void SetWlEntry(object wl, int idx)
{
Program.applicationContext.SetWlEntry(wl, idx);
}
[ComVisible(true)]
public string GetCurrentMode()
{
return Program.applicationContext.GetCurrentMode();
}
[ComVisible(true)]
public void SetLoggerAssemblyName(String s)
{
Program.applicationContext.SetLoggerAssemblyName(s);
}
}
}