//<control:Button Margin = "5,0,0,0" RenderMode="{Binding RenderMode}"  IsEnabled="{Binding IsEnabled}" Padding="16,8"
        //                                 Content="默认主题风格按钮"  Icon="fa_paint_brush"   Style="{DynamicResource Button.AY.Outline3}"></control:Button>
        public void CreateTenYearList(int beginYear)
        {
            RootGrid.Children.Clear();
            GridService.SetColumns(RootGrid, "? ?");
            GridService.SetRows(RootGrid, "? ? ? ? ? ?");
            fiveBefore = beginYear - 5;
            endBefore  = beginYear + 5;
            int _1 = 0;

            for (int i = fiveBefore; i < endBefore; i++)
            {
                //创建按钮
                var _11 = CreateButtons(i);
                if (_1 > 4)
                {
                    GridService.SetRowColumn(_11, (_1 - 5) + " 1");
                }
                else
                {
                    GridService.SetRowColumn(_11, _1 + " 0");
                }
                _1++;
                RootGrid.Children.Add(_11);
            }

            Grid gridbottom = new Grid();

            Grid.SetColumnSpan(gridbottom, 2);
            Grid.SetRow(gridbottom, 5);
            RootGrid.Children.Add(gridbottom);

            GridService.SetColumns(gridbottom, "? ? ?");
            prewtenbutton = CreatePageButtons("more_ay_yearLeft", Langs.ay_Last10.Lang());
            if (isCreateLessMinValue)
            {
                prewtenbutton.IsEnabled = false;
            }
            prewtenbutton.Click += _2_Click;
            Grid.SetColumn(prewtenbutton, 0);

            var _3 = CreatePageButtons("path_ay_yearClose", Langs.share_close.Lang());

            _3.Click += _3_Click;
            Grid.SetColumn(_3, 1);


            nexttenbutton = CreatePageButtons("more_ay_yearRight", Langs.ay_Next10.Lang());
            if (isCreateLessMaxValue)
            {
                nexttenbutton.IsEnabled = false;
            }
            nexttenbutton.Click += _4_Click;


            Grid.SetColumn(nexttenbutton, 2);
            gridbottom.Children.Add(prewtenbutton);
            gridbottom.Children.Add(_3);
            gridbottom.Children.Add(nexttenbutton);
        }
Ejemplo n.º 2
0
        //int currentMonth = 1;
        public void CreatePopupList()
        {
            RootGrid.Children.Clear();

            GridService.SetColumns(RootGrid, "? ?");
            GridService.SetRows(RootGrid, "? ? ? ? ? ?");
            //currentMonth =this.Text.ToInt();
            var _11 = CreateButtons(Langs.ay_MonthName1.Lang(), 1);

            GridService.SetRowColumn(_11, "0 0");
            var _12 = CreateButtons(Langs.ay_MonthName2.Lang(), 2);

            GridService.SetRowColumn(_12, "1 0");
            var _13 = CreateButtons(Langs.ay_MonthName3.Lang(), 3);

            GridService.SetRowColumn(_13, "2 0");
            var _14 = CreateButtons(Langs.ay_MonthName4.Lang(), 4);

            GridService.SetRowColumn(_14, "3 0");
            var _15 = CreateButtons(Langs.ay_MonthName5.Lang(), 5);

            GridService.SetRowColumn(_15, "4 0");
            var _16 = CreateButtons(Langs.ay_MonthName6.Lang(), 6);

            GridService.SetRowColumn(_16, "5 0");

            var _17 = CreateButtons(Langs.ay_MonthName7.Lang(), 7);

            GridService.SetRowColumn(_17, "0 1");
            var _18 = CreateButtons(Langs.ay_MonthName8.Lang(), 8);

            GridService.SetRowColumn(_18, "1 1");
            var _19 = CreateButtons(Langs.ay_MonthName9.Lang(), 9);

            GridService.SetRowColumn(_19, "2 1");
            var _20 = CreateButtons(Langs.ay_MonthName10.Lang(), 10);

            GridService.SetRowColumn(_20, "3 1");
            var _21 = CreateButtons(Langs.ay_MonthName11.Lang(), 11);

            GridService.SetRowColumn(_21, "4 1");
            var _22 = CreateButtons(Langs.ay_MonthName12.Lang(), 12);

            GridService.SetRowColumn(_22, "5 1");

            RootGrid.Children.Add(_11);
            RootGrid.Children.Add(_12);
            RootGrid.Children.Add(_13);
            RootGrid.Children.Add(_14);
            RootGrid.Children.Add(_15);
            RootGrid.Children.Add(_16);
            RootGrid.Children.Add(_17);
            RootGrid.Children.Add(_18);
            RootGrid.Children.Add(_19);
            RootGrid.Children.Add(_20);
            RootGrid.Children.Add(_21);
            RootGrid.Children.Add(_22);
        }
        public void CreatePopupList()
        {
            RootGrid.Children.Clear();
            GridService.SetColumns(RootGrid, "? ? ? ? ? ?");

            int _1 = 0;

            for (int i = 0; i < 4; i++)
            {
                //创建按钮
                var _11 = CreateButtons(_1);
                GridService.SetRowColumn(_11, "0 " + i);
                _1 = _1 + 15;
                RootGrid.Children.Add(_11);
            }
        }
Ejemplo n.º 4
0
        public void CreatePopupList()
        {
            RootGrid.Children.Clear();

            GridService.SetColumns(RootGrid, "? ? ? ? ? ? ?");
            GridService.SetRows(RootGrid, "? ? ? ? ?");
            int _1 = 1;

            for (int j = 0; j < 5; j++)
            {
                for (int i = 0; i < 7; i++)
                {
                    if (_1 < 32)
                    {
                        var _11 = CreateButtons(_1.ToString(), _1);
                        GridService.SetRowColumn(_11, j + " " + i);
                        _1++;
                        RootGrid.Children.Add(_11);
                    }
                }
            }
        }