void SetData()
        {
            /*CheckBoxList*/
            cblFilter.ItemsSource = Calculation.CreateContinueNumber();
            cblType1.ItemsSource  = Calculation.CreateOption(0, 1, new string[2] {
                "奇", "偶"
            });
            cblType2.ItemsSource = Calculation.CreateOption(0, 1, new string[2] {
                "大", "小"
            });
            cblType3.ItemsSource = Calculation.CreateOption(0, 1, new string[2] {
                "质", "合"
            });
            cblType4.ItemsSource = Calculation.CreateOption(0, 2, new string[3] {
                "大", "中", "小"
            });
            cblType5.ItemsSource        = Calculation.CreateContinueNumber(0, 2);
            cblType6.ItemsSource        = Calculation.CreateContinueNumber(0, 4);
            cblSumLastType1.ItemsSource = CustomOption.TwoStart_SumLastType1();
            cblSumLastType2.ItemsSource = CustomOption.TwoStart_SumLastType2();

            /*RadioButtonList*/
            Data2 = Calculation.CreateOption(1, 2, new string[2] {
                "保留", "排除"
            });
            rblFilter.ItemsSource = Data2;

            /*預設值*/
            SetDefaultValue();
        }
Exemple #2
0
        /// <summary>
        /// 給TextBlock名稱
        /// </summary>
        void Initial()
        {
            List <BaseOptions> list = CustomOption.FiveStartTab();

            foreach (var tmp in result.Values)
            {
                if (tmp is TextBlock)
                {
                    var tb   = (tmp as TextBlock);
                    var item = list.Where(x => (x.ID - 1).ToString() == tb.Name.Replace("tbType", "")).FirstOrDefault();
                    if (item != null)
                    {
                        tb.Text = item.Name;
                    }
                }
            }
        }
        /// <summary>
        /// 設定資料
        /// </summary>
        void SetData()
        {
            btnTransfer.IsEnabled         = false;
            AllConbination                = Calculation.CombinationNumber(5, 0, 9);
            cblSpecialExclude.ItemsSource = Calculation.CreateOption(1, 14, new string[14] {
                "上山", "下山", "不连", "2连", "3连", "4连", "5连", "AAAAA", "AABCD", "AABBC", "AAABB", "AAABC", "AAAAB", "ABCDE"
            });

            if (form == null)
            {
                form = new Dictionary <int, System.Windows.Controls.UserControl>();
            }
            int i = 0;

            foreach (var tmp in CustomOption.FiveStartTab())
            {
                if (tmp.ID == 1)
                {
                    form.Add(tmp.ID, new UcFiveStart1());
                }
                else if (tmp.ID == 2)
                {
                    form.Add(tmp.ID, new UcFiveStart2());
                }
                else if (tmp.ID == 11)
                {
                    form.Add(tmp.ID, new UcFiveStart3());
                }
                else if (tmp.ID == 12)
                {
                    form.Add(tmp.ID, new UcFiveStart4());
                }
                else if (tmp.ID == 13)
                {
                    form.Add(tmp.ID, new UcFiveStart5());
                }

                i = (tmp.ID > 2 && tmp.ID < 10 ? 2 : tmp.ID);
                TabItem tb = new TabItem()
                {
                    Content = (form.Where(x => x.Key == i).FirstOrDefault().Value), Header = tmp.Name
                };
                tcSettings.Items.Add(tb);
            }
        }
        void SetData()
        {
            /*CheckBoxList*/
            cblFilter.ItemsSource  = Calculation.CreateContinueNumber(0, 18, 2);
            cblOption1.ItemsSource = Calculation.ZeroOneCombination(1, '奇', '偶').OrderByDescending(x => x.Code);
            cblOption2.ItemsSource = Calculation.CreateContinueNumber(0, 2);
            cblType1.ItemsSource   = CustomOption.TwoStartSumType1();
            cblType2.ItemsSource   = CustomOption.TwoStartSumType2();
            cblType3.ItemsSource   = CustomOption.TwoStartSumType3();
            cblType4.ItemsSource   = CustomOption.TwoStartSumType4();

            /*RadioButtonList*/
            Data2 = Calculation.CreateOption(1, 2, new string[2] {
                "保留", "排除"
            });
            rblOption.ItemsSource = Data2;

            /*預設值*/
            SetDefaultValue();
        }