예제 #1
0
파일: XingAppForm2.cs 프로젝트: aum-inv/AUM
        private void queryFFR(string itemCode)
        {
            Api_WorldFuture    apiFF    = new Api.Api_WorldFuture();
            Api_WorldFutureDWM apiFFDWM = new Api.Api_WorldFutureDWM();

            apiFF.ApiLogHandler    += (log) => { LogWrite(log); };
            apiFFDWM.ApiLogHandler += (log) => { LogWrite(log); };

            apiFF.Query(itemCode, "1", "1", "50");
            System.Threading.Thread.Sleep(3000);

            apiFF.Query(itemCode, "1", "5", "50");
            System.Threading.Thread.Sleep(3000);

            apiFF.Query(itemCode, "1", "10", "50");
            System.Threading.Thread.Sleep(3000);

            apiFF.Query(itemCode, "1", "30", "50");
            System.Threading.Thread.Sleep(3000);

            apiFF.Query(itemCode, "1", "60", "50");
            System.Threading.Thread.Sleep(3000);

            apiFF.Query(itemCode, "1", "120", "50");
            System.Threading.Thread.Sleep(3000);

            apiFFDWM.Query(itemCode, "2", "50");
            System.Threading.Thread.Sleep(3000);
        }
예제 #2
0
파일: XingAppForm2.cs 프로젝트: aum-inv/AUM
        private void queryFF(string itemCode)
        {
            //apiFF.Query(itemCode, "1", "1");
            //apiFFDWM.Query(itemCode, "2");

            Task.Factory.StartNew(() =>
            {
                Api_WorldFuture apiFF       = new Api.Api_WorldFuture();
                Api_WorldFutureDWM apiFFDWM = new Api.Api_WorldFutureDWM();
                apiFF.ApiLogHandler        += (log) => { LogWrite(log); };
                apiFFDWM.ApiLogHandler     += (log) => { LogWrite(log); };

                apiFF.Query(itemCode, "1", "1");
                System.Threading.Thread.Sleep(3000);

                apiFF.Query(itemCode, "1", "5");
                System.Threading.Thread.Sleep(3000);

                apiFF.Query(itemCode, "1", "10");
                System.Threading.Thread.Sleep(3000);

                apiFF.Query(itemCode, "1", "30");
                System.Threading.Thread.Sleep(3000);

                apiFF.Query(itemCode, "1", "60");
                System.Threading.Thread.Sleep(3000);

                apiFF.Query(itemCode, "1", "120");
                System.Threading.Thread.Sleep(3000);

                apiFFDWM.Query(itemCode, "2");
                System.Threading.Thread.Sleep(3000);

                apiFFDWM.Query(itemCode, "3");
                System.Threading.Thread.Sleep(3000);

                apiFFDWM.Query(itemCode, "4");
                System.Threading.Thread.Sleep(3000);
            });
        }
예제 #3
0
파일: XingAppForm.cs 프로젝트: aum-inv/AUM
        private void queryFF(string itemCode)
        {
            int cnt = 100;

            if (rdo200.Checked)
            {
                cnt = 200;
            }
            else if (rdo500.Checked)
            {
                cnt = 500;
            }

            Task.Factory.StartNew(() =>
            {
                {
                    string ncnt           = "01";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "05";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "10";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "30";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }
                {
                    string ncnt           = "60";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "120";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "180";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "240";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "300";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "360";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "420";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    string ncnt           = "720";
                    Api_WorldFuture apiFF = new Api.Api_WorldFuture();
                    apiFF.ApiLogHandler  += (log) => { LogWrite(log); };
                    apiFF.Query(itemCode, "1", ncnt);
                    apiFF.manualEvent.WaitOne();
                    System.Threading.Thread.Sleep(1000);
                    runApi(itemCode, cnt, ncnt, apiFF);
                }

                {
                    Api_WorldFutureDWM apiFFDWM = new Api.Api_WorldFutureDWM();
                    apiFFDWM.ApiLogHandler     += (log) => { LogWrite(log); };
                    apiFFDWM.Query(itemCode, "2", cnt.ToString());
                    System.Threading.Thread.Sleep(4000);
                }

                isRuning = false;
            });
        }
