Exemple #1
0
 private void PictureBox1_Click(object sender, EventArgs e)
 {
     if (!APIForm.combnum == -3)
     {
         UpdateLabel.Text = "업데이트 중";
         APIForm.AirAPICheck.CancelAsync();
         APIForm.Close();
         APIForm.PrevChk = "-1"; // 무조건 업데이트하도록
         DrawState();
         APIForm.Activate();
     }
     else
     {
         Interaction.MsgBox("위치를 지정한 뒤 업데이트를 해 주세요.", Constants.vbInformation);
     }
 }
Exemple #2
0
        public void ApplySet()
        {
            var ApplyData = ItemData[ListBox1.SelectedIndex];

            string newData = "<locinfo>" + ApplyData + "</locinfo>";

            for (var i = 0; i <= count - 1; i++)
            {
                if (!i == ListBox1.SelectedIndex)
                {
                    newData += Constants.vbCr + "<locinfo>" + ItemData[i] + "</locinfo>";
                }
            }

            My.Settings.LocHistory = newData;


            if (getData(ApplyData, "type") == "location")
            {
                My.Settings.StationName     = null;
                My.Settings.LocationName    = getData(ApplyData, "string");
                My.Settings.LocationPoint_X = getData(ApplyData, "X");
                My.Settings.LocationPoint_Y = getData(ApplyData, "Y");
            }
            else
            {
                My.Settings.LocationName = getData(ApplyData, "string") + " (측정소)";
                My.Settings.StationName  = getData(ApplyData, "string");
            }

            APIForm.AirAPICheck.CancelAsync();
            APIForm.Close();
            APIForm.combnum     = 0;
            APIForm.PrevChk     = "-1"; // 무조건 업데이트하도록
            APIForm.prevCombnum = -1;
            MainGUI.DrawState();
            APIForm.Activate();
            TrayForm.MainGUI_Open();

            this.Close();
        }
Exemple #3
0
        private void Button2_Click(object sender, EventArgs e)
        {
            if (complete)
            {
                // 처음판별
                bool wasitfirst = false;
                if (My.Settings.LocationName == null /* TODO Change to default(_) if this is not a reference type */)
                {
                    wasitfirst = true;
                }

                if (StationName == null)
                {
                    My.Settings.StationName     = null;
                    My.Settings.LocationName    = loctext;
                    My.Settings.LocationPoint_X = tm_co[0];
                    My.Settings.LocationPoint_Y = tm_co[1];
                }
                else
                {
                    My.Settings.LocationName = StationName + " (측정소)";
                    My.Settings.StationName  = StationName;
                }

                if (wasitfirst)
                {
                    if (Interaction.MsgBox("처음 설정하시는 것 같네요. 실시간으로 대기 정보를 받아볼 수 있도록 다음 설정을 활성화 하시겠습니까?" + Constants.vbCr + Constants.vbCr + "- 자동으로 대기 상태 업데이트 (권장)" + Constants.vbCr + "- 대기 상태 푸시 알림 (권장)" + Constants.vbCr + Constants.vbCr + "'예'를 누를시 자동으로 적용되며, 이 설정은 나중에 '프로그램 설정'에서 변경하실 수 있습니다.", Constants.vbQuestion + Constants.vbYesNo) == Constants.vbYes)
                    {
                        My.Settings.ChkEnabled  = true;
                        My.Settings.PushEnabled = true;
                    }
                }


                APIForm.AirAPICheck.CancelAsync();
                APIForm.Close();
                APIForm.combnum     = 0;
                APIForm.PrevChk     = "-1"; // 무조건 업데이트하도록
                APIForm.prevCombnum = -1;
                MainGUI.DrawState();
                APIForm.Activate();
                TrayForm.MainGUI_Open();


                if (StationName == null)
                {
                    if (!CheckHisExist(false, loctext))
                    {
                        AddLocHistory_Axis(loctext, tm_co[0], tm_co[1]);
                    }
                }
                else if (!CheckHisExist(true, StationName))
                {
                    AddLocHistory_station(StationName);
                }

                My.Settings.Save();
                My.Settings.Reload();


                this.Close();
            }
        }