Esempio n. 1
0
        // 룬페이지 설정
        private async void Btn_RunePage_Click(object sender, EventArgs e)
        {
            // 룬페이지 추가
            var jObject = RunePage();

            var message = await clientManager.UsingApiEventHttpMessage(TextBox_Method.Text, "/lol-perks/v1/pages", jObject);
        }
Esempio n. 2
0
        // 클라이언트 초기화 타이머
        private async void TimerClientInit_Tick(object sender, EventArgs e)
        {
            //Console.WriteLine("클라이언트 찾는중...");

            // 클라이언트 찾는 로직
            try
            {
                // 클라이언트가 연결되지 않으면 클라이언트 연결
                if (GlobalClientData.clientProcess == null)
                {
                    if (initManager.SetProcessInit())
                    {
                        //Console.WriteLine("클라이언트 찾는중..");

                        // 롤 클라이언트 핸들이 0이면 초기화
                        if (GlobalClientData.clientProcess.MainWindowHandle == IntPtr.Zero)
                        {
                            //Console.WriteLine("프로세스 요청 대기...");
                            GlobalClientData.clientProcess = null;
                            return;
                        }

                        // 롤 클라이언트 연결 로직
                        if (initManager.SetClientPathInit())
                        {
                            if (riotClientManager.Connect())
                            {
                                // 클라이언트 UX활성화
                                await riotClientManager.UsingApiEventHttpMessage(HttpMethod.Post, GlobalApiEndPoint.CLIENT_UXSHOW);

                                // UI 변경
                                LabelClientConnect.Text      = "클라이언트 연결됨";
                                LabelClientConnect.ForeColor = Color.DarkGreen;

                                // 폼 마우스 이동 이벤트
                                this.PanelStateLayer.MouseDown -= new MouseEventHandler(this.PanelStateLayer_MouseDown);
                                this.PanelStateLayer.MouseMove -= new MouseEventHandler(this.PanelStateLayer_MouseMove);

                                // MainForm Size 조절
                                uiManager.InitClientPtr();
                                uiManager.InitClientRect();

                                // 클라이언트 연결 여부
                                riotClientManager.isClientConnect = true;

                                // 프로그램 UI 사이즈 조절
                                Size = new Size(mainWidth, uiManager.GetClientHeight());
                                PanelStateLayer.Height = Convert.ToInt32(this.Size.Height * 0.11f);

                                // 타이머 실행
                                TimerFormRect.Start();
                                TimerClientInit.Stop();
                            }
                        }
                    }
                }
            }
            catch
            {
                Console.WriteLine("클라이언트 찾기 실패");
            }
        }