Пример #1
0
        public MainForm()
        {
            InitializeComponent();
            Text = "DeadlyTradeForPOE";

            Init_Controls();
            DeadlyZoneInform.InitActZoneDictionary(); // Act, Zone, Currency
        }
Пример #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;
                }
            }
        }
Пример #3
0
        public void DrawPartTwoImage()
        {
            bSeedFound = false;

            string image = null;

            PictureBox[] picBox = { pictureBox1, pictureBox2, pictureBox3, pictureBox4 };
            image = String.Format("{0}\\Overlays\\{1}.jpg", currentDirectory, "no_overlay");

            var seedList = FindZoneName(zoneName);
            int nIndex   = 0;

            if (seedList.Item2.Length > 0)
            {
                foreach (var seed in seedList.Item2)
                {
                    actString = seedList.Item1;
                    string[] actROMA = actString.Split(separatingStrings, System.StringSplitOptions.RemoveEmptyEntries);
                    actString = actROMA[0];
                    image     = String.Format("{0}\\Overlays\\{1}\\{2}.jpg", currentDirectory, seedList.Item1, seed);

                    if (!File.Exists(image))
                    {
                        image = String.Format("{0}\\Overlays\\{1}\\bug.jpg", currentDirectory, seedList.Item1);
                    }

                    // IMAGE
                    picBox[nIndex].Load(image);
                    picBox[nIndex].SizeMode = PictureBoxSizeMode.StretchImage;

                    // TEXT
                    noteLabel.Text = seedList.Item3;
                    bSeedFound     = true;

                    nIndex++;
                }
            }

            /*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");
             * }
             * IniParser parser = new IniParser(strINIPath);*/
            if (actString == "?")
            {
                actString = DeadlyZoneInform.GetActROMAbyZoneName(zoneName, partTwo);
            }

            if (actString == "I" || actString == "II" || actString == "III" || actString == "IV" || actString == "V")
            {
                //parser.AddSetting("INITPART", "LASTPART", "1");
                if (!bSeedFound)
                {
                    noteLabel.Text = "마을입니다.";
                }
            }
            else if (actString == "VI" || actString == "VII" || actString == "VIII" || actString == "IX" || actString == "X")
            {
                //parser.AddSetting("INITPART", "LASTPART", "2");
                if (!bSeedFound)
                {
                    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 + "]";
        }