public void CmdSetMainExchange()
        {
            try
            {
                //주거래소 설정
                using (RequestArbitrageSetMainExchangeModel req = new RequestArbitrageSetMainExchangeModel())
                {
                    req.userEmail = MainViewModel.LoginDataModel.userEmail;
                    req.exchgeId  = SelExchangeItem.exchgeId;

                    using (ResponseArbitrageSetMainExchangeModel res = WebApiLib.SyncCallEncrypt <ResponseArbitrageSetMainExchangeModel, RequestArbitrageSetMainExchangeModel>(req))
                    {
                        if (res.resultStrCode == "000")
                        {
                            if (res.data.failCd.Equals(""))
                            {
                                alert = new Alert(Localization.Resource.Arbitrage_SetMainExchange_Alert_1);
                                alert.ShowDialog();

                                SelExchangeItem.mainYn = "Y";
                                exchangeList.Where(x => x.exchgeId == SelExchangeItem.exchgeId).FirstOrDefault().mainYn = "Y";

                                WindowService.Close();
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
        }
Exemplo n.º 2
0
        public virtual void Copy()
        {
            var ii             = new ImageOperator();
            var destinationDir = new DirectoryInfo(ResultPath);
            var dirList        = new List <string>();

            if (UnInstallationFolder)
            {
                dirList.Add("Фото_демонтажа");
            }
            if (InstallationFolder)
            {
                dirList.Add("Фото_монтажа");
            }
            if (ConnectionFolder)
            {
                dirList.Add("Фото_подключения");
            }
            if (RepairsFolder)
            {
                dirList.Add("Фото_ремонта");
            }
            if (LightFolder)
            {
                dirList.Add("Фото_свет");
            }
            WindowService.Hide();
            SplashScreenService.ShowSplashScreen();
            ii.CopyByNumbers(SourceDir, destinationDir, UNIUs, dirList, RenameToSubdirs, CopyToSubdirs, OverlayText);
            SplashScreenService.HideSplashScreen();
            WindowService.Close();
        }
Exemplo n.º 3
0
        /// <summary>
        /// 저장
        /// </summary>
        public async void MenuSave()
        {
            try
            {
                IsBusy = true;

                string CodeSeq = string.Empty;

                if (dataRight.Count.Equals(0))
                {
                    Alert alert = new Alert(Localization.Resource.Bookmark_6, 300);
                    alert.ShowDialog();
                    return;
                }

                foreach (var itemR in dataRight)
                {
                    CodeSeq += "," + itemR.Code;
                }

                if (!string.IsNullOrWhiteSpace(CodeSeq))
                {
                    CodeSeq = CodeSeq.Substring(1);
                }

                using (RequestBookMarkSaveModel req = new RequestBookMarkSaveModel())
                {
                    req.userEmail = MainViewModel.LoginDataModel.userEmail;
                    req.menuCd    = CodeSeq;

                    using (ResponseBookMarkSaveModel res = await WebApiLib.AsyncCall <ResponseBookMarkSaveModel, RequestBookMarkSaveModel>(req))
                    {
                        //리스트 저장
                        Alert alert = new Alert(Localization.Resource.Common_Alert_2);
                        if (alert.ShowDialog() == true)
                        {
                            IsBusy = false;
                            Messenger.Default.Send("QuickMenuRefresh");
                            WindowService.Close();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
            finally
            {
                IsBusy = false;
            }
        }
 //메뉴이동
 public void CmdMoveMenu()
 {
     try
     {
         Messenger.Default.Send(new MenuModel()
         {
             Name = LocalizationLib.GetLocalizaionString("Main_Menu_2_5"), Id = "CoinExchangeReservationTrading", IconPath = "/Images/ico_nav_coin_chage_auto.png", Certify = 1
         });
         WindowService.Close();
     }
     catch (Exception ex)
     {
         SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
     }
 }
Exemplo n.º 5
0
 public void CmdSignUpCancel()
 {
     try
     {
         Alert alert = new Alert(Localization.Resource.Arbitrage_SignUpPop_Alert_3, Alert.ButtonType.YesNo, 300, 160);
         if (alert.ShowDialog() == true)
         {
             bDialogResult = false;
             WindowService.Close();
         }
     }
     catch (Exception ex)
     {
         SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
     }
 }
Exemplo n.º 6
0
        public async void CmdPayment()
        {
            try
            {
                if (!PayPrc.Equals("0"))
                {
                    IsBusy = true;

                    using (RequestAutoServiceReqMdoel req = new RequestAutoServiceReqMdoel())
                    {
                        req.userEmail = MainViewModel.LoginDataModel.userEmail;
                        req.cnKndCd   = SelectedCoinCode;

                        using (ResponseAutoServiceReqMdoel res = await WebApiLib.AsyncCall <ResponseAutoServiceReqMdoel, RequestAutoServiceReqMdoel>(req))
                        {
                            if (res.resultStrCode == "000")
                            {
                                Messenger.Default.Send("AutoTradeState");
                                Messenger.Default.Send("AssetsRefresh");
                                WindowService.Close();
                            }
                            else
                            {
                                Alert alert = new Alert(Localization.Resource.AutoTradingAdditionalPop_6, 300);
                                alert.ShowDialog();
                            }
                        }
                    }
                }
                else
                {
                    Alert alert = new Alert(Localization.Resource.AutoTradingAdditionalPop_5, 350);
                    alert.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemplo n.º 7
0
        public void CmdSignUp()
        {
            try
            {
                //if (bSignCheck)
                //{
                //    Alert alert = new Alert(Localization.Resource.Arbitrage_SignUpPop_Alert_1_1 + "\n" + Localization.Resource.Arbitrage_SignUpPop_Alert_1_2, 300, 160);
                //    alert.ShowDialog();
                //    return;
                //}

                if (bCheck.Equals(false))
                {
                    Alert alert = new Alert(Localization.Resource.TransferDepositWithdraw_Common_7, 350);
                    alert.ShowDialog();
                    return;
                }
                else
                {
                    Alert alert = new Alert(Localization.Resource.Arbitrage_SignUpPop_Alert_2, Alert.ButtonType.YesNo, 300, 170);
                    if (alert.ShowDialog() == true)
                    {
                        using (RequestArbitrageSetSignUpModel req = new RequestArbitrageSetSignUpModel())
                        {
                            req.userEmail = MainViewModel.LoginDataModel.userEmail;

                            using (ResponseArbitrageSetSignUpModel res = WebApiLib.SyncCallEncrypt <ResponseArbitrageSetSignUpModel, RequestArbitrageSetSignUpModel>(req))
                            {
                                if (res.resultStrCode == "000")
                                {
                                    bDialogResult = true;
                                    WindowService.Close();
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
        }
 //코인교환 설정 초기화
 public async void Clear()
 {
     try
     {
         using (RequestTradingCoinAutoTradeDelModel req = new RequestTradingCoinAutoTradeDelModel())
         {
             req.userEmail = MainViewModel.LoginDataModel.userEmail;
             using (ResponseTradingCoinAutoTradeDelModel res = await WebApiLib.AsyncCall <ResponseTradingCoinAutoTradeDelModel, RequestTradingCoinAutoTradeDelModel>(req))
             {
                 //삭제까지 됬으면 팝업 닫기.
                 WindowService.Close();
             }
         }
     }
     catch (Exception ex)
     {
         SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
     }
 }
Exemplo n.º 9
0
        private void RepeatTimer_Tick(object sender, EventArgs e)
        {
            try
            {
                //nowTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                iTime -= 1;

                //if(iTime <= 5)
                //{
                //    sTimeColor = "Red";
                //}

                if (iTime < 0)
                {
                    bTimeOver = true;
                    WindowService.Close();
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
        }
Exemplo n.º 10
0
        public async void CmdSubmit()
        {
            try
            {
                if (SmsComplete == Visibility.Visible)
                {
                    IsBusy = true;

                    int PeriodTime = 0;
                    if (Sel.Value.Equals(1))
                    {
                        if (radioDayChecked)
                        {
                            PeriodTime = SelDay.Value * 24;
                        }
                        else if (radioTimeChecked)
                        {
                            PeriodTime = SelTime.Value;
                        }
                    }
                    else
                    {
                        PeriodTime = 87600;
                    }

                    if (PeriodTime.Equals(0))
                    {
                        alert = new Alert(Localization.Resource.IP_Registration_4_18);
                        alert.ShowDialog();
                        return;
                    }

                    //아이피 등록
                    using (RequestIpRegModel req = new RequestIpRegModel())
                    {
                        req.userEmail = userEmail;
                        req.ip        = IP;
                        req.limtHr    = PeriodTime;
                        using (ResponseIpRegModel res = await WebApiLib.AsyncCall <ResponseIpRegModel, RequestIpRegModel>(req))
                        {
                            SubmitCheck = true;
                            WindowService.Close();

                            NoticePopup note = new NoticePopup(NoticePopup.KindNotice.HTS_IP_CHECK_2);
                            note.Title = Localization.Resource.NoticePopup_3;
                            note.ShowDialog();

                            IsBusy = false;
                        }
                    }
                }
                else
                {
                    Alert alert = new Alert(Localization.Resource.IP_Registration_4_15, 320);
                    alert.ShowDialog();
                    return;
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemplo n.º 11
0
        public void CmdTrade()
        {
            try
            {
                if (string.IsNullOrEmpty(sOrderCode))
                {
                    return;
                }

                if (dNowAmount.Equals(0))
                {
                    if (sTradeInfo.Equals("B"))
                    {
                        alert = new Alert(Localization.Resource.Arbitrage_TradePop_Alert_2);
                        alert.ShowDialog();
                    }
                    else if (sTradeInfo.Equals("S"))
                    {
                        alert = new Alert(Localization.Resource.Arbitrage_TradePop_Alert_3);
                        alert.ShowDialog();
                    }
                    return;
                }

                alert = new Alert(Localization.Resource.Arbitrage_TradePop_Alert_1, Alert.ButtonType.YesNo);
                if (alert.ShowDialog() == true)
                {
                    //거래실행 API
                    if (sTradeInfo.Equals("B"))
                    {
                        using (RequestArbitrageBuyTradeCoinModel req = new RequestArbitrageBuyTradeCoinModel())
                        {
                            req.userEmail = MainViewModel.LoginDataModel.userEmail;
                            req.regIp     = MainViewModel.LoginDataModel.regIp;
                            if (bHereTrade)
                            {
                                req.type = "One";
                            }
                            else if (bAllTrade)
                            {
                                req.type = "All";
                            }
                            req.cnKndCd = sOrderCode;
                            req.lowId   = sLowId;
                            req.highId  = sHighId;

                            using (ResponseArbitrageBuyTradeCoinModel res = WebApiLib.SyncCallEncrypt <ResponseArbitrageBuyTradeCoinModel, RequestArbitrageBuyTradeCoinModel>(req))
                            {
                                if (res.resultStrCode == "000")
                                {
                                    if (res.data.failCd.Equals(""))
                                    {
                                        bTrading = true;
                                        alert    = new Alert(Localization.Resource.Arbitrage_Alert_2);
                                        alert.ShowDialog();
                                        WindowService.Close();
                                    }
                                    else if (res.data.failCd.Equals("778"))
                                    {
                                        RepeatTimer.Stop();
                                        alert = new Alert(Localization.Resource.Arbitrage_Alert_6, 330);
                                        alert.ShowDialog();
                                        WindowService.Close();
                                    }
                                    //else if (res.data.failCd.Equals("777"))
                                    //{
                                    //    alert = new Alert();
                                    //    alert.ShowDialog();
                                    //    return;
                                    //}
                                }
                            }
                        }
                    }
                    else if (sTradeInfo.Equals("S"))
                    {
                        using (RequestArbitrageSellTradeCoinModel req = new RequestArbitrageSellTradeCoinModel())
                        {
                            req.userEmail = MainViewModel.LoginDataModel.userEmail;
                            req.regIp     = MainViewModel.LoginDataModel.regIp;
                            if (bHereTrade)
                            {
                                req.type = "One";
                            }
                            else if (bAllTrade)
                            {
                                req.type = "All";
                            }
                            req.cnKndCd = sOrderCode;
                            req.lowId   = sHighId;
                            req.highId  = sLowId;

                            using (ResponseArbitrageSellTradeCoinModel res = WebApiLib.SyncCallEncrypt <ResponseArbitrageSellTradeCoinModel, RequestArbitrageSellTradeCoinModel>(req))
                            {
                                if (res.resultStrCode == "000")
                                {
                                    if (res.data.failCd.Equals(""))
                                    {
                                        bTrading = true;
                                        alert    = new Alert(Localization.Resource.Arbitrage_Alert_2);
                                        alert.ShowDialog();
                                        WindowService.Close();
                                    }
                                    else if (res.data.failCd.Equals("778"))
                                    {
                                        RepeatTimer.Stop();
                                        alert = new Alert(Localization.Resource.Arbitrage_Alert_6, 330);
                                        alert.ShowDialog();
                                        WindowService.Close();
                                    }
                                    //else if (res.data.failCd.Equals("777"))
                                    //{
                                    //    alert = new Alert();
                                    //    alert.ShowDialog();
                                    //    return;
                                    //}
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
        }
Exemplo n.º 12
0
        public async void CmdRegistCard()
        {
            try
            {
                int intValue = 0;

                if (string.IsNullOrEmpty(CardNumStatic))
                {
                    alert = new Alert(Localization.Resource.AtmPwdSetting_14, 330);
                    alert.ShowDialog();
                    return;
                }
                else if (string.IsNullOrWhiteSpace(InsertPwd) || string.IsNullOrWhiteSpace(CheckPwd))
                {
                    alert = new Alert(Localization.Resource.AtmPwdSetting_13);
                    alert.ShowDialog();
                    return;
                }
                else if (InsertPwd.Length < 4 || CheckPwd.Length < 4)
                {
                    alert = new Alert(Localization.Resource.AtmPwdSetting_12);
                    alert.ShowDialog();
                    return;
                }
                else if (InsertPwd != CheckPwd)
                {
                    alert = new Alert(Localization.Resource.Login_14);
                    alert.ShowDialog();
                    return;
                }
                else if (!int.TryParse(InsertPwd, out intValue) || !int.TryParse(CheckPwd, out intValue))
                {
                    alert = new Alert(Localization.Resource.AtmPwdSetting_12);
                    alert.ShowDialog();
                    return;
                }

                alert = new Alert(Localization.Resource.AtmPwdSetting_15, Alert.ButtonType.YesNo, 330);
                if (alert.ShowDialog() == true)
                {
                    Dictionary <string, string> dict = new Dictionary <string, string>();

                    using (RequestPublicKeyModel req = new RequestPublicKeyModel())
                    {
                        using (ResponsePublicKeyModel res = WebApiLib.SyncCall <ResponsePublicKeyModel, RequestPublicKeyModel>(req))
                        {
                            dict = EncodingLib.AesEncryptKey(res.data.pubKeyModule, res.data.pubKeyExponent);
                        }
                    }

                    using (RequestCardPwdSetModel req2 = new RequestCardPwdSetModel())
                    {
                        req2.cardNum  = EncodingLib.AesEncrypt(CardNumStatic, dict["gid"]);
                        req2.atmPwd   = EncodingLib.AesEncrypt(InsertPwd, dict["gid"]);
                        req2.clientPe = dict["acekey"];

                        using (ResponseCardPwdSetModel res2 = await WebApiLib.AsyncCall <ResponseCardPwdSetModel, RequestCardPwdSetModel>(req2))
                        {
                            if (res2.resultStrCode == "000")
                            {
                                string resultCd = res2.data.failCd;

                                if (resultCd.Equals(""))
                                {
                                    alert = new Alert(Localization.Resource.AtmPwdSetting_16);
                                    alert.ShowDialog();
                                    WindowService.Close();
                                }
                                else if (resultCd.Equals("999"))
                                {
                                    alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Common_15);
                                    alert.ShowDialog();
                                }
                                else if (resultCd.Equals("998"))
                                {
                                    alert = new Alert(Localization.Resource.AtmPwdSetting_19);
                                    alert.ShowDialog();
                                }
                                else if (resultCd.Equals("997"))
                                {
                                    alert = new Alert(Localization.Resource.AtmPwdSetting_18);
                                    alert.ShowDialog();
                                }
                                else if (resultCd.Equals("996"))
                                {
                                    alert = new Alert(Localization.Resource.AtmPwdSetting_17);
                                    alert.ShowDialog();
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
        }
Exemplo n.º 13
0
 public void Exit()
 {
     WindowService.Close();
 }
Exemplo n.º 14
0
 public void CloseApplication(object sender, EventArgs e)
 {
     windowService.Close();
 }
Exemplo n.º 15
0
 private void OkBtn_OnClicked(Button btn)
 {
     windowService.Close(this);
 }
        public async void CmdPayment()
        {
            try
            {
                //if (!PayPrc.Equals("0"))
                //{
                IsBusy = true;

                using (RequestArbitrageServiceReqModel req = new RequestArbitrageServiceReqModel())
                {
                    req.userEmail = MainViewModel.LoginDataModel.userEmail;
                    req.cnKndCd   = SelectedCoinCode;

                    using (ResponseArbitrageServiceReqModel res = await WebApiLib.AsyncCallEncrypt <ResponseArbitrageServiceReqModel, RequestArbitrageServiceReqModel>(req))
                    {
                        if (res.resultStrCode == "000")
                        {
                            string resultCd = res.data.failCd;
                            if (resultCd.Equals(""))
                            {
                                Messenger.Default.Send("AssetsRefresh");
                                WindowService.Close();
                            }
                            else if (resultCd.Equals("998"))
                            {
                                Alert alert = new Alert(Localization.Resource.ArbitrageRequestPop_Alert_1, 300);
                                alert.ShowDialog();
                            }
                            else if (resultCd.Equals("997"))
                            {
                                Alert alert = new Alert(Localization.Resource.ArbitrageRequestPop_Alert_2, 300);
                                alert.ShowDialog();
                            }
                            else if (resultCd.Equals("786"))
                            {
                                Alert alert = new Alert(Localization.Resource.ArbitrageRequestPop_Alert_3, 300);
                                alert.ShowDialog();
                            }
                            else if (resultCd.Equals("785"))
                            {
                                Alert alert = new Alert(Localization.Resource.ArbitrageRequestPop_Alert_4, 300);
                                alert.ShowDialog();
                            }
                        }
                        else
                        {
                            Alert alert = new Alert(Localization.Resource.AutoTradingAdditionalPop_6, 300);
                            alert.ShowDialog();
                        }
                    }
                }
                //}
                //else
                //{
                //    Alert alert = new Alert(Localization.Resource.AutoTradingAdditionalPop_5, 350);
                //    alert.ShowDialog();
                //}
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
            finally
            {
                IsBusy = false;
            }
        }