Example #1
0
        public void Check_UILanguageWrapping()
        {
            nUILang = CheckPOEUILanguage();

            if (nUILang == UI_LANG.UI_ERROR) // Can't Read UI Language from POE Config File
            {
                this.Close();
                Environment.Exit(0);
            }
            else if (nUILang == UI_LANG.UI_KOREAN)
            {
                RegExZoneEntered           = new Regex(@": (.*)에 진입했습니다.", RegexOptions.IgnoreCase); // for Korean Client. ex) [INFO Client 14932] : 오아시스에 진입했습니다.
                RegExMonsterRemains        = new Regex(@": 몬스터 (.*)개체가 남아있습니다.");                    // : 몬스터 0개체가 남아있습니다.
                RegExMonsterRemainsKORMore = new Regex(@": 몬스터가 (.*)개체 이상 남아있습니다.");                 // : 몬스터가 50개체 이상 남아있습니다.
            }
            else if (nUILang == UI_LANG.UI_ENGLISH)
            {
                RegExZoneEntered           = new Regex(@"You have entered (.*)\.", RegexOptions.IgnoreCase);
                RegExMonsterRemains        = new Regex(@": (.*) monsters remain.");           // : 3 monsters remain.
                RegExMonsterRemainsENGMore = new Regex(@": More than (.*) monsters remain."); // : More than 50 monsters remain.
            }
        }
Example #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            // On Working Monitor
            this.Location = Screen.AllScreens[0].WorkingArea.Location;
            CenterToScreen();
            this.TopMost = true;
            zoneName     = "?";
            actString    = "?";

            currentDirectory = Application.StartupPath;

            bIsMinimized = false;

            bool bRet = ReadDirectionHelperData();

            if (bRet == false)
            {
                this.Close();
                Application.Exit();
            }

            /*
             * [DIRECTIONHELPER]
             * POELOGPATH="SET"
             */

            string strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");

            if (LauncherForm.resolution_width < 1920 && LauncherForm.resolution_height < 1080)
            {
                strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_1600_1024.ini");
                if (LauncherForm.resolution_width < 1600 && LauncherForm.resolution_height < 1024)
                {
                    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_1280_768.ini");
                }
                else if (LauncherForm.resolution_width < 1280)
                {
                    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_LOW.ini");
                }
            }
            else if (LauncherForm.resolution_width > 1920)
            {
                strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_HIGH.ini");
            }

            IniParser parser = new IniParser(strINIPath);

            DeadlyLog4Net._log.Info($"{MethodBase.GetCurrentMethod().Name} RESOLUTION : " + strINIPath);

            try
            {
                noteLabel.Text = "";
                string strLastPart = parser.GetSetting("INITPART", "LASTPART");
                if (strLastPart == "1")
                {
                    partTwo = false;
                }
                else if (strLastPart == "2")
                {
                    partTwo = true;
                }

                /*
                 * [LOCATION]
                 * LEFT=1385
                 * TOP=941
                 * ISMIN=N
                 */
                string sLeft = parser.GetSetting("LOCATION", "LEFT");
                string sTop  = parser.GetSetting("LOCATION", "TOP");
                string sMin  = parser.GetSetting("LOCATION", "ISMIN");

                if (sLeft != "CENTER" && sTop != "CENTER")
                {
                    StartPosition = FormStartPosition.Manual;
                    Left          = Int32.Parse(sLeft);
                    Top           = Int32.Parse(sTop);
                }
            }
            catch
            {
                StartPosition = FormStartPosition.Manual;
                Left          = 0;
                Top           = 0;
            }

            if (actString == "?")
            {
                actString = DeadlyZoneInform.GetActROMAbyZoneName(zoneName, partTwo);
            }

            if (actString == "I" || actString == "II" || actString == "III" || actString == "IV" || actString == "V")
            {
                //parser.AddSetting("INITPART", "LASTPART", "1");
                noteLabel.Text = "마을입니다.";
            }
            else if (actString == "VI" || actString == "VII" || actString == "VIII" || actString == "IX" || actString == "X")
            {
                //parser.AddSetting("INITPART", "LASTPART", "2");
                noteLabel.Text = "마을입니다.";
            }
            else if (actString == "O")
            {
                //parser.AddSetting("INITPART", "LASTPART", "2");
                noteLabel.Text = "액트 클리어를 축하드립니다.";
            }
            else if (actString == "Z")
            {
                //parser.AddSetting("INITPART", "LASTPART", "2");
                noteLabel.Text = "지도의 대가 자나를 만나보세요.";
            }
            else if (actString == "H")
            {
                //parser.AddSetting("INITPART", "LASTPART", "2");
                noteLabel.Text = "멋진 은신처군요~!";
            }
            else
            {
                //parser.AddSetting("INITPART", "LASTPART", "3");
                noteLabel.Text = "정보가 없습니다. (더블클릭시에도 나타나지 않으면 지역 정보가 충분히 파악되지 않았거나, 정보가 없어도 진행이 가능한 지역입니다.)";
            }
            //parser.AddSetting("INITPART", "zoneName", zoneName);
            //parser.AddSetting("INITPART", "actString", actString);
            //parser.SaveSettings();

            btnLangText    = String.Format("Act {0} : {1}", actString, zoneName);
            btnLang.Text   = btnLangText;
            btnUILANG.Text = "[" + LauncherForm.g_strUILang + "]";

            if (LauncherForm.g_strUILang == "KOR")
            {
                nUILang = UI_LANG.UI_KOREAN;
            }
            else if (LauncherForm.g_strUILang == "ENG")
            {
                nUILang = UI_LANG.UI_ENGLISH;
            }
            else
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.btmConfirm.Visible = false;
                frmMSG.btnENG.Visible     = true;
                frmMSG.btnKOR.Visible     = true;
                frmMSG.lbMsg.Text         = "Can't find POE UI Configuration. What is your OPTION-UI Languge in POE?" +
                                            "\r\n\r\n(언어 설정을 확인할 수 없습니다. 옵션-UI에서 어떤 언어를 사용하고 계신가요?)";
                DialogResult dr = frmMSG.ShowDialog();
                if (dr == DialogResult.Yes)
                {
                    LauncherForm.g_strUILang          = "KOR";
                    LauncherForm.g_strExplanationLANG = LauncherForm.g_strUILang;

                    nUILang = UI_LANG.UI_KOREAN;
                }
                else
                {
                    LauncherForm.g_strUILang          = "ENG";
                    LauncherForm.g_strExplanationLANG = LauncherForm.g_strUILang;

                    nUILang = UI_LANG.UI_ENGLISH;
                }
            }
        }