예제 #1
0
        public static void FlaskImageTimerFromINI()
        {
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);

            string strImageNumber = String.Empty;

            // 1
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE1");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(0, 0);
            }
            else
            {
                g_nFlaskImageTimer.Add(0, Convert.ToInt32(strImageNumber));
            }
            // 2
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE2");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(1, 1);
            }
            else
            {
                g_nFlaskImageTimer.Add(1, Convert.ToInt32(strImageNumber));
            }
            // 3
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE3");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(2, 2);
            }
            else
            {
                g_nFlaskImageTimer.Add(2, Convert.ToInt32(strImageNumber));
            }
            // 4
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE4");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(3, 3);
            }
            else
            {
                g_nFlaskImageTimer.Add(3, Convert.ToInt32(strImageNumber));
            }
            // 5
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE5");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(4, 4);
            }
            else
            {
                g_nFlaskImageTimer.Add(4, Convert.ToInt32(strImageNumber));
            }

            parser = null;
        }
예제 #2
0
        private void SetFormStyle()
        {
            this.ControlBox = false;
            this.Text       = String.Empty;

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

            try
            {
                string sLeft = parser.GetSetting("MISC", "GUIDELEFT");
                string sTop  = parser.GetSetting("MISC", "GUIDETOP");

                Left = Convert.ToInt32(sLeft);
                Top  = Convert.ToInt32(sTop);
            }
            catch
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.lbMsg.Text = "Can't read Configuration file. Window posion force to (0,0)";
                frmMSG.ShowDialog();
                Left = 0;
                Top  = 0;
            }

            BringToFront();
        }
예제 #3
0
        private void ScanChatForm_Load(object sender, EventArgs e)
        {
            Visible = false;

            listViewChat.View          = View.Details;
            listViewChat.GridLines     = true;
            listViewChat.FullRowSelect = true;
            //listViewChat.

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

            try
            {
                string sLeft = parser.GetSetting("LOCATION", "SCANLEFT");
                string sTop  = parser.GetSetting("LOCATION", "SCANTOP");

                Left = Convert.ToInt32(sLeft);
                Top  = Convert.ToInt32(sTop);
            }
            catch (Exception ex)
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.lbMsg.Text = "Can't Read CHAT SCAN configuration.\r\n\r\ncheck your Configpath.ini case by game resolution.";
                frmMSG.ShowDialog();

                DeadlyLog4Net._log.Error($"catch {MethodBase.GetCurrentMethod().Name}", ex);
            }

            CheckMatchedTradeChat();

            Visible = true;
        }
예제 #4
0
        private void ImageOverlayFormAlva_Paint(object sender, PaintEventArgs e)
        {
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);
            string    sLeft      = parser.GetSetting("LOCATIONIMGALVA", "LEFT");
            string    sTop       = parser.GetSetting("LOCATIONIMGALVA", "TOP");
            string    sZoom      = parser.GetSetting("LOCATIONIMGALVA", "ZOOM");

            if (sLeft == null)
            {
                sLeft = "0";
            }
            if (sTop == null)
            {
                sTop = "0";
            }
            if (sZoom == null)
            {
                sZoom = "0";
            }

            gGDIfx = e.Graphics;
            gGDIfx.DrawImage(img, new Point(0, 25));
            this.Top    = Int32.Parse(sTop);
            this.Left   = Int32.Parse(sLeft);
            this.Width  = img.Width;
            this.Height = img.Height + 25;

            #region    Removed ⨌⨌

            /*switch (nButtonNumber)
             * {
             *  case 3: // Incursion.png
             *      gGDIfx.DrawImage(Bitmap.FromFile(@".\DeadlyInform\Incursion.png"), new Point(0, 25));
             *      break;
             *  case 4:// Betrayal.png
             *      gGDIfx.DrawImage(Bitmap.FromFile(@".\DeadlyInform\Betrayal.png"), new Point(0, 25));
             *      break;
             *  case 6: // ExpensiveItemB.png
             *      gGDIfx.DrawImage(Bitmap.FromFile(@".\DeadlyInform\ExpensiveItemB.png"), new Point(0, 25));
             *      break;
             *  case 7: // Atlas.png
             *      gGDIfx.DrawImage(Bitmap.FromFile(@".\DeadlyInform\Atlas.png"), new Point(0, 25));
             *      break;
             *  case 9: // Vendorrecipe.png
             *      gGDIfx.DrawImage(Bitmap.FromFile(@".\DeadlyInform\Vendorrecipe.png"), new Point(0, 25));
             *      break;
             *  case 0:
             *      gGDIfx.DrawImage(Bitmap.FromFile(@".\DeadlyInform\Currency.png"), new Point(0, 25));
             *      break;
             *  default:
             *      break;
             * }
             */
            #endregion
        }
예제 #5
0
        private void NotificationContainer_Load(object sender, EventArgs e)
        {
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);

            sLeft = parser.GetSetting("LOCATIONNOTIFY", "LEFT");
            sTop  = parser.GetSetting("LOCATIONNOTIFY", "TOP");

            this.Left = Convert.ToInt32(sLeft);
            this.Top  = Convert.ToInt32(sTop);
        }