예제 #4
0
파일: XingAppForm2.cs 프로젝트: aum-inv/AUM
        private void btnFFSeparate_Click(object sender, EventArgs e)
        {
            if (!isLogoned)
            {
                return;
            }
            Button btn = sender as Button;

            Api_WorldFuture    apiFF    = new Api.Api_WorldFuture();
            Api_WorldFutureDWM apiFFDWM = new Api.Api_WorldFutureDWM();

            apiFF.ApiLogHandler    += (log) => { LogWrite(log); };
            apiFFDWM.ApiLogHandler += (log) => { LogWrite(log); };

            switch (btn.Text)
            {
            case "1분":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFF.Query("CL", "1", "1", "100");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFF.Query("NG", "1", "1", "100");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFF.Query("GC", "1", "1", "100");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFF.Query("SI", "1", "1", "100");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFF.Query("HMH", "1", "1", "100");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFF.Query("NQ", "1", "1", "100");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;

            case "5분":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFF.Query("CL", "1", "5", "50");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFF.Query("NG", "1", "5", "50");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFF.Query("GC", "1", "5", "50");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFF.Query("SI", "1", "5", "50");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFF.Query("HMH", "1", "5", "50");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFF.Query("NQ", "1", "5", "50");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;

            case "10분":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFF.Query("CL", "1", "10", "40");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFF.Query("NG", "1", "10", "40");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFF.Query("GC", "1", "10", "40");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFF.Query("SI", "1", "10", "40");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFF.Query("HMH", "1", "10", "40");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFF.Query("NQ", "1", "10", "40");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;

            case "30분":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFF.Query("CL", "1", "30", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFF.Query("NG", "1", "30", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFF.Query("GC", "1", "30", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFF.Query("SI", "1", "30", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFF.Query("HMH", "1", "30", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFF.Query("NQ", "1", "30", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;

            case "60분":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFF.Query("CL", "1", "60", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFF.Query("NG", "1", "60", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFF.Query("GC", "1", "60", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFF.Query("SI", "1", "60", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFF.Query("HMH", "1", "60", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFF.Query("NQ", "1", "60", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;

            case "120분":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFF.Query("CL", "1", "120", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFF.Query("NG", "1", "120", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFF.Query("GC", "1", "120", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFF.Query("SI", "1", "120", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFF.Query("HMH", "1", "120", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFF.Query("NQ", "1", "120", "30");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;

            case "일":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFFDWM.Query("CL", "2", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFFDWM.Query("NG", "2", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFFDWM.Query("GC", "2", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFFDWM.Query("SI", "2", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFFDWM.Query("HMH", "2", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFFDWM.Query("NQ", "2", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;

            case "주":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFFDWM.Query("CL", "3", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFFDWM.Query("NG", "3", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFFDWM.Query("GC", "3", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFFDWM.Query("SI", "3", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFFDWM.Query("HMH", "3", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFFDWM.Query("NQ", "3", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;

            case "월":
                Task.Factory.StartNew(() => {
                    if (isSepFFCL)
                    {
                        apiFFDWM.Query("CL", "4", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNG)
                    {
                        apiFFDWM.Query("NG", "4", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFGC)
                    {
                        apiFFDWM.Query("GC", "4", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFSI)
                    {
                        apiFFDWM.Query("SI", "4", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFHSI)
                    {
                        apiFFDWM.Query("HMH", "4", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                    if (isSepFFNQ)
                    {
                        apiFFDWM.Query("NQ", "4", "5");
                        System.Threading.Thread.Sleep(3000);
                    }
                });
                break;
            }
        }