Exemplo n.º 1
0
        public Updater()
        {
            InitializeComponent();

            BG.BeginInit();
            BG.Source = baseColora.Bgpa;
            BG.EndInit();
            this.Background = baseColora.Tran;
            WindowXCaption.SetHeight(this, 0);

            this.MT1.Foreground = baseColora.Fg;
            this.MT1.FontFamily = baseColora.Fonts;
            this.MT1.FontSize   = 15;

            this.T1.Foreground = baseColora.Fg;
            this.T1.FontFamily = baseColora.Fonts;
            this.T1.FontSize   = 13;
            this.T2.Foreground = baseColora.Fg;
            this.T2.FontFamily = baseColora.Fonts;
            this.T2.FontSize   = 13;

            this.ICON.Foreground = baseColora.Fg;
            ButtonHelper.SetHoverBrush(ICON, baseColora.Fg);

            this.pbDown.Background = baseColora.DBg;
            this.pbDown.Foreground = baseColora.Main;
            ProgressBarHelper.SetCornerRadius(pbDown, 0);

            Thread thread = new Thread(Start);

            thread.Start();
        }
Exemplo n.º 2
0
        public Set()
        {
            InitializeComponent();

            WindowBlur.SetIsEnabled(this, true);
            WindowXCaption.SetForeground(this, MainWindow.brush);

            //刷新窗口前景色
            updateUI();
            Timer timer = new Timer();

            timer          = new Timer(1000);
            timer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            timer.Enabled  = true;


            if (WindowXCaption.GetHeight(MainWindow.windowMain) == 0)
            {
                GD.IsChecked = true;
            }
            if (MainWindow.windowMain.fx)
            {
                GT.IsChecked = true;
            }
            if (MainWindow.wherefind != "全国")
            {
                WHERE.Text = MainWindow.wherefind;
            }
            TIME.Text     = MainWindow.times.ToString();
            TOP.IsChecked = MainWindow.top;
        }
Exemplo n.º 3
0
        public PassWordEnterF7()
        {
            InitializeComponent();

            BG.BeginInit();
            BG.Source = baseColora.Bgpa;
            BG.EndInit();
            this.Background = baseColora.Tran;
            WindowXCaption.SetHeight(this, 0);

            this.Time.Background = baseColora.DBg;
            this.Time.Foreground = baseColora.Main;
            ProgressBarHelper.SetCornerRadius(Time, 0);
            Border.Background = baseColora.DBg;

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

            ButtonHelper.SetHoverBrush(B1, baseColora.Tran);
            this.B1.Background = baseColora.Tran;

            Timer timer = new Timer();

            timer          = new Timer(1000);
            timer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            timer.Enabled  = true;
        }
Exemplo n.º 4
0
        private void updateUI()
        {
            Point inScreen = new Point(0, 0);

            try
            {
                inScreen = PointToScreen(new System.Windows.Point(0, 0));
            }
            catch { }
            Color color = GetColor((int)inScreen.X - 3, (int)inScreen.Y - 3);

            if (color.R * 0.299 + color.G * 0.578 + color.B * 0.114 >= 192)
            { //浅色
                brush.Color     = Color.FromArgb(255, 0, 0, 0);
                brushfont.Color = Color.FromArgb(255, 255, 255, 255);
                WindowXCaption.SetForeground(this, brush);
            }
            else
            {  //深色
                brush.Color     = Color.FromArgb(255, 255, 255, 255);
                brushfont.Color = Color.FromArgb(255, 0, 0, 0);
                WindowXCaption.SetForeground(this, brush);
            }
            FontFamily font = new FontFamily("方正兰亭简黑");

            this.T1.Foreground = brush;
            this.T1.FontFamily = font;
            this.T1.FontSize   = 13;
            this.T2.Foreground = brush;
            this.T2.FontFamily = font;
            this.T2.FontSize   = 13;
            this.T3.Foreground = brush;
            this.T3.FontFamily = font;
            this.T3.FontSize   = 13;
            this.T4.Foreground = brush;
            this.T4.FontFamily = font;
            this.T4.FontSize   = 13;
            this.T5.Foreground = brush;
            this.T5.FontFamily = font;
            this.T5.FontSize   = 13;

            this.B1.Foreground = brush;
            this.B2.Foreground = brush;
            this.B3.Foreground = brush;
            this.B4.Foreground = brush;
            this.B5.Foreground = brush;

            this.WHEREOK.Foreground = brush;
            this.TIMEOK.Foreground  = brush;
            ButtonHelper.SetHoverBrush(WHEREOK, brush);
            ButtonHelper.SetHoverBrush(TIMEOK, brush);

            this.WHERE.Foreground = brush;
            this.TIME.Foreground  = brush;
        }