예제 #6
0
        private void Get_Resolution()
        {
            // Get Addon Data & Pesonal Setting ( From My Games - Path of Exile )
            String strPathPOEConifg = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            strPathPOEConifg = strPathPOEConifg + "\\My Games\\Path of Exile\\production_Config.ini";
            IniParser parser = new IniParser(strPathPOEConifg);

            try
            {
                string strLanguage = parser.GetSetting("LANGUAGE", "language");
                if (strLanguage.Equals("ko-KR", StringComparison.OrdinalIgnoreCase))
                {
                    g_strUILang = "KOR";
                }
                else if (strLanguage.Equals("en", StringComparison.OrdinalIgnoreCase))
                {
                    g_strUILang = "ENG";
                }
                else
                {
                    g_strUILang = "UNKNOWN";
                }

                if (g_strUILang == "UNKNOWN")
                {
                    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?";
                    DialogResult dr = frmMSG.ShowDialog();
                    if (dr == DialogResult.Yes)
                    {
                        g_strUILang = "KOR";
                    }
                    else
                    {
                        g_strUILang = "ENG";
                    }
                }

                resolution_height = Convert.ToInt32(parser.GetSetting("DISPLAY", "resolution_height"));
                resolution_width  = Convert.ToInt32(parser.GetSetting("DISPLAY", "resolution_width"));
            }
            catch (Exception ex)
            {
                DeadlyLog4Net._log.Error($"catch {MethodBase.GetCurrentMethod().Name}", ex);
                g_strUILang       = "UNKNOWN";
                resolution_height = 0;
                resolution_width  = 0;
            }
        }
예제 #7
0
        public void Load_Image()
        {
            img = Bitmap.FromFile(m_strImagePath);

            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);

            string sZoom     = parser.GetSetting("LOCATIONIMG", "ZOOM");
            double dZoomSale = 1.0;

            if (Int32.Parse(sZoom) > 0)
            {
                dZoomSale = 1 + (Int32.Parse(sZoom) * 0.1);
            }
            img = DeadlyImageCommon.resizeImage(img, dZoomSale);
        }
        public void Load_Image()
        {
            img = Bitmap.FromFile(m_strImagePath);

            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);

            string sZoom = parser.GetSetting("LOCATIONIMGMAP", "ZOOM");

            // img = resizeImage(img, new Size(img.Width + Int32.Parse(sZoom), img.Height + Int32.Parse(sZoom)));
            img = DeadlyImageCommon.ScaleImage(img, img.Width + Int32.Parse(sZoom), img.Height + Int32.Parse(sZoom));
        }
예제 #9
0
        public void Load_Image()
        {
            img = Bitmap.FromFile(m_strImagePath);
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);
            string    sZoom      = parser.GetSetting("LOCATIONIMGALVA", "ZOOM");

            img = resizeImage(img, new Size(img.Width + Int32.Parse(sZoom), img.Height + Int32.Parse(sZoom)));
        }
예제 #10
0
        public UI_LANG CheckPOEUILanguage()
        {
            String strPathPOEConifg = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            strPathPOEConifg = strPathPOEConifg + "\\My Games\\Path of Exile\\production_Config.ini";
            IniParser parser = new IniParser(strPathPOEConifg);

            /*
             * [LANGUAGE]
             * language=en
             * language=ko-KR
             */
            string strLanguage = "";

            try
            {
                strLanguage = parser.GetSetting("LANGUAGE", "language");


                if (strLanguage.Equals("ko-KR", StringComparison.OrdinalIgnoreCase))
                {
                    g_strUILang = "KOR";
                    return(UI_LANG.UI_KOREAN);
                }
                else if (strLanguage.Equals("en", StringComparison.OrdinalIgnoreCase))
                {
                    g_strUILang = "ENG";
                    return(UI_LANG.UI_ENGLISH);
                }
                else
                {
                    // 언어 환경 설정 콤보박스를 한번도 건드리지 않은 사용자는 [LANGUAGE] 섹션이 없음
                    MSGForm frmMSG3 = new MSGForm();
                    frmMSG3.lbMsg.Text = "언어 설정을 확인할 수 없어서 한글로 인식합니다.\r\n옵션-UI-언어를 확인해주세요.\r\n\r\n게임 옵션에서 언어 변경 후 저장하시면\r\nPOE의 설정 파일에 기록됩니다.";
                    frmMSG3.ShowDialog();
                    g_strUILang = "KOR";
                    return(UI_LANG.UI_KOREAN);
                }
            }
            catch
            {
                /*MSGForm frmMSG4 = new MSGForm();
                 * frmMSG4.lbMsg.Text = "패스오브엑자일 환경 파일을 읽을 수 없습니다.\r\n\r\n패스오브엑자일을 한번이라도 실행하신 후\r\n\r\n다시 POE COMPASS를 실행해주세요.";
                 * frmMSG4.ShowDialog();
                 * return UI_LANG.UI_ERROR;*/

                // 언어 환경 설정 콤보박스를 한번도 건드리지 않은 사용자는 [LANGUAGE] 섹션이 없음 || 또는, PC방 사용자가 꺼져있는 컴을 켜고 처음 실행시켰을 때.
                MSGForm frmMSG3 = new MSGForm();
                frmMSG3.lbMsg.Text = "언어 설정을 확인할 수 없어서 한글로 인식합니다.\r\n옵션-UI-언어를 확인해주세요.\r\n\r\n게임 옵션에서 언어 변경 후 저장하시면\r\nPOE의 설정 파일에 기록됩니다.";
                frmMSG3.ShowDialog();
                g_strUILang = "KOR";
                return(UI_LANG.UI_KOREAN);
            }
        }
