Exemplo n.º 1
0
        private bool UpdateUI()
        {
            IsMaskVisible = false;

            //初始化颜色
            if (!LoadingMain(false))
            {
                Application.Current.Shutdown();
            }

            //版本号
            Versionon.Text = "Version - " + stVersion;

            //刷新工具列表
            UpdateList.ItemsSource = listall;

            //工具列表样式
            this.UpdateList.Foreground = baseColor.Fg;
            this.UpdateList.FontFamily = baseColor.Fonts;
            this.UpdateList.FontSize   = 14;

            //版本号样式
            this.Versionon.Foreground = baseColor.Fg;
            this.Versionon.FontFamily = baseColor.Fonts;
            this.Versionon.FontSize   = 12;

            //按钮样式
            this.Feedback.Foreground   = baseColor.FontM;
            this.Feedback.FontFamily   = baseColor.Fonts;
            this.Feedback.FontSize     = 14;
            this.OpenButton.Foreground = baseColor.FontM;
            this.OpenButton.Background = baseColor.Main;
            this.B1.Foreground         = baseColor.Fg;
            this.B2.Foreground         = baseColor.Fg;
            this.TopIcon.Background    = baseColor.Main;
            this.TopIcon.Foreground    = baseColor.FontM;
            ButtonHelper.SetHoverBrush(TopIcon, baseColor.Main);
            ButtonHelper.SetClickCoverOpacity(TopIcon, 1);

            //初始化卡片颜色
            WindowXCaption.SetBackground(this, baseColor.Main);
            WindowXCaption.SetForeground(this, baseColor.FontM);

            CD1.Background = baseColor.Card;
            CD2.Background = baseColor.Card;
            SH1.Background = baseColor.Card;

            SH1.Foreground                    = baseColor.Font;
            UpdateList.Background             = baseColor.Tran;
            Versionon.Foreground              = baseColor.Fg;
            UpdateList.ContextMenu.Background = baseColor.Card;
            UpdateList.ContextMenu.Foreground = baseColor.Fg;
            ContextMenuHelper.SetShadowColor(UpdateList.ContextMenu, baseColor.DBg.Color);

            BorderBut.Background  = baseColor.DBg;
            BorderTop.Background  = baseColor.Main;
            BorderTop1.Background = baseColor.Main;
            BorderTop2.Background = baseColor.Main;

            BG.BeginInit();
            BG.Source = baseColor.Bgp;
            BG.EndInit();
            SBG.BeginInit();
            SBG.Source = baseColor.Bgps;
            SBG.EndInit();

            //加载主页
            PageMain main = new PageMain();

            Page.Content = new Frame()
            {
                Content = main
            };

            return(true);
        }
