Beispiel #1
0
        private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            string pushedKey = "";
            switch (e.Key)
            {
                case Key.F1:
                    DebugRefresh_JPToTCN();
                    break;
                case Key.F2:
                case Key.F3:
                case Key.F4:
                case Key.F5:
                case Key.F6:
                case Key.F7:
                case Key.F8:
                case Key.Escape:
                    Environment.Exit(0);
                    break;
                case Key.V:
                    UnAvailable_Message();
                    break;
                case Key.D:UnAvailable_Message();
                    break;
                case Key.C:
                    bdo_toolbox.config conf = new config();
                    conf.Show();
                    string directoryPath = BDOToolBoxStartupPath;
                    string fileName = "config.ini";

                    try
                    {
                        // ConfigWatchDog = new FileSystemWatcher();

                        //監視するディレクトリを指定
                        ConfigWatchDog.Path = directoryPath;

                        //最終更新日時の変更のみを監視する
                        ConfigWatchDog.NotifyFilter = NotifyFilters.LastWrite;

                        //CheckFile.txtを監視
                        ConfigWatchDog.Filter = fileName;

                        //イベントハンドラの追加
                        ConfigWatchDog.Changed += new System.IO.FileSystemEventHandler(watcher_Changed);
                        ConfigWatchDog.Created += new System.IO.FileSystemEventHandler(watcher_Changed);
                        ConfigWatchDog.Deleted += new System.IO.FileSystemEventHandler(watcher_Changed);

                        //監視を開始する
                        ConfigWatchDog.EnableRaisingEvents = true;
                    }
                    catch
                    {

                    }
                    break;
                case Key.F11:
                case Key.F12:
                    pushedKey = e.Key.ToString();
                    break;
                case Key.System:
                    if (e.SystemKey == Key.F10)
                    {
                        pushedKey = "F10";
                    }
                    break;
            }
            
        }
Beispiel #2
0
        private void OnKeyDownHandler(object sender, KeyEventArgs e)
        {
            // 下がったキーがAキーの場合
            
            if (e.Key == Key.C)
            {
                bdo_toolbox.config conf = new config();
                conf.Show();
                string directoryPath = BDOToolBoxStartupPath;
                string fileName = "config.ini";

                try
                {
                    // ConfigWatchDog = new FileSystemWatcher();

                    //監視するディレクトリを指定
                    ConfigWatchDog.Path = directoryPath;

                    //最終更新日時の変更のみを監視する
                    ConfigWatchDog.NotifyFilter = NotifyFilters.LastWrite;

                    //CheckFile.txtを監視
                    ConfigWatchDog.Filter = fileName;

                    //イベントハンドラの追加
                    ConfigWatchDog.Changed += new System.IO.FileSystemEventHandler(watcher_Changed);
                    ConfigWatchDog.Created += new System.IO.FileSystemEventHandler(watcher_Changed);
                    ConfigWatchDog.Deleted += new System.IO.FileSystemEventHandler(watcher_Changed);

                    //監視を開始する
                    ConfigWatchDog.EnableRaisingEvents = true;
                }
                catch
                {

                }
            }

        }