예제 #11
0
        public void Load_Image()
        {
            img = Bitmap.FromFile(m_strImagePath);

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

            string sZoom = parser.GetSetting("LOCATIONIMGALVA", "ZOOM");

            nZoom = Convert.ToInt32(sZoom);
            SetImage();
        }
예제 #12
0
        private void BtnZoomIn_Click(object sender, EventArgs e)
        {
            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);

            string sZoom = parser.GetSetting("LOCATIONIMG", "ZOOM");

            nZoom = Int32.Parse(sZoom);

            img   = Bitmap.FromFile(m_strImagePath);
            nZoom = nZoom + 100;
            if (img.Width + nZoom <= 1920 && img.Height + nZoom <= 1080)
            {
                double dZoomSale = 1.0;
                if (nZoom > 0)
                {
                    dZoomSale = 1 + (nZoom * 0.1);
                }
                img = DeadlyImageCommon.resizeImage(img, dZoomSale);

                parser.AddSetting("LOCATIONIMG", "ZOOM", nZoom.ToString());
                parser.SaveSettings();

                this.Invalidate();
                this.Update();
                this.Refresh();
            }
        }
예제 #13
0
        private void BtnZoomOut_Click(object sender, EventArgs e)
        {
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);

            string sZoom = parser.GetSetting("LOCATIONIMGMAP", "ZOOM");

            nZoom = Int32.Parse(sZoom);
            nZoom = nZoom - 1;
            if (!SetImage())
            {
                nZoom = nZoom + 1;
            }
            else
            {
                parser.AddSetting("LOCATIONIMGMAP", "ZOOM", nZoom.ToString());
                parser.SaveSettings();
            }
        }
예제 #14
0
        private void Get_POEPath()
        {
            string strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");

            if (!File.Exists(strINIPath))
            {
                g_strPOEPath = "Can't Find POE Path in DeadlyTrade Config File.";
                DeadlyLog4Net._log.Info($"{MethodBase.GetCurrentMethod().Name} : " + g_strPOEPath);
                lablePath.Text = g_strPOEPath;

                return;
            }

            if (g_strUILang != "UNKNOWN" && resolution_height != 0 && resolution_width != 0)
            {
                strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
                IniParser parser = new IniParser(strINIPath);

                try
                {
                    g_strPOEPath = parser.GetSetting("DIRECTIONHELPER", "POELOGPATH");

                    string[] wordsPOEPathfromConfig = g_strPOEPath.Split('\\');
                    g_strPOEPath = "";
                    for (int nIndex = 0; nIndex < wordsPOEPathfromConfig.Length - 2; nIndex++)
                    {
                        g_strPOEPath = g_strPOEPath + wordsPOEPathfromConfig[nIndex] + "\\";
                    }

                    lablePath.Text        = g_strPOEPath;
                    btnStartCheck.Visible = true;
                }
                catch
                {
                    g_strPOEPath   = "Can't Find POE Path in DeadlyTrade Config File.";
                    lablePath.Text = g_strPOEPath;
                }
            }
        }
예제 #15
0
        private void BtnZoomIn_Click(object sender, EventArgs e)
        {
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);
            string    sZoom      = parser.GetSetting("LOCATIONIMGALVA", "ZOOM");

            nZoom = Int32.Parse(sZoom);

            img   = Bitmap.FromFile(m_strImagePath);
            nZoom = nZoom + 100;
            if (img.Width + nZoom <= 1920 && img.Height + nZoom <= 1080)
            {
                img = resizeImage(img, new Size(img.Width + nZoom, img.Height + nZoom));

                parser.AddSetting("LOCATIONIMGALVA", "ZOOM", nZoom.ToString());
                parser.SaveSettings();

                this.Invalidate();
                this.Update();
                this.Refresh();
            }
        }
예제 #16
0
        private void ScanChatForm_Load(object sender, EventArgs e)
        {
            Visible = false;

            if (LauncherForm.g_strUILang == "ENG")
            {
                labelTop1.Text    = "Word seperator is ';'";
                labelTop2.Text    = "(ex: wts;sell;wtb;buy)";
                labelInclude.Text = "Include";
                labelExclude.Text = "Exclude";
                btnClear.Text     = "Clear";
                btnWhisper.Text   = "Whisper";
                btnWhois.Text     = "Who is?";
                btnHide.Text      = "Close";
            }

            listViewChat.View          = View.Details;
            listViewChat.GridLines     = true;
            listViewChat.FullRowSelect = true;

            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);

            try
            {
                string sLeft = parser.GetSetting("LOCATION", "SCANLEFT");
                string sTop  = parser.GetSetting("LOCATION", "SCANTOP");

                Left = Convert.ToInt32(sLeft);
                Top  = Convert.ToInt32(sTop);
            }
            catch (Exception ex)
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.lbMsg.Text = "Can't Read CHAT SCAN configuration.\r\n\r\ncheck your Configpath.ini case by game resolution.";
                frmMSG.ShowDialog();

                DeadlyLog4Net._log.Error($"catch {MethodBase.GetCurrentMethod().Name}", ex);
            }

            CheckMatchedTradeChat();

            Visible = true;
        }
