Exemplo n.º 1
0
        private void UpdateExampleBh()
        {
            VerticalLogaTable LogaTable = VerticalLogaManager.GetLoga(FontSizeSlider.Value);

            if (LogaTable.CertaintyLevel == 0)
            {
                var j = Dispatcher.RunIdleAsync((x) => { UpdateExampleBh(); });
                return;
            }

            BlockHeightSlider.Value = LogaTable.BlockHeight;
            BlockHeightInput.Text   = LogaTable.BlockHeight.ToString();

            double qd   = Math.Round(0.25 * FontSizeSlider.Value, 2);
            double Low  = LogaTable.Low;
            double High = LogaTable.High;

            if ((High - Low) < qd)
            {
                Low  = LogaTable.BlockHeight - qd;
                High = LogaTable.BlockHeight + qd;
            }

            BlockHeightSlider.Minimum       = Low;
            BlockHeightSlider.Maximum       = High;
            BlockHeightSlider.StepFrequency = 0.01 * (High - Low);
        }
Exemplo n.º 2
0
        private void BlockHeightSlider_PointerCaptureLost(object sender, PointerRoutedEventArgs e = null)
        {
            NeedRedraw = true;

            VerticalLogaTable LogaTable = VerticalLogaManager.GetLoga(FontSizeSlider.Value);

            LogaTable.Override(BlockHeightSlider.Value);

            double BlockHeight = GRConfig.ContentReader.BlockHeight;

            if (BlockHeightSlider.Value != BlockHeight)
            {
                VerticalLogaManager.Destroy(BlockHeight);

                GRConfig.ContentReader.BlockHeight = BlockHeightSlider.Value;
                BlockHeightInput.Text = BlockHeightSlider.Value.ToString();

                UpdateExampleFs();
            }
        }