Example #1
0
        private void NaverKeyListUI_FormClosing(object sender, FormClosingEventArgs e)
        {
            //save 루틴 필요.
            if (TransManager.GetIsRemain())
            {
                TransManager.Instace.naverKeyList = dataList;

                string id     = "";
                string secret = "";

                if (TransManager.Instace.naverKeyList.Count > 0)
                {
                    if (id == "")
                    {
                        id = TransManager.Instace.naverKeyList[0].id;
                    }

                    if (secret == "")
                    {
                        secret = TransManager.Instace.naverKeyList[0].secret;
                    }
                }


                TransManager.Instace.SaveNaverKeyFile(id, secret);
            }

            if (FormManager.GetIsRemain())
            {
                FormManager.Instace.DestoryNaverKeyListUI();
            }
        }
Example #2
0
        private void NaverKeyListUI_FormClosing(object sender, FormClosingEventArgs e)
        {
            //save 루틴 필요.
            if (TransManager.GetIsRemain())
            {
                TransManager.Instace.SortNaverKeyList();
                TransManager.Instace.naverKeyList = dataList;

                string id     = "";
                string secret = "";
                bool   isPaid = false;

                if (TransManager.Instace.naverKeyList.Count > 0)
                {
                    id     = TransManager.Instace.naverKeyList[0].id;
                    secret = TransManager.Instace.naverKeyList[0].secret;

                    isPaid = TransManager.Instace.naverKeyList[0].isPaid;
                }


                TransManager.Instace.SaveNaverKeyFile(id, secret, isPaid);

                NaverTranslateAPI.instance.ChangeValue(id, secret, isPaid);
            }

            if (FormManager.GetIsRemain())
            {
                FormManager.Instace.DestoryNaverKeyListUI();
            }

            if (callback != null && callback.Target != null)
            {
                callback();
            }
        }