예제 #17
0
        private void Init_Controls()
        {
            // btnClose
            btnClose.FlatStyle = FlatStyle.Flat;
            btnClose.BackColor = Color.Transparent;
            btnClose.FlatAppearance.MouseDownBackColor = Color.Transparent;
            btnClose.FlatAppearance.MouseOverBackColor = Color.Transparent;
            btnClose.FlatAppearance.BorderColor        = Color.FromArgb(0, 255, 255, 255);
            btnClose.FlatAppearance.BorderSize         = 0;
            btnClose.TabStop = false;

            // btnClose2nd
            btnClose2nd.FlatStyle = FlatStyle.Flat;
            btnClose2nd.BackColor = Color.Transparent;
            btnClose2nd.FlatAppearance.MouseDownBackColor = Color.Transparent;
            btnClose2nd.FlatAppearance.MouseOverBackColor = Color.Transparent;
            btnClose2nd.FlatAppearance.BorderColor        = Color.FromArgb(0, 255, 255, 255);
            btnClose2nd.FlatAppearance.BorderSize         = 0;
            btnClose2nd.TabStop = false;

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

            string strLeft   = "";
            string strTop    = "";
            string strRight  = "";
            string strBottom = "";

            try
            {
                strLeft   = parser.GetSetting("LOCATIONGRID", "LEFT");
                strTop    = parser.GetSetting("LOCATIONGRID", "TOP");
                strRight  = parser.GetSetting("LOCATIONGRID", "RIGHT");
                strBottom = parser.GetSetting("LOCATIONGRID", "BOTTOM");

                this.Left   = Convert.ToInt32(strLeft);
                this.Top    = Convert.ToInt32(strTop);
                this.Width  = Convert.ToInt32(strRight);
                this.Height = Convert.ToInt32(strBottom);
            }
            catch
            {
                /*
                 * // 4x4로 맞춰본 결과. 특별히 손안대도 맞는 1920*1080 해상도의 기본 위치
                 *  [LOCATIONGRID]
                 *  LEFT=19
                 * TOP=166
                 * BOTTOM=628
                 * RIGHT=628
                 */
                this.Left   = 19;
                this.Top    = 166;
                this.Width  = 628;
                this.Height = 628;
                parser.AddSetting("LOCATIONGRID", "LEFT", this.Left.ToString());
                parser.AddSetting("LOCATIONGRID", "TOP", this.Top.ToString());
                parser.AddSetting("LOCATIONGRID", "RIGHT", this.Width.ToString());
                parser.AddSetting("LOCATIONGRID", "BOTTOM", this.Height.ToString());
                parser.SaveSettings();
            }
        }
예제 #18
0
        public static void FlaskImageTimerFromINI()
        {
            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);

            string strImageNumber = String.Empty;

            // 1
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE1");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(0, 0);
            }
            else
            {
                g_nFlaskImageTimer.Add(0, Convert.ToInt32(strImageNumber));
            }
            // 2
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE2");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(1, 1);
            }
            else
            {
                g_nFlaskImageTimer.Add(1, Convert.ToInt32(strImageNumber));
            }
            // 3
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE3");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(2, 2);
            }
            else
            {
                g_nFlaskImageTimer.Add(2, Convert.ToInt32(strImageNumber));
            }
            // 4
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE4");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(3, 3);
            }
            else
            {
                g_nFlaskImageTimer.Add(3, Convert.ToInt32(strImageNumber));
            }
            // 5
            strImageNumber = parser.GetSetting("MISC", "FLASKIMAGE5");
            if (String.IsNullOrEmpty(strImageNumber))
            {
                g_nFlaskImageTimer.Add(4, 4);
            }
            else
            {
                g_nFlaskImageTimer.Add(4, Convert.ToInt32(strImageNumber));
            }

            parser = null;
        }