Exemplo n.º 5
0
        public PendingBox(Window owner, string message, string title, bool cancelable, PendingBoxConfigurations configurations)
        {
            InitializeComponent();

            PendingBoxStyle = configurations.PendingBoxStyle;
            if (configurations.PendingBoxStyle == PendingBoxStyle.Standard)
            {
                if (!string.IsNullOrEmpty(title))
                {
                    TxtTitle.Text       = title;
                    TxtTitle.Visibility = Visibility.Visible;
                    Title = title;
                    WindowXCaption.SetHeight(this, 30);
                }
            }
            else if (configurations.PendingBoxStyle == PendingBoxStyle.Classic)
            {
                if (!string.IsNullOrEmpty(title))
                {
                    TxtTitle2.Text       = title;
                    TxtTitle2.Visibility = Visibility.Visible;
                    Title = title;
                    WindowXCaption.SetHeight(this, 30);
                }
                GrdStandard.Visibility = Visibility.Collapsed;
                GrdClassic.Visibility  = Visibility.Visible;
            }


            Cancelable   = cancelable;
            Message      = message;
            CancelButton = configurations.CancelButton;

            Foreground        = configurations.Foreground;
            LoadingBackground = configurations.LoadingBackground;
            LoadingForeground = configurations.LoadingForeground;
            ButtonBrush       = configurations.ButtonBrush;

            ShowInTaskbar         = configurations.ShowInTaskbar;
            Topmost               = configurations.Topmost;
            FontSize              = configurations.FontSize;
            WindowStartupLocation = configurations.WindowStartupLocation;
            LoadingStyle          = configurations.LoadingStyle;
            LoadingSize           = configurations.LoadingSize;
            MinHeight             = configurations.MinHeight;
            MinWidth              = configurations.MinWidth;
            MaxHeight             = configurations.MaxHeight;
            MaxWidth              = configurations.MaxWidth;
        }
Exemplo n.º 6
0
        private void updateUI()
        {
            if (top)
            {
                this.Topmost = true;
            }
            else
            {
                this.Topmost = false;
            }
            Point inScreen = new Point(0, 0);

            try
            {
                inScreen = PointToScreen(new System.Windows.Point(0, 0));
            }
            catch { }
            Color color = GetColor((int)inScreen.X - 3, (int)inScreen.Y - 3);

            //MessageBox.Show(color.ToString());
            if (color.R * 0.299 + color.G * 0.578 + color.B * 0.114 >= 192)
            { //浅色
                brush.Color     = Color.FromArgb(255, 0, 0, 0);
                brushfont.Color = Color.FromArgb(255, 255, 255, 255);
                WindowXCaption.SetForeground(this, brush);
            }
            else
            {  //深色
                brush.Color     = Color.FromArgb(255, 255, 255, 255);
                brushfont.Color = Color.FromArgb(255, 0, 0, 0);
                WindowXCaption.SetForeground(this, brush);
            }
            this.MGET.Foreground    = brush;
            this.GET.Foreground     = brush;
            this.MMAY.Foreground    = brush;
            this.MAY.Foreground     = brush;
            this.MMAYDIE.Foreground = brush;
            this.MAYDIE.Foreground  = brush;
            this.MDIE.Foreground    = brush;
            this.DIE.Foreground     = brush;
            this.MALIVE.Foreground  = brush;
            this.ALIVE.Foreground   = brush;

            this.SET.Foreground = brush;
            this.ERR.Foreground = brush;

            this.TTS.Background     = brush;
            this.TOOLTIP.Foreground = brushfont;
        }