Beispiel #3
0
        public void ReadIni()
        {
            this.Dispatcher.BeginInvoke(new Action(() =>
            {
                StreamReader SettingRead = new StreamReader(new FileStream("config.ini", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
                string stresult = string.Empty;

                var ReadLineCount = 0;
                string sttemp = string.Empty;
                bdo_toolbox.config conf = new config();
                while (SettingRead.Peek() >= 0)
                {
                    // ファイルを 1 行ずつ読み込む
                    string stBuffer = SettingRead.ReadLine();
                    if (stBuffer.Contains("UILang = Japanese"))
                    {
                       
                        lang_en.Content = "英語";
                        lang_ja.Content = "日本語";
                        lang_scn.Content = "中国語(簡体)";
                        lang_tcn.Content = "中国語(繁体α)";
                        lang_ru.Content = "ロシア語";
                        targersrv_kr.Content = "韓国";
                        targetsrv_eu.Content = "北米/欧州";
                        targetsrv_jp.Content = "日本";
                        targetsrv_ru.Content = "ロシア";
                        Install.Content = "パッチインストール";
                        Uninstall.Content = "パッチアンインストール";
                        RoutingAssigner.Content = "ルーティングアサイナ";
                        Ping_Show.Content = "Ping表示";
                        Language = "Japanese";
                    }
                    if (stBuffer.Contains("UILang = English"))
                    {
                        
                        Language = "English";
                        
                        lang_en.Content = "English";
                        lang_ja.Content = "Japanese";
                        lang_scn.Content = "Chinese(simplified)";
                        lang_tcn.Content = "Chinese(traditional α)";
                        lang_ru.Content = "Russian";
                        targersrv_kr.Content = "Korea";
                        targetsrv_eu.Content = "EU/NA";
                        targetsrv_jp.Content = "Japan";
                        targetsrv_ru.Content = "Russia";
                        Install.Content = "Install Patch";
                        Uninstall.Content = "Uninstall Patch";
                        RoutingAssigner.Content = "Routing Assigner";
                        Ping_Show.Content = "Show Ping";
                        
                    }
                    if (stBuffer.Contains("UILang = T_Chinese"))
                    {
                        
                        Language = "T_Chinese";
                        
                        lang_en.Content = "英語";
                        lang_ja.Content = "日本語";
                        lang_scn.Content = "簡體中文";
                        lang_tcn.Content = "繁體中文(α)";
                        lang_ru.Content = "俄語";
                        targersrv_kr.Content = "韓服";
                        targetsrv_eu.Content = "欧美服";
                        targetsrv_jp.Content = "日服";
                        targetsrv_ru.Content = "俄服";
                        Install.Content = "安裝補丁";
                        Uninstall.Content = "卸載補丁";
                        RoutingAssigner.Content = "路由分配器";
                        Ping_Show.Content = "顯示Ping";
                        
                    }
                    if (stBuffer.Contains("UILang = S_Chinese"))
                    {
                        
                        Language = "S_Chinese";
                        
                        lang_en.Content = "英语";
                        lang_ja.Content = "日语";
                        lang_scn.Content = "简体中文";
                        lang_tcn.Content = "繁体中文(α)";
                        lang_ru.Content = "俄语";
                        targersrv_kr.Content = "韩服";
                        targetsrv_eu.Content = "欧美服";
                        targetsrv_jp.Content = "日服";
                        targetsrv_ru.Content = "俄服";
                        Install.Content = "安装补丁";
                        Uninstall.Content = "卸载补丁";
                        RoutingAssigner.Content = "路由分配器";
                        Ping_Show.Content = "显示Ping";
                        
                    }
                    if (stBuffer.Contains("UseBuiltData = 1"))
                    {
                        builtflag = true;
                    }

                }
                SettingRead.Close();
                SettingRead.Dispose();
                SettingRead = null;
            }));
    

        }
Beispiel #4
0
        public void ReadConfigIni()
        {
            StreamReader SettingRead = new StreamReader(new FileStream("config.ini", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
            string stresult = string.Empty;
            
            var ReadLineCount = 0;
            string sttemp = string.Empty;
            bdo_toolbox.config conf = new config();
            while (SettingRead.Peek() >= 0)
            {
                // ファイルを 1 行ずつ読み込む
                string stBuffer = SettingRead.ReadLine();
                if(stBuffer.Contains("UILang = Japanese"))
                {
                    MainWindow Main = new MainWindow();
                    Main.Install.Content = "パッチインストール";
                    UILang_English.Content = "英語(English)";
                    UILang_Japanese.Content = "日本語(japanese)";
                    UILang_ChineseS.Content = "中国語(簡体)(S_Chinese)";
                    UILang_ChineseT.Content = "中国語(繁体)(T_Chinese)";
                    upd.Content = "アップデートサーバー";
                    usebuiltdata.Content = "構築されたデータを使用";
                    Apply.Content = "適用(A)";
                    UILang_Japanese.IsChecked = true;
                }
                if(stBuffer.Contains("UILang = English"))
                {


                    MainWindow Main = new MainWindow();
                    Main.Install.Content ="Patch Install";
                    UILang_English.Content = "English";
                    UILang_Japanese.Content = "Japanese";
                    UILang_ChineseS.Content = "Chinese(simplified)";
                    UILang_ChineseT.Content = "Chinese(Traditional)";
                    upd.Content = "Update Server";
                    usebuiltdata.Content = "Use Built Data";
                    Apply.Content = "Apply(A)";
                    UILang_English.IsChecked = true;
                }
                if (stBuffer.Contains("UILang = S_Chinese"))
                {
                    UILang_English.Content = "英语(English)";
                    UILang_Japanese.Content = "日本语(Japanese)";
                    UILang_ChineseS.Content = "简体中文(S_Chinese)";
                    UILang_ChineseT.Content = "繁体中文(T_Chinese)";
                    upd.Content = "更新服务器URL";
                    usebuiltdata.Content = "使用构建的数据";
                    Apply.Content = "应用(A)";
                    UILang_ChineseS.IsChecked = true;
                }
                if (stBuffer.Contains("UILang = T_Chinese"))
                {
                    UILang_English.Content = "英語(English)";
                    UILang_Japanese.Content = "日本語(Japanese)";
                    UILang_ChineseS.Content = "簡體中文(S_Chinese)";
                    UILang_ChineseT.Content = "繁體中文(T_Chinese)";
                    upd.Content = "更新服務器URL";
                    usebuiltdata.Content = "使用構建的數據";
                    Apply.Content = "應用(A)";
                    UILang_ChineseT.IsChecked = true;
                }
                if (stBuffer.Contains("UseBuiltData = 1"))
                {
                    //builtflag = true;
                }
                //MessageBox.Show(stBuffer);
            }
            
            SettingRead.Close();
            SettingRead.Dispose();
            SettingRead = null;

        }
Beispiel #5
0
        private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            string pushedKey = "";

            switch (e.Key)
            {
            case Key.F1:
                //DebugRefresh_JPToTCN();
                break;

            case Key.F2:
            case Key.F3:
            case Key.F4:
            case Key.F5:
            case Key.F6:
            case Key.F7:
            case Key.F8:
            case Key.Escape:
                Environment.Exit(0);
                break;

            case Key.V:
                Message.UnAvailable_Message();
                break;

            case Key.D:
                Message.UnAvailable_Message();
                break;

            case Key.C:
                bdo_toolbox.config conf = new config();
                conf.Show();
                string directoryPath = BDOToolBoxStartupPath;
                string fileName      = "config.ini";

                try
                {
                    // ConfigWatchDog = new FileSystemWatcher();

                    //監視するディレクトリを指定
                    ConfigWatchDog.Path = directoryPath;

                    //最終更新日時の変更のみを監視する
                    ConfigWatchDog.NotifyFilter = NotifyFilters.LastWrite;

                    //CheckFile.txtを監視
                    ConfigWatchDog.Filter = fileName;

                    //イベントハンドラの追加
                    ConfigWatchDog.Changed += new System.IO.FileSystemEventHandler(watcher_Changed);
                    ConfigWatchDog.Created += new System.IO.FileSystemEventHandler(watcher_Changed);
                    ConfigWatchDog.Deleted += new System.IO.FileSystemEventHandler(watcher_Changed);

                    //監視を開始する
                    ConfigWatchDog.EnableRaisingEvents = true;
                }
                catch
                {
                }
                break;

            case Key.F11:
            case Key.F12:
                pushedKey = e.Key.ToString();
                break;

            case Key.System:
                if (e.SystemKey == Key.F10)
                {
                    pushedKey = "F10";
                }
                break;
            }
        }
Beispiel #6
0
 private void Config_Click(object sender, RoutedEventArgs e)
 {
     bdo_toolbox.config conf = new config();
     conf.Show();
     StartWatchdog();
 }
Beispiel #7
0
        public void ReadConfigIni()
        {
            StreamReader SettingRead = new StreamReader(new FileStream("config.ini", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
            string stresult = string.Empty;

            var ReadLineCount = 0;
            string sttemp = string.Empty;
            bdo_toolbox.config conf = new config();
            while (SettingRead.Peek() >= 0)
            {
                // ファイルを 1 行ずつ読み込む
                string stBuffer = SettingRead.ReadLine();
                if (stBuffer.Contains("UILang = Japanese"))
                {
                    MenuClose.Header = "閉じる";
                }
                if (stBuffer.Contains("UILang = English"))
                {

                    MenuClose.Header = "Close";

                }
                if (stBuffer.Contains("UILang = S_Chinese"))
                {
                    
                    MenuClose.Header = "关闭";
                }
                if (stBuffer.Contains("UILang = T_Chinese"))
                {
                    MenuClose.Header = "關閉";
                }
                if (stBuffer.Contains("UseBuiltData = 1"))
                {
                    //builtflag = true;
                }
                //MessageBox.Show(stBuffer);
            }

            SettingRead.Close();
            SettingRead.Dispose();
            SettingRead = null;

        }