예제 #19
0
        private void FlaskICONTimer_Load(object sender, EventArgs e)
        {
            Visible            = false;
            this.StartPosition = FormStartPosition.Manual;

            uint exstyleGet = InteropCommon.GetWindowLong(this.Handle, m_nExStyleNum);

            InteropCommon.SetWindowLong(this.Handle, m_nExStyleNum, exstyleGet | WS_EX_LAYERED | WS_EX_TRANSPARENT);

            #region    Get Information from ConfigPath.ini ⨌⨌
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);

            string sColor = string.Empty;
            try
            {
                string sLeft = string.Empty;
                string sTop  = string.Empty;
                if (nFlaskNumber == 1)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK1LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK1TOP");
                    sColor = parser.GetSetting("MISC", "FLASK1COLOR");
                    pictureFlask.BackgroundImage = Image.FromFile(Application.StartupPath + "\\DeadlyInform\\Flask\\"
                                                                  + DeadlyTranslation.FlaskImgPath[DeadlyFlaskImage.FlaskImageTimerGetValuebyKey(0)]);
                }
                else if (nFlaskNumber == 2)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK2LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK2TOP");
                    sColor = parser.GetSetting("MISC", "FLASK2COLOR");
                    pictureFlask.BackgroundImage = Image.FromFile(Application.StartupPath + "\\DeadlyInform\\Flask\\"
                                                                  + DeadlyTranslation.FlaskImgPath[DeadlyFlaskImage.FlaskImageTimerGetValuebyKey(1)]);
                }
                else if (nFlaskNumber == 3)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK3LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK3TOP");
                    sColor = parser.GetSetting("MISC", "FLASK3COLOR");
                    pictureFlask.BackgroundImage = Image.FromFile(Application.StartupPath + "\\DeadlyInform\\Flask\\"
                                                                  + DeadlyTranslation.FlaskImgPath[DeadlyFlaskImage.FlaskImageTimerGetValuebyKey(2)]);
                }
                else if (nFlaskNumber == 4)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK4LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK4TOP");
                    sColor = parser.GetSetting("MISC", "FLASK4COLOR");
                    pictureFlask.BackgroundImage = Image.FromFile(Application.StartupPath + "\\DeadlyInform\\Flask\\"
                                                                  + DeadlyTranslation.FlaskImgPath[DeadlyFlaskImage.FlaskImageTimerGetValuebyKey(3)]);
                }
                else if (nFlaskNumber == 5)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK5LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK5TOP");
                    sColor = parser.GetSetting("MISC", "FLASK5COLOR");
                    pictureFlask.BackgroundImage = Image.FromFile(Application.StartupPath + "\\DeadlyInform\\Flask\\"
                                                                  + DeadlyTranslation.FlaskImgPath[DeadlyFlaskImage.FlaskImageTimerGetValuebyKey(4)]);
                }

                Left = Convert.ToInt32(sLeft);
                Top  = Convert.ToInt32(sTop);
            }
            catch
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.lbMsg.Text = "FLASK 환경 파일을 읽을 수 없습니다.\r\n\r\nini 파일이 손상되었거나 삭제되었습니다.";
                frmMSG.ShowDialog();
            }
            #endregion

            xuiFlatProgressBar1.MaxValue      = 100; // Convert.ToInt32(lnFlaskTimer);
            xuiFlatProgressBar1.Value         = 100;
            xuiFlatProgressBar1.CompleteColor = StringRGBToColor(sColor);
            lnMaxValue = lnFlaskTimer;

            BringToFront();

            timer1.Start();
            Visible = true;
        }
예제 #20
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;
                }
            }
        }
예제 #21
0
        private void SkillTimerForm_Load(object sender, EventArgs e)
        {
            Visible            = false;
            this.StartPosition = FormStartPosition.Manual;

            uint exstyleGet = InteropCommon.GetWindowLong(this.Handle, m_nExStyleNum);
            uint nRet       = InteropCommon.SetWindowLong(this.Handle, m_nExStyleNum, exstyleGet | WS_EX_LAYERED | WS_EX_TRANSPARENT);

            #region    Get Information from ConfigPath.ini ⨌⨌
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);

            try
            {
                /*
                 * [SKILL]
                 * SKILLTIME2=9.5
                 * SKILLTIME5=9.5
                 * TOGGLESKILL3ON=FALSE
                 * TOGGLESKILL1ON=FALSE
                 * SKILLTIME1=9.5
                 * SKILLTIME4=9.5
                 * TOGGLESKILL5ON=FALSE
                 * SKILLTIME3=9.5
                 * TOGGLESKILL2ON=FALSE
                 * TOGGLESKILL4ON=FALSE
                 * SKILL1LEFT=314
                 * SKILL1TOP=1019
                 * SKILL1COLOR=255,0,255
                 * SKILL2LEFT=364
                 * SKILL2TOP=1019
                 * SKILL2COLOR=255,0,255
                 * SKILL3LEFT=404
                 * SKILL3TOP=1019
                 * SKILL3COLOR=255,0,255
                 * SKILL4LEFT=454
                 * SKILL4TOP=1019
                 * SKILL4COLOR=255,0,255
                 * SKILL5LEFT=494
                 * SKILL5TOP=1019
                 * SKILL5COLOR=255,0,255
                 */
                string sLeft  = string.Empty;
                string sTop   = string.Empty;
                string sColor = string.Empty;
                if (nSkillNumber == 1)
                {
                    sLeft  = parser.GetSetting("SKILL", "SKILL1LEFT");
                    sTop   = parser.GetSetting("SKILL", "SKILL1TOP");
                    sColor = parser.GetSetting("SKILL", "SKILL1COLOR");
                }
                else if (nSkillNumber == 2)
                {
                    sLeft  = parser.GetSetting("SKILL", "SKILL2LEFT");
                    sTop   = parser.GetSetting("SKILL", "SKILL2TOP");
                    sColor = parser.GetSetting("SKILL", "SKILL2COLOR");
                }
                else if (nSkillNumber == 3)
                {
                    sLeft  = parser.GetSetting("SKILL", "SKILL3LEFT");
                    sTop   = parser.GetSetting("SKILL", "SKILL3TOP");
                    sColor = parser.GetSetting("SKILL", "SKILL3COLOR");
                }
                else if (nSkillNumber == 4)
                {
                    sLeft  = parser.GetSetting("SKILL", "SKILL4LEFT");
                    sTop   = parser.GetSetting("SKILL", "SKILL4TOP");
                    sColor = parser.GetSetting("SKILL", "SKILL4COLOR");
                }
                else if (nSkillNumber == 5)
                {
                    sLeft  = parser.GetSetting("SKILL", "SKILL5LEFT");
                    sTop   = parser.GetSetting("SKILL", "SKILL5TOP");
                    sColor = parser.GetSetting("SKILL", "SKILL5COLOR");
                }

                Left = Convert.ToInt32(sLeft);
                Top  = Convert.ToInt32(sTop);

                circularProgressBar1.ProgressColor = StringRGBToColor(sColor);
                //circularProgressBar1.ForeColor = Color.Red;
            }
            catch
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.lbMsg.Text = "Can't Read SKILL configuration.\r\n\r\ncheck your Configpath.ini case by game resolution.";
                frmMSG.ShowDialog();
            }
            #endregion

            lnMaxValue = lnSkillTimer;
            //circularProgressBar1.MaxValue = Convert.ToInt32(lnSkillTimer);
            circularProgressBar1.Maximum = 100; // Convert.ToInt32(lnFlaskTimer);
            circularProgressBar1.Value   = 100;

            BringToFront();

            timer1.Start();
            Visible = true;
        }
