/// <summary>
        /// 触发进入下一步的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Next_Click(object sender, RoutedEventArgs e)
        {
            GuidePages.PageChangeRoutedEventArgs args = e as GuidePages.PageChangeRoutedEventArgs;

            if (args.XamlPath == "1")
            {
                if (GuideMode == 1)
                {
                    //Hook方式设置 完成
                    this.Close();
                }
                else if (GuideMode == 2)
                {
                    //OCR方式设置 完成
                    this.Close();
                }
                else
                {
                }
            }
            else
            {
                //其他情况就跳转指定页面
                GuidePageFrame.Navigate(new Uri(args.XamlPath, UriKind.Relative));
                GuideStepBar.Next();
            }
        }
Beispiel #2
0
        private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
        {
            if (SrcLangCombox.SelectedIndex == DstLangCombox.SelectedIndex)
            {
                HandyControl.Controls.Growl.Error(App.Current.Resources["ChooseLanguagePage_NextErrorHint"].ToString());
            }
            else
            {
                Common.UsingSrcLang = CommonFunction.lstLanguage[langlist[SrcLangCombox.SelectedIndex]];
                Common.UsingDstLang = CommonFunction.lstLanguage[langlist[DstLangCombox.SelectedIndex]];

                //写数据库信息
                if (Common.GameID != -1)
                {
                    SQLHelper sqliteH = new SQLHelper();
                    sqliteH.ExecuteSql(string.Format("UPDATE game_library SET src_lang = '{0}' WHERE gameid = {1};",
                                                     Common.UsingSrcLang, Common.GameID));
                    sqliteH.ExecuteSql(string.Format("UPDATE game_library SET dst_lang = '{0}' WHERE gameid = {1};",
                                                     Common.UsingDstLang, Common.GameID));
                }

                //使用路由事件机制通知窗口来完成下一步操作
                PageChangeRoutedEventArgs args = new PageChangeRoutedEventArgs(PageChange.PageChangeRoutedEvent, this);
                args.XamlPath = "GuidePages/CompletationPage.xaml";
                this.RaiseEvent(args);
            }
        }
        private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(path))
            {
                HandyControl.Controls.Growl.Error(Application.Current.Resources["FilePath_Null_Hint"].ToString());
                return;
            }
            if (Common.guideMode == 2)
            {
                Common.appSettings.LocalTransPatch = path;
            }
            Common.UsingSrcLang = CommonFunction.lstLanguage["日本語"];
            Common.UsingDstLang = CommonFunction.lstLanguage["中文"];
            SQLHelper sqliteH = new SQLHelper();

            sqliteH.ExecuteSql(
                $"UPDATE game_library SET src_lang = '{Common.UsingSrcLang}' WHERE gameid = {Common.GameID};");
            sqliteH.ExecuteSql(
                $"UPDATE game_library SET dst_lang = '{Common.UsingDstLang}' WHERE gameid = {Common.GameID};");
            //使用路由事件机制通知窗口来完成下一步操作
            PageChangeRoutedEventArgs args = new PageChangeRoutedEventArgs(PageChange.PageChangeRoutedEvent, this)
            {
                XamlPath = "GuidePages/CompletationPage.xaml"
            };

            this.RaiseEvent(args);
        }
        private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
        {
            //使用路由事件机制通知窗口来完成下一步操作
            PageChangeRoutedEventArgs args = new PageChangeRoutedEventArgs(PageChange.PageChangeRoutedEvent, this);

            args.XamlPath = "1";//表示完成
            this.RaiseEvent(args);
        }
Beispiel #5
0
        /// <summary>
        /// 触发进入下一步的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Next_Click(object sender, RoutedEventArgs e)
        {
            GuidePages.PageChangeRoutedEventArgs args = e as GuidePages.PageChangeRoutedEventArgs;

            if (args.XamlPath == "1")
            {
                if (GuideMode == 1)
                {
                    //Hook方式设置 完成
                    Common.transMode = 1;
                    TranslateWindow translateWindow = new TranslateWindow();
                    translateWindow.Show();

                    this.Close();
                }
                else if (GuideMode == 2)
                {
                    //OCR方式设置 完成
                    Common.transMode = 2;
                    TranslateWindow translateWindow = new TranslateWindow();
                    translateWindow.Show();

                    this.Close();
                }
                else if (GuideMode == 3)
                {
                    //Hook方式设置 完成
                    Common.transMode = 1;
                    TranslateWindow translateWindow = new TranslateWindow();
                    translateWindow.Show();

                    this.Close();
                }
                else if (GuideMode == 4)
                {
                    //剪贴板监控方式设置 完成
                    Common.transMode = 1;
                    TranslateWindow translateWindow = new TranslateWindow();
                    translateWindow.Show();

                    this.Close();
                }
            }
            else
            {
                //其他情况就跳转指定页面
                GuidePageFrame.Navigate(new Uri(args.XamlPath, UriKind.Relative));
                GuideStepBar.Next();
            }
        }
Beispiel #6
0
        private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
        {
            if (SrcLangCombox.SelectedIndex == DstLangCombox.SelectedIndex)
            {
                HandyControl.Controls.Growl.Error("两种语言不能相同!");
            }
            else
            {
                Common.UsingSrcLang = CommonFunction.lstLanguage[langlist[SrcLangCombox.SelectedIndex]];
                Common.UsingDstLang = CommonFunction.lstLanguage[langlist[DstLangCombox.SelectedIndex]];

                //写数据库信息

                //使用路由事件机制通知窗口来完成下一步操作
                PageChangeRoutedEventArgs args = new PageChangeRoutedEventArgs(PageChange.PageChangeRoutedEvent, this);
                args.XamlPath = "GuidePages/CompletationPage.xaml";
                this.RaiseEvent(args);
            }
        }
Beispiel #7
0
 /// <summary>
 /// 触发进入下一步的事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Next_Click(object sender, RoutedEventArgs e)
 {
     GuidePages.PageChangeRoutedEventArgs args = e as GuidePages.PageChangeRoutedEventArgs;
     GuidePageFrame.Navigate(new Uri(args.XamlPath, UriKind.Relative));
     GuideStepBar.Next();
 }