Beispiel #1
0
 private void TakeRichTextBox_TextChanged(object sender, EventArgs e)
 {
     if (TakeRichTextBox.Text != "")
     {
         ClearButton.Show();
     }
     else
     {
         ClearButton.Hide();
     }
 }
Beispiel #2
0
        public void LoadData()
        {
            ListBox1.Items.Clear();
            var tmpdata = My.Settings.LocHistory;

            count = 0;

ret:
            ;
            if (tmpdata.Contains("<locinfo>"))
            {
                long FirstStart = tmpdata.IndexOf("<locinfo>") + 10;

                ItemData[count] = Trim(Mid(tmpdata, FirstStart, tmpdata.Substring(FirstStart).IndexOf("</locinfo>") + 1));
                tmpdata         = Mid(tmpdata, FirstStart, tmpdata.Length);

                if (getData(ItemData[count], "type") == "station")
                {
                    ListBox1.Items.Add(getData(ItemData[count], "string") + " (측정소)");
                }
                else
                {
                    ListBox1.Items.Add(getData(ItemData[count], "string"));
                }

                count += 1;
                goto ret;
            }

            if (ListBox1.Items.Count > 0)
            {
                ListBox1.SetSelected(0, true);
                EmptyMsgPanel.Hide();
                ClearButton.Show();
            }
            else
            {
                EmptyMsg_Upper.Height = EmptyMsgPanel.Height / (double)2;
                EmptyMsgPanel.Show();
                ClearButton.Hide();
            }
        }