예제 #22
0
        private void ITEMIndicatorForm_Load(object sender, EventArgs e)
        {
            Visible            = false;
            this.StartPosition = FormStartPosition.Manual;

            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);

            int nIndicatorLeft = Convert.ToInt32(parser.GetSetting("LOCATIONGRID", "LEFT"));
            int nIndicatorTop  = Convert.ToInt32(parser.GetSetting("LOCATIONGRID", "TOP"));

            double dWidth         = LauncherForm.g_nGridWidth + 4.5;
            double dHeight        = LauncherForm.g_nGridHeight + 4.5;
            int    nCellWidth     = Convert.ToInt32(Math.Truncate(dWidth / 12));
            int    nCellHeight    = Convert.ToInt32(Math.Truncate(dHeight / 12));
            int    nCellWidth4x4  = Convert.ToInt32(Math.Truncate(dWidth / 24));
            int    nCellHeight4x4 = Convert.ToInt32(Math.Truncate(dHeight / 24));

            int       nLeft = 0;
            int       nTop  = 0;
            Rectangle rcBox = new Rectangle(0, 0, nCellWidth, nCellHeight);

            //Pen AquaPen = new Pen(Color.Aqua, 1);
            //Pen DarkRed = new Pen(Color.DarkRed, 2);
            // DarkRed.Alignment = PenAlignment.Center;

            // Rectangle[,] g_arrayRect4x4 = new Rectangle[24, 24];
            // Rectangle[,] g_arrayRect1x1 = new Rectangle[12, 12];

            if (bIsQuad)
            {
                // 4x4 Aqua
                for (int iRow = 0; iRow < 24; iRow++) // ROWS
                {
                    nTop = iRow * (nCellWidth4x4);

                    for (int jCell = 0; jCell < 24; jCell++) // COLLUMS
                    {
                        nLeft = jCell * (nCellHeight4x4);

                        rcBox = new Rectangle(nLeft, nTop, nCellHeight4x4, nCellWidth4x4);

                        if (jCell == nStashX - 1 && iRow == nStashY - 1)
                        {
                            Left   = rcBox.X;
                            Top    = rcBox.Y;
                            Width  = rcBox.Width;
                            Height = rcBox.Height;

                            break;
                        }
                        //g_arrayRect4x4[iRow, jCell] = rcBox;

                        //e.Graphics.DrawRectangle(AquaPen, g_arrayRect4x4[iRow, jCell]);
                    }
                }
            }
            else
            {
                nLeft = 0;
                nTop  = 0;
                // 1x1 Red
                //ControlForm.g_arrayRect1x1 = new Rectangle[12, 12];
                for (int i = 0; i < 12; i++) // ROWS
                {
                    nTop = i * nCellHeight;

                    for (int j = 0; j < 12; j++) // COLLUMS
                    {
                        nLeft = j * nCellWidth;

                        rcBox = new Rectangle(nLeft, nTop, nCellWidth, nCellHeight);

                        if (j == nStashX - 1 && i == nStashY - 1)
                        {
                            Left   = rcBox.X;
                            Top    = rcBox.Y;
                            Width  = rcBox.Width;
                            Height = rcBox.Height;

                            break;
                        }

                        //g_arrayRect1x1[i, j] = rcBox;

                        //e.Graphics.DrawRectangle(DarkRed, g_arrayRect1x1[i, j]);
                    }
                }
            }

            Left = Left + nIndicatorLeft;
            Top  = Top + nIndicatorTop;



            /*BBBBBBB this.ControlBox = false;
             * this.Text = String.Empty;
             *
             * 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);
             *
             * int nLeft = Convert.ToInt32(parser.GetSetting("LOCATIONGRID", "LEFT"));
             * int nTop = Convert.ToInt32(parser.GetSetting("LOCATIONGRID", "TOP"));
             * LauncherForm.g_nGridWidth = Convert.ToInt32(parser.GetSetting("LOCATIONGRID", "RIGHT"));
             * LauncherForm.g_nGridHeight = Convert.ToInt32(parser.GetSetting("LOCATIONGRID", "BOTTOM"));
             *
             * this.Left = nLeft;
             * this.Top = nTop;
             *
             * int nOffsetX = 0;
             * int nOffsetY = 0;
             *
             * if (bIsQuad) // 24 x 24
             * {
             *  this.Width = LauncherForm.g_nGridWidth / 2 + 1;
             *  this.Height = LauncherForm.g_nGridHeight / 2 + 1;
             *
             *  this.Left = this.Left + ((LauncherForm.g_nGridWidth / 2) * (nStashX - 1));
             *  this.Top = this.Top + ((LauncherForm.g_nGridHeight / 2) * (nStashY - 1));
             *
             *  nOffsetX = (nStashX * 10) / 24;
             *  nOffsetY = (nStashY * 10) / 24;
             *
             *  nOffsetX = nOffsetX + ((nStashX % 3) * nDefaultOffsetX); // 3칸 단위로 점점 늘어진다.
             *  nOffsetY = nOffsetY + ((nStashY % 3) * nDefaultOffsetY); // 3칸 단위로 점점 늘어진다.
             *
             *  this.Left = this.Left - nOffsetX;
             *  this.Top = this.Top - nOffsetY;
             * }
             * else // 12 x 12
             * {
             *  this.Width = LauncherForm.g_nGridWidth;
             *  this.Height = LauncherForm.g_nGridHeight;
             *
             *  this.Left = this.Left + (LauncherForm.g_nGridWidth * (nStashX - 1));
             *  this.Top = this.Top + (LauncherForm.g_nGridHeight * (nStashY - 1));
             *
             *  nOffsetX = (nStashX * 10) / 12;
             *  nOffsetY = (nStashY * 10) / 12;
             *
             *  nOffsetX = nOffsetX + ((nStashX % 3) * nDefaultOffsetX); // 3칸 단위로 점점 늘어진다.
             *  nOffsetY = nOffsetY + ((nStashY % 3) * nDefaultOffsetY); // 3칸 단위로 점점 늘어진다.
             *
             *  this.Left = this.Left - nOffsetX;
             *  this.Top = this.Top - nOffsetY;
             * }
             *
             * // Final Offset.
             * this.Left = this.Left + 1;
             * this.Top = this.Top + 3;
             *
             * Visible = true;
             *
             #region ⨌⨌ Back up. 1920*1080 Fixed ⨌⨌
             * /*if (bIsQuad) // 24 x 24
             * {
             *  this.Width = 54 / 2 + 1;
             *  this.Height = 54 / 2 + 1;
             *
             *  this.Left = this.Left + ((54/2) * (nStashX-1)) ;
             *  this.Top = this.Top + ((54/2) * (nStashY-1)) ;
             *
             *  nOffsetX = (nStashX * 10) / 24;
             *  nOffsetY = (nStashY * 10) / 24;
             *
             *  nOffsetX = nOffsetX + ((nStashX % 3) * nDefaultOffsetX); // 3칸 단위로 점점 늘어진다.
             *  nOffsetY = nOffsetY + ((nStashY % 3) * nDefaultOffsetY); // 3칸 단위로 점점 늘어진다.
             *
             *  this.Left = this.Left - nOffsetX;
             *  this.Top = this.Top - nOffsetY;
             * }
             * else // 12 x 12
             * {
             *  this.Width = 54;
             *  this.Height = 54;
             *
             *  this.Left = this.Left + (54 * (nStashX - 1));
             *  this.Top = this.Top + (54 * (nStashY - 1));
             *
             *  nOffsetX = (nStashX * 10) / 12;
             *  nOffsetY = (nStashY * 10) / 12;
             *
             *  nOffsetX = nOffsetX + ((nStashX % 3) * nDefaultOffsetX); // 3칸 단위로 점점 늘어진다.
             *  nOffsetY = nOffsetY + ((nStashY % 3) * nDefaultOffsetY); // 3칸 단위로 점점 늘어진다.
             *
             *  this.Left = this.Left - nOffsetX;
             *  this.Top = this.Top - nOffsetY;
             * }
             *
             * // Final Offset.
             * this.Left = this.Left + 1;
             * this.Top = this.Top + 3;
             */
        }
