コード例 #1
0
        private void OnHorizontalDownValueChange(UsefulValueChangeArgs args)
        {
            int rangeXStart, rangeXEnd;
            int rangeYStart, rangeYEnd;

            rangeYStart = verticalLeft.Value;
            rangeYEnd   = verticalRight.Value + 1;
            if (args.CurrentValue < (horizontalUp.Value - 1))
            {
                horizontalUp.OnUsefullValueChange -= OnHorizontalUpValueChange;
                horizontalUp.Value = args.CurrentValue + 1;
                horizontalUp.OnUsefullValueChange += OnHorizontalUpValueChange;
            }
            rangeXStart = horizontalUp.Value;

            if (args.CurrentValue < args.PreviousValue)
            {
                if ((args.PreviousValue + 1) < rangeXStart)
                {
                    return;
                }
                rangeXStart = Math.Max(args.CurrentValue + 1, rangeXStart);
                rangeXEnd   = args.PreviousValue + 1;
                if (rbUnionSliders.Checked)
                {
                    HeatMapLayout.ChangeLayoutRegionsToNormal(rangeXStart, rangeXEnd, 1, (int)sbHMAxesDivisionFactor.Value + 1);
                }
                else
                {
                    HeatMapLayout.ChangeLayoutRegionsToNormal(rangeXStart, rangeXEnd, rangeYStart, rangeYEnd);
                }
            }
            else
            {
                if ((args.CurrentValue + 1) < rangeXStart)
                {
                    return;
                }
                rangeXStart = Math.Max(args.PreviousValue + 1, rangeXStart);
                rangeXEnd   = args.CurrentValue + 1;

                if (rbUnionSliders.Checked)
                {
                    HeatMapLayout.ChangeLayoutRegionsToIncludeorExlcude(rangeXStart, rangeXEnd, 1, (int)sbHMAxesDivisionFactor.Value + 1);
                }
                else
                {
                    HeatMapLayout.ChangeLayoutRegionsToIncludeorExlcude(rangeXStart, rangeXEnd, rangeYStart, rangeYEnd);
                }
            }
        }
コード例 #2
0
        private void OnVerticaltLeftValueChange(UsefulValueChangeArgs args)
        {
            int rangeXStart, rangeXEnd;
            int rangeYStart, rangeYEnd;

            rangeXStart = horizontalUp.Value;
            rangeXEnd   = horizontalDown.Value + 1;
            if (args.CurrentValue > (verticalRight.Value + 1))
            {
                verticalRight.OnUsefullValueChange -= OnVerticalRightValueChange;
                verticalRight.Value = args.CurrentValue - 1;
                verticalRight.OnUsefullValueChange += OnVerticalRightValueChange;
            }
            rangeYEnd = verticalRight.Value + 1;

            if (args.CurrentValue > args.PreviousValue)
            {
                if (args.PreviousValue > rangeYEnd)
                {
                    return;
                }
                rangeYStart = args.PreviousValue;
                rangeYEnd   = Math.Min(args.CurrentValue, rangeYEnd);
                if (rbUnionSliders.Checked)
                {
                    HeatMapLayout.ChangeLayoutRegionsToNormal(1, (int)sbHMAxesDivisionFactor.Value + 1, rangeYStart, rangeYEnd);
                }
                else
                {
                    HeatMapLayout.ChangeLayoutRegionsToNormal(rangeXStart, rangeXEnd, rangeYStart, rangeYEnd);
                }
            }
            else
            {
                if (args.CurrentValue > rangeYEnd)
                {
                    return;
                }
                rangeYStart = args.CurrentValue;
                rangeYEnd   = Math.Min(args.PreviousValue, rangeYEnd);
                if (rbUnionSliders.Checked)
                {
                    HeatMapLayout.ChangeLayoutRegionsToIncludeorExlcude(1, (int)sbHMAxesDivisionFactor.Value + 1, rangeYStart, rangeYEnd);
                }
                else
                {
                    HeatMapLayout.ChangeLayoutRegionsToIncludeorExlcude(rangeXStart, rangeXEnd, rangeYStart, rangeYEnd);
                }
            }
        }
コード例 #3
0
        private void rbIntersectionSliders_CheckedChanged(object sender, EventArgs e)
        {
            int rangeXStart, rangeXEnd;
            int rangeYStart, rangeYEnd;

            rangeXStart = horizontalUp.Value;
            rangeXEnd   = horizontalDown.Value + 1;

            rangeYStart = verticalLeft.Value;
            rangeYEnd   = verticalRight.Value + 1;

            if (rbUnionSliders.Checked)
            {
                HeatMapLayout.ChangeLayoutRegionsToIncludeorExlcude(1, (int)sbHMAxesDivisionFactor.Value + 1, rangeYStart, rangeYEnd);
                HeatMapLayout.ChangeLayoutRegionsToIncludeorExlcude(rangeXStart, rangeXEnd, 1, (int)sbHMAxesDivisionFactor.Value + 1);
            }
            else
            {
                HeatMapLayout.ChangeLayoutRegionsToNormal(1, (int)sbHMAxesDivisionFactor.Value + 1, rangeYStart, rangeYEnd);
                HeatMapLayout.ChangeLayoutRegionsToNormal(rangeXStart, rangeXEnd, 1, (int)sbHMAxesDivisionFactor.Value + 1);
                HeatMapLayout.ChangeLayoutRegionsToIncludeorExlcude(rangeXStart, rangeXEnd, rangeYStart, rangeYEnd);
            }
        }