Exemplo n.º 1
0
        public async Task PingTrackerToggle(OnOff onOff)
        {
            bool success = false;

            switch (onOff)
            {
            case OnOff.On:
                success = await DepMap.TryEnable <PingTracker>();

                break;

            case OnOff.Off:
                success = await DepMap.TryDisable <PingTracker>();

                break;
            }

            var action = onOff.ToString().ToLower();

            if (!success)
            {
                await Context.ReplyAsync($":warning: The Ping Tracker is already {action}");
            }
            else
            {
                await Context.ReplyAsync($"The Ping Tracker has been turned {action}");
            }
        }
Exemplo n.º 2
0
        public void GetStationPINEnabled()
        {
            SetNotSupportedErrorCallback();

            OnOff enabled = jbc_api.GetStationPINEnabled(station_id);

            Debug.WriteLine("STATION ID:" + station_id + "ENABLED: " + enabled.ToString());
        }
Exemplo n.º 3
0
        public void GetStationLocked()
        {
            SetNotSupportedErrorCallback();

            OnOff locked = jbc_api.GetStationLocked(station_id);

            Debug.WriteLine("STATION ID:" + station_id + " LOCKED: " + locked.ToString());
        }
Exemplo n.º 4
0
 public void GetStationBeep()
 {
     if (features.DisplaySettings)
     {
         OnOff beep = jbc_api.GetStationBeep(station_id);
         Debug.WriteLine("STATION ID:" + station_id + " BEEP: " + beep.ToString());
     }
     else
     {
         Debug.WriteLine("Function not implemented for this model");
     }
 }
Exemplo n.º 5
0
 public void GetStationHelpText()
 {
     if (features.DisplaySettings)
     {
         OnOff text = jbc_api.GetStationHelpText(station_id);
         Debug.WriteLine("STATION ID:" + station_id + " HELP TEXT: " + text.ToString());
     }
     else
     {
         Debug.WriteLine("Function not implemented for this model");
     }
 }
Exemplo n.º 6
0
 public void GetStationN2Mode()
 {
     if (features.DisplaySettings)
     {
         OnOff n2_mode = jbc_api.GetStationN2Mode(station_id);
         Debug.WriteLine("STATION ID:" + station_id + " N2 MODE: " + n2_mode.ToString());
     }
     else
     {
         Debug.WriteLine("Function not implemented for this model");
     }
 }
Exemplo n.º 7
0
        /// <summary>
        /// Switch autoactivate on or off.
        /// </summary>
        /// <param name="mode">Set autoactivation <c>On</c> or <c>Off</c>. Default is <c>On</c>.</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="stringBuilder"/> is <c>null</c>.</exception>
        public static void AutoActivate(this StringBuilder stringBuilder, OnOff mode = OnOff.On)
        {
            if (stringBuilder is null)
            {
                throw new ArgumentNullException(nameof(stringBuilder));
            }

            stringBuilder.Append(Constant.Auto);
            stringBuilder.Append(Constant.Activate);
            stringBuilder.Append(Constant.Space);
            stringBuilder.Append(mode.ToString().ToLowerInvariant());
            stringBuilder.AppendNewLine();
        }
Exemplo n.º 8
0
        public void GetRemoteMode()
        {
            OnOff remote_mode = jbc_api.GetRemoteMode(station_id);

            Trace.WriteLine("REMOTE MODE: " + remote_mode.ToString());
        }
 public string SetAutoCarvePolicy(OnOff state)
 {
     return(ExecuteCommand(AMCC_3Ware_State.TW_CLI_path, TW_CLI_ParameterType.SetAutoCarvePolicy, CtlID, state.ToString().ToLower()));
 }
Exemplo n.º 10
0
        public string SetCache(OnOff state, bool quiet)
        {
            var parameter = quiet ? TW_CLI_ParameterType.UnitSetCacheQuiet : TW_CLI_ParameterType.UnitSetCache;

            return(ExecuteCommand(AMCC_3Ware_State.TW_CLI_path, parameter, CtlID, UnitID.ToString(), state.ToString().ToLower()));
        }
Exemplo n.º 11
0
 public string SetIgnoreECC(OnOff state)
 {
     return(ExecuteCommand(AMCC_3Ware_State.TW_CLI_path, TW_CLI_ParameterType.UnitSetIgnoreECC, CtlID, UnitID.ToString(), state.ToString().ToLower()));
 }