예제 #23
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;

            bool bRet = ReadDirectionHelperData();

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

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

            string    strINIPath = String.Format("{0}\\{1}", currentDirectory, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);

            string strPath = "";

            try
            {
                strPath             = parser.GetSetting("DIRECTIONHELPER", "POELOGPATH");
                zoneName            = parser.GetSetting("INITPART", "zoneName");
                actString           = parser.GetSetting("INITPART", "actString");
                this.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")
                {
                    this.StartPosition = FormStartPosition.Manual;
                    this.Left          = Int32.Parse(sLeft);
                    this.Top           = Int32.Parse(sTop);
                }
            }
            catch
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.lbMsg.Text = "환경 파일을 읽을 수 없습니다.\r\n\r\nini 파일이 손상되었거나 삭제되었습니다.";
                frmMSG.ShowDialog();
                this.Close();
                Environment.Exit(0);
            }

            if (File.Exists(strPath))
            {
                try
                {
                    fileStream = File.Open(strPath, mode: FileMode.Open, access: FileAccess.Read, share: FileShare.ReadWrite);
                    logStream  = new StreamReader(fileStream);
                }
                catch
                {
                    MSGForm frmMSG = new MSGForm();
                    frmMSG.lbMsg.Text = "패스 오브 엑자일 로그파일을 읽는 도중 오류가 발생했습니다. ‼‼‼";
                    frmMSG.ShowDialog();
                    this.Close();
                    Environment.Exit(0);
                }

                if (actString == "?")
                {
                    actString = commonClass.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("{0} [ Act {1} ] {2}", g_strUILang, actString, zoneName);
                btnLang.Text = btnLangText;

                Check_UILanguageWrapping();

                // Move to the end of the file
                fileStream.Seek(-512, SeekOrigin.End);

                // Start watching client log file
                zoneWatcher.Enabled = true;
            }
            else
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.lbMsg.Text = "패스 오브 엑자일 경로가 맞지 않습니다.\r\n경로를 설정해주세요.";
                frmMSG.ShowDialog();
                FolderBrowserDialog dlgFolder = new FolderBrowserDialog();
                DialogResult        dr        = dlgFolder.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    if (strMainFromKAKAOUSER == "YES")
                    {
                        strPath = String.Format("{0}\\{1}", dlgFolder.SelectedPath, "logs\\KakaoClient.txt");
                    }
                    else
                    {
                        strPath = String.Format("{0}\\{1}", dlgFolder.SelectedPath, "logs\\Client.txt");
                    }
                }
                else
                {
                    this.Close();
                    Environment.Exit(0);
                }

                // Set Ini.
                parser.AddSetting("DIRECTIONHELPER", "POELOGPATH", strPath);
                parser.SaveSettings();

                try
                {
                    fileStream = File.Open(strPath, mode: FileMode.Open, access: FileAccess.Read, share: FileShare.ReadWrite);
                    logStream  = new StreamReader(fileStream);
                }
                catch
                {
                    MSGForm frmMSG2 = new MSGForm();
                    frmMSG2.lbMsg.Text = "패스 오브 엑자일 로그파일을 읽는 도중 오류가 발생했습니다. ‼‼‼";
                    frmMSG2.ShowDialog();
                    this.Close();
                    Environment.Exit(0);
                }

                if (actString == "?")
                {
                    actString = commonClass.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("{0} [ Act {1} ] {2}", g_strUILang, actString, zoneName);
                btnLang.Text = btnLangText;

                Check_UILanguageWrapping();

                // Move to the end of the file
                fileStream.Seek(-512, SeekOrigin.End);

                // Start watching client log file
                zoneWatcher.Enabled = true;
            }
        }