Exemplo n.º 7
0
 private void GD_Checked(object sender, RoutedEventArgs e)
 {
     if (GD.IsChecked == true)
     {
         WindowXCaption.SetHeight(ParentWindow, 0);
         ParentWindow.Main.Margin = new Thickness(0, 10, 0, 0);
         ParentWindow.Height      = ParentWindow.Height - 25;
     }
     else
     {
         WindowXCaption.SetHeight(ParentWindow, 35);
         ParentWindow.Main.Margin = new Thickness(0, 0, 0, 0);
         ParentWindow.Height      = ParentWindow.Height + 25;
     }
 }
Exemplo n.º 8
0
        public SSMessageBox()
        {
            InitializeComponent();

            SSMessageHelper.buttonOK = false;
            SSMessageHelper.buttonNO = false;

            BG.BeginInit();
            BG.Source = baseColora.Bgpa;
            BG.EndInit();
            this.Background   = baseColora.Tran;
            Border.Background = baseColora.DBg;
            WindowXCaption.SetHeight(this, 0);

            this.ICON.Foreground = baseColora.Fg;
            ButtonHelper.SetHoverBrush(ICON, baseColora.Fg);
            ButtonHelper.SetIcon(ICON, ButtonHelper.GetIcon(SSMessageHelper.Icon));
            this.OK.Content    = SSMessageHelper.bOKtext;
            this.OK.Foreground = baseColora.Fg;
            this.OK.Background = baseColora.Bg;
            ButtonHelper.SetHoverBrush(OK, baseColora.Main);
            ButtonHelper.SetCornerRadius(OK, new CornerRadius(3, 3, 3, 3));
            this.CANC.Content    = SSMessageHelper.bNOtext;
            this.CANC.Foreground = baseColora.Fg;
            this.CANC.Background = baseColora.Bg;
            ButtonHelper.SetHoverBrush(CANC, baseColora.Main);
            ButtonHelper.SetCornerRadius(CANC, new CornerRadius(3, 3, 3, 3));

            this.TITLE.Text       = SSMessageHelper.Title;
            this.TITLE.Foreground = baseColora.Fg;
            this.TITLE.Background = baseColora.Tran;
            this.TITLE.FontFamily = baseColora.Fonts;
            this.TITLE.FontSize   = 25;

            this.SAY.Text       = "       " + SSMessageHelper.Says;
            this.SAY.Foreground = baseColora.Fg;
            this.SAY.Background = baseColora.Tran;
            this.SAY.FontFamily = baseColora.Fonts;
            this.SAY.FontSize   = 16;

            if (SSMessageHelper.noNo)
            {
                this.CANC.Visibility = Visibility.Collapsed;
            }
        }
Exemplo n.º 9
0
        private void UpdateState()
        {
            WindowXCaption.SetDisableCloseButton(this, _messageBoxButton == MessageBoxButton.YesNo);
            if (_yesButton != null)
            {
                _yesButton.Content    = _yesButtonContent;
                _yesButton.Visibility = _messageBoxButton.IsIncluded(MessageBoxButton.YesNo, MessageBoxButton.YesNoCancel) ? Visibility.Visible : Visibility.Collapsed;
                _yesButton.IsDefault  = _defaultButton == DefaultButton.YesOK;
                _yesButton.Click     -= YesButton_Click;
                _yesButton.Click     += YesButton_Click;
            }

            if (_noButton != null)
            {
                _noButton.Content    = _noButtonContent;
                _noButton.Visibility = _messageBoxButton.IsIncluded(MessageBoxButton.YesNo, MessageBoxButton.YesNoCancel) ? Visibility.Visible : Visibility.Collapsed;
                _noButton.IsDefault  = _messageBoxButton == MessageBoxButton.YesNoCancel ? _defaultButton == DefaultButton.NoCancel : _defaultButton == DefaultButton.CancelNo;
                _noButton.Click     -= NoButton_Click;
                _noButton.Click     += NoButton_Click;
            }

            if (_cancelButton != null)
            {
                _cancelButton.Content    = _cancelButtonContent;
                _cancelButton.Visibility = _messageBoxButton.IsIncluded(MessageBoxButton.OKCancel, MessageBoxButton.YesNoCancel) ? Visibility.Visible : Visibility.Collapsed;
                _cancelButton.IsDefault  = _messageBoxButton == MessageBoxButton.YesNoCancel ? _defaultButton == DefaultButton.CancelNo : _defaultButton == DefaultButton.NoCancel;
                _cancelButton.IsCancel   = _isEscEnabled ? _messageBoxButton.IsIncluded(MessageBoxButton.OKCancel, MessageBoxButton.YesNoCancel) : false;
                _cancelButton.Click     -= CancelButton_Click;
                _cancelButton.Click     += CancelButton_Click;
            }

            if (_okButton != null)
            {
                _okButton.Content    = _okButtonContent;
                _okButton.Visibility = _messageBoxButton.IsIncluded(MessageBoxButton.OK, MessageBoxButton.OKCancel) ? Visibility.Visible : Visibility.Collapsed;
                _okButton.IsDefault  = _defaultButton == DefaultButton.YesOK;
                _okButton.IsCancel   = _isEscEnabled ? _messageBoxButton == MessageBoxButton.OK : false;
                _okButton.Click     -= OKButton_Click;
                _okButton.Click     += OKButton_Click;
            }
        }
