Exemple #1
0
        public MainWindow()
        {
            //初始化窗口
            //添加程序集解析事件
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            InitializeComponent();

            //版本号
            String stVersion = "Version - Dev.0.1.1";

            Versionon.Text = stVersion;

            //加载颜色笔刷
            SolidColorBrush mySolidColorBrush = new SolidColorBrush();

            mySolidColorBrush.Color = Color.FromArgb(255, 100, 100, 100);

            //工具列表
            Update[] listall = new Update[]
            {
                new Update()
                {
                    Line = "    1 . 批量打开文件"
                },
                new Update()
                {
                    Line = "    2 . 颜色转换"
                },
            };
            UpdateList.ItemsSource = listall;

            //工具列表样式
            this.UpdateList.Foreground = mySolidColorBrush;
            this.UpdateList.FontFamily = new FontFamily("方正兰亭简黑");
            this.UpdateList.FontSize   = 14;

            //版本号样式
            this.Versionon.Foreground = mySolidColorBrush;
            this.Versionon.FontFamily = new FontFamily("方正兰亭简黑");
            this.Versionon.FontSize   = 12;

            //顶栏按钮样式
            this.Feedback.Foreground = mySolidColorBrush;
            this.Feedback.FontFamily = new FontFamily("方正兰亭简黑");
            this.Feedback.FontSize   = 14;

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

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

            //加载完成
            ButtonHelper.SetIsWaiting(OpenButton, false);
        }
Exemple #2
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);
        }
Exemple #3
0
        private void Button_Open(object sender, RoutedEventArgs e)
        {
            ListTool upd = UpdateList.SelectedItem as ListTool;

            if (upd == null)
            {
                error.logWriter("你什么都没选就想开工具……", false);
            }
            else
            {
                error.logWriter("加载工具:" + upd.Line, false);
            }
            if (upd != null && upd is ListTool)
            {
                if (upd.Line == "    1 . 批量打开文件")
                {
                    NowPage = 1;
                    Page1 page1 = new Page1();
                    Page.Content = new Frame()
                    {
                        Content = page1
                    };
                }
                else if (upd.Line == "    2 . 调色板")
                {
                    NowPage = 2;
                    Page2 page2 = new Page2();
                    Page.Content = new Frame()
                    {
                        Content = page2
                    };
                }

                /*
                 * else if (upd.Line == "    3 . 快速启动器")
                 * {
                 *  NowPage = 3;
                 *  Page3 page3 = new Page3();
                 *  Page.Content = new Frame()
                 *  {
                 *      Content = page3
                 *  };
                 * }
                 */
                else if (upd.Line == "    4 . 倒计时")
                {
                    NowPage = 4;
                    Page4 page4 = new Page4();
                    Page.Content = new Frame()
                    {
                        Content = page4
                    };
                }
                else if (upd.Line == "    5 . QQ 头像获取")
                {
                    NowPage = 5;
                    Page5 page5 = new Page5();
                    Page.Content = new Frame()
                    {
                        Content = page5
                    };
                }
                else if (upd.Line == "    6 . QQ 消息制作")
                {
                    NowPage = 6;
                    Page6 page6 = new Page6();
                    Page.Content = new Frame()
                    {
                        Content = page6
                    };
                }
                else if (upd.Line == "    7 . 记事簿")
                {
                    NowPage = 7;
                    Page7 page7 = new Page7();
                    page7.ParentWindow = this;
                    Page.Content       = new Frame()
                    {
                        Content = page7
                    };
                }
                else if (upd.Line == "    * . SOS 图标获取")
                {
                    NowPage = -1;
                    PageHD1 pageHD1 = new PageHD1();
                    Page.Content = new Frame()
                    {
                        Content = pageHD1
                    };
                }
                else if (upd.Line == "    回到主页")
                {
                    NowPage = -2;
                    PageMain pageMain = new PageMain();
                    Page.Content = new Frame()
                    {
                        Content = pageMain
                    };
                }
                else if (upd.Line == "    CMD")
                {
                    NowPage = -3;
                    PageHD2 pageHD2 = new PageHD2();
                    pageHD2.ParentWindow = this;
                    Page.Content         = new Frame()
                    {
                        Content = pageHD2
                    };
                }
                else
                {
                    NowPage = -1000;
                    PageNone pageNone = new PageNone();
                    Page.Content = new Frame()
                    {
                        Content = pageNone
                    };
                }
            }
        }