예제 #24
0
        private void FlaskTimerCircleForm_Load(object sender, EventArgs e)
        {
            Visible            = false;
            this.StartPosition = FormStartPosition.Manual;

            uint exstyleGet = InteropCommon.GetWindowLong(this.Handle, m_nExStyleNum);

            InteropCommon.SetWindowLong(this.Handle, m_nExStyleNum, exstyleGet | WS_EX_LAYERED | WS_EX_TRANSPARENT);
            // SetLayeredWindowAttributes(m_hWnd, 0, nAlphaBlend, LWA_ALPHA);

            /* Reverse
             * uint exstyleGet = GetWindowLong(this.Handle, m_nExStyleNum);
             * SetWindowLong(this.Handle, m_nExStyleNum, exstyleGet & ~(WS_EX_LAYERED | WS_EX_TRANSPARENT));
             * // SetLayeredWindowAttributes(m_hWnd, 0, nAlphaBlend, LWA_ALPHA);
             */

            #region    Get Information from ConfigPath.ini ⨌⨌
            string    strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini");
            IniParser parser     = new IniParser(strINIPath);

            try
            {
                string sLeft  = string.Empty;
                string sTop   = string.Empty;
                string sColor = string.Empty;
                if (nFlaskNumber == 1)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK1LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK1TOP");
                    sColor = parser.GetSetting("MISC", "FLASK1COLOR");
                }
                else if (nFlaskNumber == 2)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK2LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK2TOP");
                    sColor = parser.GetSetting("MISC", "FLASK2COLOR");
                }
                else if (nFlaskNumber == 3)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK3LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK3TOP");
                    sColor = parser.GetSetting("MISC", "FLASK3COLOR");
                }
                else if (nFlaskNumber == 4)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK4LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK4TOP");
                    sColor = parser.GetSetting("MISC", "FLASK4COLOR");
                }
                else if (nFlaskNumber == 5)
                {
                    sLeft  = parser.GetSetting("MISC", "FLASK5LEFT");
                    sTop   = parser.GetSetting("MISC", "FLASK5TOP");
                    sColor = parser.GetSetting("MISC", "FLASK5COLOR");
                }

                Left = Convert.ToInt32(sLeft);
                Top  = Convert.ToInt32(sTop);

                circularProgressBar1.ProgressColor = StringRGBToColor(sColor);
            }
            catch (Exception ex)
            {
                MSGForm frmMSG = new MSGForm();
                frmMSG.lbMsg.Text = "Can't Read FLASK configuration.\r\n\r\ncheck your Configpath.ini case by game resolution.";
                frmMSG.ShowDialog();

                DeadlyLog4Net._log.Error($"catch {MethodBase.GetCurrentMethod().Name}", ex);
            }
            #endregion

            circularProgressBar1.Maximum = 100; // Convert.ToInt32(lnFlaskTimer);
            circularProgressBar1.Value   = 100;
            lnMaxValue = lnFlaskTimer;

            BringToFront();

            timer1.Start();
            Visible = true;
        }