예제 #1
0
 public Observer(ObservedProcess observedProcess, SpeechSynthesizer speechSynthesizer, ObserverSettings settings)
 {
     ObservedProcess = observedProcess;
     ObservedProcess.ProcessOpened += ObservedProcess_ProcessOpened;
     ObservedProcess.ProcessExited += ObservedProcess_ProcessExited;
     SpeechSynthesizer              = speechSynthesizer;
     Title             = settings.Title;
     TargetAddress     = settings.TargetAddress;
     ValueType         = settings.ValueType;
     CustomReadSize    = settings.CustomReadSize;
     UpdateInterval    = settings.UpdateInterval;
     NotifyEnabled     = settings.NotifyEnabled;
     LogBuilder        = new StringBuilder();
     UpdateTimer       = new Timer();
     UpdateTimer.Tick += Timer_Tick;
 }
예제 #2
0
 public Observer(ObservedProcess observedProcess, SpeechSynthesizer speechSynthesizer)
     : this(observedProcess, speechSynthesizer, new ObserverSettings() { Title = "", TargetAddress = "", ValueType = (int)ReadValueType.Byte, CustomReadSize = 1, UpdateInterval = 30000, NotifyEnabled = true })
 {
 }