Beispiel #1
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;
        }
Beispiel #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();
        }
Beispiel #3
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);
            }
        }
Beispiel #4
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;
            }
        }
Beispiel #5
0
 public bool ReadDirectionHelperData()
 {
     try
     {
         jsonData = OverlayData.FromJson(File.ReadAllText(String.Format("{0}\\{1}", currentDirectory, "configuration.json")));
         return(true);
     }
     catch
     {
         MSGForm frmMSG3 = new MSGForm();
         frmMSG3.lbMsg.Text = "POE Direction Helper를 실행하신 디렉토리의\r\n환경설정 파일(configuration.json)을 읽을 수 없습니다.\r\n\r\nDirectionHelper가 설치한 json 형식이 아닙니다.\r\n파일이 손상되었거나 임의로 수정되었을 수 있습니다.";
         frmMSG3.ShowDialog();
         return(false);
     }
 }
Beispiel #6
0
        static void Main()
        {
            Mutex m_hMutex = new Mutex(true, "POExileDirectionDeadlyCrush", out bool bMutex);

            if (bMutex)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new ControlForm());

                m_hMutex.ReleaseMutex();
            }
            else
            {
                MSGForm frmMSG4 = new MSGForm();
                frmMSG4.lbMsg.Text = "POE Direction Helper가 이미 실행중입니다.";
                frmMSG4.ShowDialog();
            }
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            Mutex m_hMutex = new Mutex(true, "DeadlyCrushTradeWithExileDirection", out bool bMutex);

            if (bMutex)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new LauncherForm());

                m_hMutex.ReleaseMutex();
            }
            else
            {
                if (args == null)
                {
                    MSGForm frmMSG4 = new MSGForm();
                    frmMSG4.lbMsg.Text = "(already running.) Deadly Trade (with Exile Direciton) 프로그램이 이미 실행중입니다.";
                    frmMSG4.ShowDialog();
                }
            }
        }
Beispiel #8
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;
        }
Beispiel #9
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;
            }
        }
Beispiel #10
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;
        }
Beispiel #11
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            ControlForm.gCF_bIsTextFocused = true;
            if (String.IsNullOrEmpty(textBoxLEFT.Text) || String.IsNullOrEmpty(textBoxTOP.Text))
            {
                return;
            }

            if (checkQuadTab.Checked)
            {
                bIsQuad = true;
            }
            else
            {
                bIsQuad = false;
            }

            int nStashX = Convert.ToInt32(textBoxLEFT.Text);
            int nStashY = Convert.ToInt32(textBoxTOP.Text);

            if (nStashX <= 0 || nStashY <= 0)
            {
                return;
            }

            if (!bIsQuad)
            {
                if (nStashX > 12 || nStashY > 12)
                {
                    MSGForm frmMSG = new MSGForm();
                    frmMSG.lbMsg.Text = "Please input below 13 if not quad tap.";
                    frmMSG.ShowDialog();
                    return;
                }
            }
            else
            {
                if (nStashX > 24 || nStashY > 24)
                {
                    MSGForm frmMSG = new MSGForm();
                    frmMSG.lbMsg.Text = "Please input below 24.";
                    frmMSG.ShowDialog();
                    return;
                }
            }

            if (bIndicatorShowing)
            {
                if (itemIndicator != null)
                {
                    itemIndicator.Hide();
                }
                bIndicatorShowing = false;
            }

            itemIndicator            = new ITEMIndicatorForm();
            itemIndicator.bIsQuad    = bIsQuad;
            itemIndicator.nStashX    = nStashX;
            itemIndicator.nStashY    = nStashY;
            itemIndicator.bIsMagnify = true;
            itemIndicator.Owner      = this;
            itemIndicator.Show();

            bIndicatorShowing = true;
        }
Beispiel #12
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;
                }
            }
        }
Beispiel #13
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;
        }
        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;
        }