-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileWatcherSend.cs
31 lines (26 loc) · 1.03 KB
/
FileWatcherSend.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
using System;
/**
* Demo : Sends 'Action' and 'EOwatch' to FormsFileWatcher.
* Friedhold Matz - 04.11.2017
*
*/
namespace FileWrite
{
class Program
{
static void Main(string[] args)
{
// --- sending a action from C# to Oracle Forms
string ACTION2FORMS = "C#2FORMS|Hello OracleForms|P2";
System.IO.File.WriteAllText(@"C:\Users\fmatz\AppData\Local\Temp\formswatch\forms\Action2Forms.watch", ACTION2FORMS);
// .. consuming the action ..
System.Threading.Thread.Sleep(2000);
// --- sending 'End of Watching..' from C# to Oracle Forms
string[] EOWATCHING = { "Watcher finished from C# ", DateTime.Now.ToString(), "FINISHED." };
System.IO.File.WriteAllLines(@"C:\Users\fmatz\AppData\Local\Temp\formswatch\forms\EOwatchService.watch", EOWATCHING);
// console end.
Console.WriteLine("\n--- EO Watching. <enter> ---");
Console.ReadKey();
}
}
}