private async void Timer_Elapsed(object sender, ElapsedEventArgs e) { if (lastValue != DeckLogic.NumpadParams.Value) { lastValue = DeckLogic.NumpadParams.Value; string value = DeckLogic.NumpadParams.MaskedValue(); await SetImageAsync(imageLogic.GetNavComImage(DeckLogic.NumpadParams.Type, DeckLogic.NumpadParams.Dependant, "", value, showMainOnly: false, valid: DeckLogic.NumpadParams.MinMaxRegexValid(false))); } }
private async void Timer_Elapsed(object sender, ElapsedEventArgs e) { if (lastValue != DeckLogic.NumpadParams.Value) { lastValue = DeckLogic.NumpadParams.Value; var value = DeckLogic.NumpadParams.Value; if (value.Length > 3) { value = value.Insert(3, "."); } await SetImageAsync(imageLogic.GetNavComImage(DeckLogic.NumpadParams.Type, "", value)); } }
private async void Timer_Elapsed(object?sender, ElapsedEventArgs e) { if (lastValue != DeckLogic.NumpadParams.Value) { lastValue = DeckLogic.NumpadParams.Value; var value = DeckLogic.NumpadParams.Value; var decIndex = DeckLogic.NumpadParams.Mask.IndexOf("."); if (value.Length > decIndex && decIndex >= 0) { value = value.Insert(decIndex, "."); } await SetImageSafeAsync(imageLogic.GetNavComImage(DeckLogic.NumpadParams.Type, true, "", value, imageOnFilePath: DeckLogic.NumpadParams.ImageBackgroundFilePath, imageOnBytes: DeckLogic.NumpadParams.ImageBackground_base64)); } }
private async void Timer_Elapsed(object sender, ElapsedEventArgs e) { if (lastValue != DeckLogic.NumpadParams.Value) { lastValue = DeckLogic.NumpadParams.Value; var value = DeckLogic.NumpadParams.Value; var decIndex = DeckLogic.NumpadParams.Mask.IndexOf("."); if (value.Length > decIndex && decIndex >= 0) { value = value.Insert(decIndex, "."); } await SetImageAsync(imageLogic.GetNavComImage(DeckLogic.NumpadParams.Type, true, "", value)); } }
private async void Timer_Elapsed(object sender, ElapsedEventArgs e) { if (lastValue != DeckLogic.NumpadParams.Value) { lastValue = DeckLogic.NumpadParams.Value; var value = DeckLogic.NumpadParams.Value; var decIndex = DeckLogic.NumpadParams.Mask.IndexOf("."); if (value.Length > decIndex && decIndex >= 0) { value = value.Insert(decIndex, "."); } try { await SetImageAsync(imageLogic.GetNavComImage(DeckLogic.NumpadParams.Type, true, "", value, imageOnFilePath: DeckLogic.NumpadParams.ImageBackgroundFilePath, imageOnBytes: DeckLogic.NumpadParams.ImageBackground_base64)); } catch (WebSocketException) { // Ignore as we can't really do anything here } } }