Exemplo n.º 10
0
        private UIElement CreatePreviewView(WindowX view, object content)
        {
            var contentControl = new ContentControl()
            {
                Foreground = view.Foreground,
                Content    = content,
            };
            var grid = new Grid();

            grid.RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(view.DisableDragMove ? 0 : WindowXCaption.GetHeight(view))
            });
            grid.RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Star)
            });
            grid.Children.Add(new Border()
            {
                Background = WindowXCaption.GetBackground(view),
                Child      = new ContentControl()
                {
                    Content         = view.DataContext is Window ? "" : view.DataContext,
                    ContentTemplate = WindowXCaption.GetHeaderTemplate(view),
                }
            });
            Grid.SetRow(contentControl, 1);
            grid.Children.Add(contentControl);
            var border = new Border()
            {
                Background      = view.Background,
                BorderBrush     = view.BorderBrush ?? Brushes.Gray,
                BorderThickness = view.BorderThickness.Left == 0 ? new Thickness(1) : view.BorderThickness,
                Width           = view.Width,
                Height          = view.Height,
                Child           = grid,
            };

            return(border);
        }
Exemplo n.º 11
0
        public OpennInWindow()
        {
            InitializeComponent();

            WindowXCaption.SetBackground(this, baseColora.Bg);
            WindowXCaption.SetForeground(this, baseColora.Fg);

            BG.BeginInit();
            BG.Source = baseColora.Bgp;
            BG.EndInit();

            switch (Main.NowChoice)
            {
            case 1:
            {
                Page1 page1 = new Page1();
                Page.Content = new Frame()
                {
                    Content = page1
                };
            }
            break;

            case 2:
            {
                Page2 page2 = new Page2();
                Page.Content = new Frame()
                {
                    Content = page2
                };
            }
            break;

            case 3:
            {
                Page3 page3 = new Page3();
                Page.Content = new Frame()
                {
                    Content = page3
                };
            }
            break;

            case 4:
            {
                Page4 page4 = new Page4();
                Page.Content = new Frame()
                {
                    Content = page4
                };
            }
            break;

            case 5:
            {
                Page5 page5 = new Page5();
                Page.Content = new Frame()
                {
                    Content = page5
                };
            }
            break;

            case 6:
            {
                Page6 page6 = new Page6();
                Page.Content = new Frame()
                {
                    Content = page6
                };
            }
            break;

            case 7:
            {
                Page7 page7 = new Page7();
                Page.Content = new Frame()
                {
                    Content = page7
                };
            }
            break;

            case -1:
            {
                PageHD1 pageHD1 = new PageHD1();
                Page.Content = new Frame()
                {
                    Content = pageHD1
                };
            }
            break;

            default:
            {
                PageNone pageNone = new PageNone();
                Page.Content = new Frame()
                {
                    Content = pageNone
                };
            }
            break;
            }
            Topmost = true;
        }
