private static void testEnableDisable(ISuperLoggingConnection conn)
 {
     conn.disable();
     Console.WriteLine("Disabled: " + (!conn.isEnabled() ? "succeeded" : "failed"));
     conn.enable();
     Console.WriteLine("Enabled: " + (conn.isEnabled() ? "succeeded" : "failed"));
     return;
 }
Пример #2
0
 private static void testEnableDisable(ISuperLoggingConnection conn)
 {
     conn.disable();
     Console.WriteLine("Disabled: " + (!conn.isEnabled() ? "succeeded" : "failed"));
     conn.enable();
     Console.WriteLine("Enabled: " + (conn.isEnabled() ? "succeeded" : "failed"));
     return;
 }
Пример #3
0
 private void UpdateStatus()
 {
     try {
         _enabled = SuperLog.isEnabled();
         if (_enabled)
         {
             uint nCapacity = SuperLog.getCapacity();
             Status.StringValue = string.Format(
                 "Superlogging is on with a buffer size of {0} entries",
                 nCapacity);
             TxtBufferSize.IntValue = (int)nCapacity;
             pageSize = TxtBufferSize.IntValue;
         }
         else
         {
             Status.StringValue = "Superlogging is turned off. Click the button to turn it on";
         }
         BtnBufferSizeChange.Enabled = TxtBufferSize.Enabled = _enabled;
     } catch (Exception exc) {
         if (ChkAutoRefresh.StringValue == "1")
         {
             ChkAutoRefresh.StringValue = "0";
             timer.Change(-1, -1);
         }
         _enabled                    = false;
         Status.StringValue          = "Superlogging is turned off. Click the button to turn it on";
         BtnBufferSizeChange.Enabled = TxtBufferSize.Enabled = true;
         UIErrorHelper.ShowAlert(exc.Message, "Operation could not complete successfully.");
     }
     BtnOff.Title = "Turn " + (_enabled ? "OFF" : "ON");
 }