Exemplo n.º 2
0
        public KillSTL()
        {
            InitializeComponent();
            Height  = 500;
            Topmost = true;

            this.T20.Text = "这就是一个超级简单的、超级普通的、超级正常的养成对战类回合制文字游戏 / ?,灵感来自STL。同时这也是SSTB内涵的第一个游戏为主的彩蛋。";
            this.T19.Text = "相杀象征相爱\nBy Stapx Steve [ 林槐 ] @2019 / 版权所有";

            setTitle(version);
            this.T2.Text  = "Version - " + version;
            this.T18.Text = "Version - " + version;

            WindowXCaption.SetBackground(this, baseColora.Main);
            WindowXCaption.SetForeground(this, baseColora.FontM);

            BG.BeginInit();
            BG.Source = baseColora.Bgpa;
            BG.EndInit();
            BG1.BeginInit();
            BG1.Source = baseColora.Bgpa;
            BG1.EndInit();
            BG2.BeginInit();
            BG2.Source = baseColora.Bgpa;
            BG2.EndInit();

            this.TT.Foreground = baseColora.Main;

            this.T.Foreground   = baseColora.Fg;
            this.T1.Foreground  = baseColora.Fg;
            this.T2.Foreground  = baseColora.Fg;
            this.T3.Foreground  = baseColora.Fg;
            this.T4.Foreground  = baseColora.Fg;
            this.T5.Foreground  = baseColora.Fg;
            this.T6.Foreground  = baseColora.Fg;
            this.T7.Foreground  = baseColora.Fg;
            this.T8.Foreground  = baseColora.Fg;
            this.T9.Foreground  = baseColora.Fg;
            this.T10.Foreground = baseColora.Fg;
            this.T11.Foreground = baseColora.Fg;
            this.T12.Foreground = baseColora.Fg;
            this.T13.Foreground = baseColora.Fg;
            this.T14.Foreground = baseColora.Fg;
            this.T15.Foreground = baseColora.Fg;
            this.T16.Foreground = baseColora.Fg;
            this.T17.Foreground = baseColora.Fg;
            this.T18.Foreground = baseColora.Fg;
            this.T19.Foreground = baseColora.Fg;
            this.T20.Foreground = baseColora.Fg;

            this.TopIcon.Background = baseColora.Main;
            this.TopIcon.Foreground = baseColora.FontM;
            ButtonHelper.SetHoverBrush(TopIcon, baseColora.Main);
            ButtonHelper.SetClickCoverOpacity(TopIcon, 1);

            this.RunButton.Foreground = baseColora.Font;
            this.RunButton.Background = baseColora.Tran;
            ButtonHelper.SetHoverBrush(RunButton, baseColora.Main);
            this.Pass.Foreground = baseColora.Font;
            this.Pass.Background = baseColora.DBg;
            ButtonHelper.SetHoverBrush(Pass, baseColora.Main);
            this.Exit.Foreground = baseColora.Font;
            this.Exit.Background = baseColora.DBg;
            ButtonHelper.SetHoverBrush(Exit, baseColora.Main);
            this.Hits.Foreground = baseColora.Font;
            this.Hits.Background = baseColora.DBg;
            ButtonHelper.SetHoverBrush(Hits, baseColora.Main);

            this.MainTab.Background = baseColora.Bg;
            this.MainTab.Foreground = baseColora.Fg;
            TabControlHelper.SetHeaderPanelBackground(MainTab, baseColora.DBg);
            TabControlHelper.SetItemIcon(MainTab, baseColora.DBg);
            TabControlHelper.SetSelectedBackground(MainTab, baseColora.Bg);
            TabControlHelper.SetSelectedForeground(MainTab, baseColora.Fg);
            this.GameTab.Background = baseColora.Bg;
            this.GameTab.Foreground = baseColora.Fg;
            TabControlHelper.SetHeaderPanelBackground(GameTab, baseColora.DBg);
            TabControlHelper.SetItemIcon(GameTab, baseColora.DBg);
            TabControlHelper.SetSelectedBackground(GameTab, baseColora.Bg);
            TabControlHelper.SetSelectedForeground(GameTab, baseColora.Fg);

            this.Hit.Background = baseColora.DBg;
            this.Hit.Foreground = baseColora.Fg;
            ComboBoxHelper.SetShadowColor(Hit, baseColora.Bg.Color);
            ComboBoxHelper.SetHoverBackground(Hit, baseColora.Bg);
            ComboBoxHelper.SetHoverForeground(Hit, baseColora.Fg);
            ComboBoxHelper.SetSelectedBackground(Hit, baseColora.DBg);
            ComboBoxHelper.SetSelectedForeground(Hit, baseColora.Fg);
            this.Do.Background = baseColora.DBg;
            this.Do.Foreground = baseColora.Fg;
            ComboBoxHelper.SetShadowColor(Do, baseColora.Bg.Color);
            ComboBoxHelper.SetHoverBackground(Do, baseColora.Bg);
            ComboBoxHelper.SetHoverForeground(Do, baseColora.Fg);
            ComboBoxHelper.SetSelectedBackground(Do, baseColora.DBg);
            ComboBoxHelper.SetSelectedForeground(Do, baseColora.Fg);
            this.Give.Background = baseColora.DBg;
            this.Give.Foreground = baseColora.Fg;
            ComboBoxHelper.SetShadowColor(Give, baseColora.Bg.Color);
            ComboBoxHelper.SetHoverBackground(Give, baseColora.Bg);
            ComboBoxHelper.SetHoverForeground(Give, baseColora.Fg);
            ComboBoxHelper.SetSelectedBackground(Give, baseColora.DBg);
            ComboBoxHelper.SetSelectedForeground(Give, baseColora.Fg);

            this.BagBD.Background = baseColora.DBg;
            ListViewItem listViewItem = new ListViewItem();

            listViewItem.Name = "空";
            TextBlock textBlock = new TextBlock();

            textBlock.Text       = "  空";
            textBlock.Foreground = baseColora.Font;
            textBlock.FontSize   = 14;
            listViewItem.Content = textBlock;
            Bag.Items.Add(listViewItem);

            this.Health.Background = baseColora.DBg;
            this.Health.Foreground = baseColora.Main;
            this.Love.Background   = baseColora.DBg;
            this.Love.Foreground   = baseColora.Main;
            this.Hug.Background    = baseColora.DBg;
            this.Hug.Foreground    = baseColora.Main;
            this.Duang.Background  = baseColora.DBg;
            this.Duang.Foreground  = baseColora.Main;

            this.yHealth.Background = baseColora.DBg;
            this.yHealth.Foreground = baseColora.Main;
            this.yLove.Background   = baseColora.DBg;
            this.yLove.Foreground   = baseColora.Main;
            this.yHug.Background    = baseColora.DBg;
            this.yHug.Foreground    = baseColora.Main;
            this.yDuang.Background  = baseColora.DBg;
            this.yDuang.Foreground  = baseColora.Main;

            this.Run.Background = baseColora.DBg;
            this.Run.Foreground = baseColora.Fg;

            CMD.Foreground    = baseColora.Font;
            CMDCOL.Foreground = baseColora.Font;

            this.MainGame.Visibility = Visibility.Collapsed;

            CMDIN.Visibility = Visibility.Collapsed;

            if (PageHD2.opin)
            {
                you = "Stapx Steve";
                op  = true;
            }

            customHit.Add(new customerHit()
            {
                ID = 0, Name = "  - 空 -", ShowName = "空", Hit = 0, HitMax = 0, Love = 0, LoveMax = 0, Hug = 0, HugMax = 0, Duang = 0, DuangMax = 0
            });
            customHit.Add(new customerHit()
            {
                ID = 1, Name = "  - 轻拳 -", ShowName = "轻拳", Hit = -10, HitMax = -5, Love = -1, LoveMax = 0, Hug = -45, HugMax = -25, Duang = 1, DuangMax = 2
            });
            Hit.ItemsSource       = customHit;
            Hit.DisplayMemberPath = "Name";
            Hit.SelectedValuePath = "ID";
            Hit.SelectedValue     = 0;

            customGive.Add(new customerGive()
            {
                ID = 0, Name = "  - 空 -", ShowName = "空", Hit = 0, HitMax = 0, Love = 0, LoveMax = 0, Hug = 0, HugMax = 0, Buff = "", BuffPes = 0
            });
            customGive.Add(new customerGive()
            {
                ID = 1, Name = "  - 面包 -", ShowName = "面包", Hit = 0, HitMax = 0, Love = 0, LoveMax = 2, Hug = 10, HugMax = 10, Buff = "吃撑", BuffPes = 5
            });
            Give.ItemsSource       = customGive;
            Give.DisplayMemberPath = "Name";
            Give.SelectedValuePath = "ID";
            Give.SelectedValue     = 0;

            customDo.Add(new customerDo()
            {
                ID = 0, Name = "  - 空 -", ShowName = "空", Hit = 0, HitMax = 0, Love = 0, LoveMax = 0, Hug = 0, HugMax = 0, Buff = "", BuffPes = 0
            });
            customDo.Add(new customerDo()
            {
                ID = 1, Name = "  - 捏捏 -", ShowName = "捏捏", Hit = 0, HitMax = 0, Love = 0, LoveMax = 2, Hug = -5, HugMax = -2, Buff = "", BuffPes = 0
            });
            Do.ItemsSource       = customDo;
            Do.DisplayMemberPath = "Name";
            Do.SelectedValuePath = "ID";
            Do.SelectedValue     = 0;
        }
