示例#1
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");
 }
示例#2
0
        private static void testSetGetCapacity(ISuperLoggingConnection conn)
        {
            uint expectedCapacity = 20000;

            conn.setCapacity(expectedCapacity);
            uint actualCapacity = conn.getCapacity();

            Console.WriteLine("Expected capacity: " + expectedCapacity + ", Actual capacity: " + actualCapacity);
            return;
        }
 private static void testSetGetCapacity(ISuperLoggingConnection conn)
 {
     uint expectedCapacity = 20000;
     conn.setCapacity(expectedCapacity);
     uint actualCapacity = conn.getCapacity();
     Console.WriteLine("Expected capacity: " + expectedCapacity + ", Actual capacity: " + actualCapacity);
     return;
 }