Exemplo n.º 12
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.º 13
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.º 14
0
        public About()
        {
            InitializeComponent();

            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.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);

            ButtonHelper.SetHoverBrush(B1, baseColora.Bg);
            IconHelper.SetForeground(B1, baseColora.Fg);
            this.B1.Foreground = baseColora.Fg;
            this.B1.Background = baseColora.Tran;
            ButtonHelper.SetHoverBrush(B2, baseColora.Fg);
            IconHelper.SetForeground(B2, baseColora.Fg);
            this.B2.Foreground = baseColora.Fg;
            this.B2.Background = baseColora.Tran;
            ButtonHelper.SetHoverBrush(B3, baseColora.Bg);
            IconHelper.SetForeground(B3, baseColora.Fg);
            this.B3.Foreground = baseColora.Fg;
            this.B3.Background = baseColora.Tran;
            ButtonHelper.SetHoverBrush(B4, baseColora.Bg);
            IconHelper.SetForeground(B4, baseColora.Fg);
            this.B4.Foreground = baseColora.Fg;
            this.B4.Background = baseColora.Tran;
            ButtonHelper.SetHoverBrush(B5, baseColora.Bg);
            IconHelper.SetForeground(B5, baseColora.Fg);
            this.B5.Foreground = baseColora.Fg;
            this.B5.Background = baseColora.Tran;
            ButtonHelper.SetHoverBrush(B6, baseColora.Bg);
            IconHelper.SetForeground(B6, baseColora.Fg);
            this.B6.Foreground = baseColora.Fg;
            this.B6.Background = baseColora.Tran;
            ButtonHelper.SetHoverBrush(B7, baseColora.Bg);
            IconHelper.SetForeground(B7, baseColora.Fg);
            this.B7.Foreground = baseColora.Fg;
            this.B7.Background = baseColora.Tran;

            this.CD1.Background = baseColora.Bg;
            this.CD2.Background = baseColora.Bg;
            this.CD3.Background = baseColora.Bg;
            this.CD4.Background = baseColora.Bg;

            //SS列表样式
            this.SS.Foreground  = baseColora.Fg;
            this.SS.FontFamily  = baseColora.Fonts;
            this.SS.FontSize    = 22;
            this.BLC.Foreground = baseColora.Fg;
            this.BLC.FontFamily = baseColora.Fonts;
            this.BLC.FontSize   = 22;

            this.WhoSS.Text        = "       这是一只喜欢做UI排版的SS,喜欢折腾。有事没事就想做点什么……然而大半都做不完的说,米粉、谷歌粉,会卖萌/大雾,没什么事的话可以陪聊(?) ,QQ , Twitter都行/逃。";
            this.WhoBLC.Text       = "       [ 这个人什么都没留下 ]";
            this.WhoSS.Foreground  = baseColora.Fg;
            this.WhoSS.FontFamily  = baseColora.Fonts;
            this.WhoSS.FontSize    = 14;
            this.WhoBLC.Foreground = baseColora.Fg;
            this.WhoBLC.FontFamily = baseColora.Fonts;
            this.WhoBLC.FontSize   = 14;

            this.MT1.Foreground = baseColora.Fg;
            this.MT1.FontFamily = baseColora.Fonts;
            this.MT1.FontSize   = 15;
            this.MT2.Foreground = baseColora.Fg;
            this.MT2.FontFamily = baseColora.Fonts;
            this.MT2.FontSize   = 15;
            this.MT3.Foreground = baseColora.Fg;
            this.MT3.FontFamily = baseColora.Fonts;
            this.MT3.FontSize   = 15;
            this.MT4.Foreground = baseColora.Fg;
            this.MT4.FontFamily = baseColora.Fonts;
            this.MT4.FontSize   = 15;

            this.S1.Foreground = baseColora.Fg;
            this.S1.FontFamily = baseColora.Fonts;
            this.S1.FontSize   = 13;
            this.S2.Foreground = baseColora.Fg;
            this.S2.FontFamily = baseColora.Fonts;
            this.S2.FontSize   = 13;
            this.S3.Foreground = baseColora.Fg;
            this.S3.FontFamily = baseColora.Fonts;
            this.S3.FontSize   = 13;
            this.S4.Foreground = baseColora.Fg;
            this.S4.FontFamily = baseColora.Fonts;
            this.S4.FontSize   = 13;
        }
Exemplo n.º 15
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);
        }