Exemplo n.º 3
0
        private bool UpdateUI()
        {
            WindowXCaption.SetBackground(this, baseColora.Main);
            WindowXCaption.SetForeground(this, baseColora.FontM);

            BG.BeginInit();
            BG.Source = baseColora.Bgpa;
            BG.EndInit();
            BG1.BeginInit();
            BG1.Source = baseColora.Bgpa;
            BG1.EndInit();
            BG2.BeginInit();
            BG2.Source = baseColora.Bgpa;
            BG2.EndInit();
            BG3.BeginInit();
            BG3.Source = baseColora.Bgpa;
            BG3.EndInit();

            //样式
            this.T11.Foreground = baseColora.Fg;
            this.T11.FontFamily = baseColora.Fonts;
            this.T11.FontSize   = 13;
            this.T12.Foreground = baseColora.Fg;
            this.T12.FontFamily = baseColora.Fonts;
            this.T12.FontSize   = 13;
            this.T13.Foreground = baseColora.Fg;
            this.T13.FontFamily = baseColora.Fonts;
            this.T13.FontSize   = 13;
            this.T14.Foreground = baseColora.Fg;
            this.T14.FontFamily = baseColora.Fonts;
            this.T14.FontSize   = 13;
            this.T15.Foreground = baseColora.Fg;
            this.T15.FontFamily = baseColora.Fonts;
            this.T15.FontSize   = 13;
            this.T16.Foreground = baseColora.Fg;
            this.T16.FontFamily = baseColora.Fonts;
            this.T16.FontSize   = 13;
            this.T17.Foreground = baseColora.Fg;
            this.T17.FontFamily = baseColora.Fonts;
            this.T17.FontSize   = 13;
            this.T18.Foreground = baseColora.Fg;
            this.T18.FontFamily = baseColora.Fonts;
            this.T18.FontSize   = 13;
            this.T21.Foreground = baseColora.Fg;
            this.T21.FontFamily = baseColora.Fonts;
            this.T21.FontSize   = 13;
            this.T22.Foreground = baseColora.Fg;
            this.T22.FontFamily = baseColora.Fonts;
            this.T22.FontSize   = 13;
            this.T31.Foreground = baseColora.Fg;
            this.T31.FontFamily = baseColora.Fonts;
            this.T31.FontSize   = 13;
            this.T41.Foreground = baseColora.Fg;
            this.T41.FontFamily = baseColora.Fonts;
            this.T41.FontSize   = 13;

            this.MT11.Foreground = baseColora.Fg;
            this.MT11.FontFamily = baseColora.Fonts;
            this.MT11.FontSize   = 15;
            this.MT12.Foreground = baseColora.Fg;
            this.MT12.FontFamily = baseColora.Fonts;
            this.MT12.FontSize   = 15;
            this.MT13.Foreground = baseColora.Fg;
            this.MT13.FontFamily = baseColora.Fonts;
            this.MT13.FontSize   = 15;
            this.MT21.Foreground = baseColora.Fg;
            this.MT21.FontFamily = baseColora.Fonts;
            this.MT21.FontSize   = 15;
            this.MT31.Foreground = baseColora.Fg;
            this.MT31.FontFamily = baseColora.Fonts;
            this.MT31.FontSize   = 15;
            this.MT41.Foreground = baseColora.Fg;
            this.MT41.FontFamily = baseColora.Fonts;
            this.MT41.FontSize   = 15;

            this.CD11.Background = baseColora.Bg;
            this.CD12.Background = baseColora.Bg;
            this.CD13.Background = baseColora.Bg;
            this.CD21.Background = baseColora.Bg;
            this.CD32.Background = baseColora.Bg;
            this.CD41.Background = baseColora.Bg;

            this.C11.Background = baseColora.DBg;
            this.C31.Background = baseColora.DBg;
            this.C32.Background = baseColora.DBg;
            CheckBoxHelper.SetCheckedBackground(C11, baseColora.DBg);
            CheckBoxHelper.SetCheckedBackground(C31, baseColora.DBg);
            CheckBoxHelper.SetCheckedBackground(C32, baseColora.DBg);
            CheckBoxHelper.SetGlyphBrush(C11, baseColora.DBg);
            CheckBoxHelper.SetGlyphBrush(C31, baseColora.DBg);
            CheckBoxHelper.SetGlyphBrush(C32, baseColora.DBg);
            CheckBoxHelper.SetCheckedGlyphBrush(C11, baseColora.Main);
            CheckBoxHelper.SetCheckedGlyphBrush(C31, baseColora.Main);
            CheckBoxHelper.SetCheckedGlyphBrush(C32, baseColora.Main);

            this.MainTab.Background = baseColora.Bg;
            this.MainTab.Foreground = baseColora.Fg;
            TabControlHelper.SetHeaderPanelBackground(MainTab, baseColora.DBg);
            TabControlHelper.SetItemIcon(MainTab, baseColora.DBg);
            TabControlHelper.SetSelectedBackground(MainTab, baseColora.Bg);
            TabControlHelper.SetSelectedForeground(MainTab, baseColora.Fg);

            this.Theams.Background = baseColora.DBg;
            this.Theams.Foreground = baseColora.Fg;
            ComboBoxHelper.SetShadowColor(Theams, baseColora.Bg.Color);
            ComboBoxHelper.SetHoverBackground(Theams, baseColora.Bg);
            ComboBoxHelper.SetHoverForeground(Theams, baseColora.Fg);
            ComboBoxHelper.SetSelectedBackground(Theams, baseColora.DBg);
            ComboBoxHelper.SetSelectedForeground(Theams, baseColora.Fg);

            this.S11.Background = baseColora.DBg;
            this.S11.Foreground = baseColora.Fg;
            SliderHelper.SetThemeBrush(S11, baseColora.Main);
            this.S12.Background = baseColora.DBg;
            this.S12.Foreground = baseColora.Fg;
            SliderHelper.SetThemeBrush(S12, baseColora.Main);
            this.S13.Background = baseColora.DBg;
            this.S13.Foreground = baseColora.Fg;
            SliderHelper.SetThemeBrush(S13, baseColora.Main);
            this.S14.Background = baseColora.DBg;
            this.S14.Foreground = baseColora.Fg;
            SliderHelper.SetThemeBrush(S14, baseColora.Main);

            this.TopIcon.Background = baseColora.Main;
            this.TopIcon.Foreground = baseColora.FontM;
            ButtonHelper.SetHoverBrush(TopIcon, baseColora.Main);
            ButtonHelper.SetClickCoverOpacity(TopIcon, 1);
            this.MBG.Foreground = baseColora.Fg;
            this.MBG.Background = baseColora.DBg;
            this.SBG.Foreground = baseColora.Fg;
            this.SBG.Background = baseColora.DBg;
            ButtonHelper.SetHoverBrush(MBG, baseColora.DBg);
            ButtonHelper.SetHoverBrush(SBG, baseColora.DBg);
            this.B21.Foreground = baseColora.Fg;
            this.B21.Background = baseColora.DBg;
            ButtonHelper.SetHoverBrush(B21, baseColora.DBg);
            this.B41.Foreground = baseColora.Fg;
            this.B41.Background = baseColora.DBg;
            ButtonHelper.SetHoverBrush(B41, baseColora.DBg);

            this.Password.Background  = baseColora.Bg;
            this.Password.Foreground  = baseColora.Fg;
            this.UpdateLog.Background = baseColora.Bg;
            this.UpdateLog.Foreground = baseColora.Fg;

            return(true);
        }