コード例 #1
0
        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)));
            }
        }
コード例 #2
0
        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));
            }
        }
コード例 #3
0
        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));
            }
        }
コード例 #4
0
        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));
            }
        }
コード例 #5
0
        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
                }
            }
        }