/// <summary> /// Gets the QCRanges by channel and level /// </summary> /// <param name="channel"></param> /// <param name="level"></param> /// <returns></returns> public QCRanges getQCLevel(ChannelEnum channel, short level) { short index = (short)(channel - 1); switch (level) { case 1: if (QCLevel1.Count > (short)channel) { return(QCLevel1[index]); } break; case 2: { if (QCLevel2.Count > (short)channel) { return(QCLevel2[index]); } break; } default: if (QCLevel3.Count > (short)channel) { return(QCLevel3[index]); } break; } return(null); }
public void SetInstrument(ProgramEnum anInstrument, ChannelEnum aChannel) { if (MIDISettings.instance.playmakerSettings.midiOut) { midiOutHelper.SetInstrument(anInstrument, GetMidiChannel()); } }
public ChannelPokemon(GenerationEnum gen, ChannelEnum chid, int start, int end, List <int> nonspawneable) { ChId = chid; StartIndex = start; EndIndex = end; NonSpawneablePokemons = nonspawneable; }
public static int SetInstrument(ProgramEnum anInstrument, ChannelEnum aChannel = ChannelEnum.C0) { if (aChannel == ChannelEnum.None) { return(0); } return(SetInstrument((int)anInstrument, (int)aChannel)); }
public static int SendControl(ControllerEnum aControl, int aValue, ChannelEnum aChannel = ChannelEnum.C0) { if (aChannel == ChannelEnum.None && aControl != ControllerEnum.None) { return(0); } return(SendControl((int)aControl, aValue, (int)aChannel)); }
public static int Pedal(PedalEnum aPedal, int aValue, ChannelEnum aChannel = ChannelEnum.C0) { if (aChannel == ChannelEnum.None) { return(0); } return(Pedal((int)aPedal, aValue, (int)aChannel)); }
public Notification(int?notificationID, int loanID, Loan loan, DateTime when, string message, ChannelEnum channel) { NotificationID = notificationID; LoanID = loanID; Loan = loan; When = when; Message = message; Channel = channel; }
/// <summary> /// Returns the measurable ranges by channel /// </summary> /// <param name="channel">ChannelEnum - Channel Number</param> /// <returns></returns> public Range getMeasureRange(ChannelEnum channel) { switch (channel) { case ChannelEnum.Channel1: return(Chan1Ranges); case ChannelEnum.Channel2: return(Chan2Ranges); case ChannelEnum.Channel3: return(Chan3Ranges); } return(null); }
private void Add(string sender, string message, ChatType chatType, ChannelEnum? channel = null) { var time = DateTime.Now.ToString("HH:mm:ss"); var rgx = new Regex("<[^>]+>"); message = rgx.Replace(message, ""); message = WebUtility.HtmlDecode(message); if (string.IsNullOrWhiteSpace(message)) { return; } if (_chat.Count == _maxMessage) { _chat.RemoveFirst(); } var chatMessage = new ChatMessage(sender, message, chatType, channel, time); _chat.AddLast(chatMessage); if (NetworkController.Instance.EntityTracker?.MeterUser == null) return; if (chatType == ChatType.Whisper && NetworkController.Instance.EntityTracker.MeterUser.Name != sender && (BasicTeraData.Instance.WindowData.ShowAfkEventsIngame || !TeraWindow.IsTeraActive())) { NetworkController.Instance.FlashMessage = NotifyProcessor.Instance.DefaultNotifyAction(LP.Whisper +": "+sender, message); } if (chatType != ChatType.Whisper && NetworkController.Instance.EntityTracker.MeterUser.Name != sender && (BasicTeraData.Instance.WindowData.ShowAfkEventsIngame || !TeraWindow.IsTeraActive()) && message.Contains("@"+ NetworkController.Instance.EntityTracker.MeterUser.Name)) { NetworkController.Instance.FlashMessage = NotifyProcessor.Instance.DefaultNotifyAction( LP.Chat +": " + sender, message); } if ((chatType == ChatType.PrivateChannel || (chatType == ChatType.Normal && (channel == ChannelEnum.Group || channel == ChannelEnum.Guild || channel == ChannelEnum.Raid))) && (BasicTeraData.Instance.WindowData.ShowAfkEventsIngame || !TeraWindow.IsTeraActive()) && message.Contains("@@")) { NetworkController.Instance.FlashMessage = NotifyProcessor.Instance.DefaultNotifyAction("Wake up, "+ NetworkController.Instance.EntityTracker.MeterUser.Name, "Wake up, "+ NetworkController.Instance.EntityTracker.MeterUser.Name); } }
/// <summary> /// Initializes a new instance of the <see cref="WebhookSms" /> class. /// </summary> /// <param name="url">The url to send the Events. (required).</param> /// <param name="channel">The channel of the webhook. (required).</param> /// <param name="actions">A list of the actions to capture..</param> public WebhookSms(string url = default(string), ChannelEnum channel = default(ChannelEnum), List <ActionsEnum> actions = default(List <ActionsEnum>)) { // to ensure "url" is required (not null) if (url == null) { throw new InvalidDataException("url is a required property for WebhookSms and cannot be null"); } else { this.Url = url; } // to ensure "channel" is required (not null) if (channel == null) { throw new InvalidDataException("channel is a required property for WebhookSms and cannot be null"); } else { this.Channel = channel; } this.Actions = actions; }
/// <summary> /// This method sets the properties within the request that are necessary /// for authentication of the request. /// </summary> /// <param name="websiteKey"></param> /// <param name="apiKey"></param> /// <param name="isLive"></param> /// <returns> An AuthenticatedRequest</returns> public AuthenticatedRequest Authenticate(string websiteKey, string apiKey, bool isLive, CultureInfo culture, ChannelEnum channel = ChannelEnum.Web) { WebsiteKey = websiteKey; ApiKey = apiKey; IsLive = isLive; Culture = culture; Channel = channel; var valuesUsedByClient = new string[] { $"websiteKey: {websiteKey}", $"apiKey: {apiKey}", $"isLive: {isLive}", $"culture: {culture}", $"channel: {channel}", }; //logging BuckarooSdkLogger.AddProcessLogging(Messages.RequestAuthenticated(valuesUsedByClient)); BuckarooSdkLogger.AddWarningLogging(Messages.CheckSecretKey(apiKey)); return(new AuthenticatedRequest(this)); }
public PointD[] GetData(ChannelEnum channel) { QuantAsylum.QA401.PointD[] dataIn; PointD[] dataOut; switch (channel) { case ChannelEnum.Left: dataIn = Qa401.GetData(ChannelType.LeftIn); break; case ChannelEnum.Right: dataIn = Qa401.GetData(ChannelType.RightIn); break; default: throw new ArgumentException("Invalid arguement in GetData()"); } dataOut = new PointD[dataIn.Length]; return(dataOut = MarshallToPointD(dataIn)); }
public void SendControl(ControllerEnum aControl, int aValue, ChannelEnum aChannel = ChannelEnum.C0) { SendShortMessage((int)aChannel + (int)CommandEnum.Controller, (int)aControl, aValue); }
public PointD[] GetData(ChannelEnum channel) { return(Qa401.GetData(channel)); }
public static int NoteOff(NoteEnum aNote, AccidentalEnum anAccidental, OctaveEnum anOctave, ChannelEnum aChannel = ChannelEnum.C0) { if (aChannel == ChannelEnum.None) { return(0); } int noteIndex = ((int)aNote + (int)anAccidental + ((int)(anOctave == OctaveEnum.None ? OctaveEnum.Octave4 : anOctave) * 12) + 24); return(NoteOff(noteIndex, (int)aChannel)); }
public PointD[] GetData(ChannelEnum channel) { throw new NotImplementedException(); }
public void SetInstrument(ProgramEnum anInstrument, ChannelEnum aChannel = ChannelEnum.C0) { SendShortMessage((int)aChannel + (int)CommandEnum.ProgramChange, (int)anInstrument, 0); }
public void NoteOff(NoteEnum aNote, AccidentalEnum anAccidental, OctaveEnum anOctave, ChannelEnum aChannel = ChannelEnum.C0) { int noteIndex = ((int)aNote + (int)anAccidental + ((int)(anOctave == OctaveEnum.None ? OctaveEnum.Octave4 : anOctave) * 12) + 24); NoteOff(noteIndex, (int)aChannel); }
public void Pedal(PedalEnum aPedal, int aValue, ChannelEnum aChannel = ChannelEnum.C0) { SendShortMessage((int)aChannel + (int)CommandEnum.Controller, (int)aPedal, aValue); }
public static void NoteDispatch(NoteEnum aNote, AccidentalEnum anAccidental, OctaveEnum anOctave, float aDuration, float aDelay = 0f, int aVolume = 80, ChannelEnum aChannel = ChannelEnum.C0) { if (aChannel == ChannelEnum.None) { return; } int noteIndex = ((int)aNote + (int)anAccidental + ((int)(anOctave == OctaveEnum.None ? OctaveEnum.Octave4 : anOctave) * 12) + 24); NoteDispatch(noteIndex, aDuration, aDelay, aVolume, (int)aChannel); }