示例#1
0
        //Receber dados da BO
        private void rececpaoDados_Click(object sender, RoutedEventArgs e)
        {
            porta.Open();

            data = porta.ReadLine(); // vai receber o tamanho da lista de tarefas
            int tTarefas = Int32.Parse(data);

            // vai receber tarefa a tarefa e inserir na list correspondente
            for (int i = 0; i < tTarefas; i++)
            {
                data = porta.ReadLine();
                string[] words = data.Split(',');

                Tarefa tarefa = new Tarefa(words[0], false, float.Parse(words[1]), float.Parse(words[2]));
                tf.Add(tarefa);
            }

            data = porta.ReadLine();
            int tPi = Int32.Parse(data);

            for (int i = 0; i < tPi; i++)
            {
                data = porta.ReadLine();
                string[] words = data.Split(',');

                PontoInteresee PI = new PontoInteresee(float.Parse(words[0]), float.Parse(words[1]), words[2], words[3]);
                pts.Add(PI);
            }
            MessageBox.Show("Transferencia Completa");

            porta.Close();
        }
示例#2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            PontoInteresee pt = new PontoInteresee(41.585773, -8.359406, "Ourense", "Possivel localização de forte inimigo");

            pi.Add(pt);
            PontoInteresee pt1 = new PontoInteresee(41.585773, -8.359406, "SitioFixe", "Possivel localização de agua potavel");

            pi.Add(pt1);
            PontoInteresee pt2 = new PontoInteresee(41.585773, -8.359406, "Vigo Ouviedo", "Possivel localização de forte inimigo");

            pi.Add(pt2);
            PontoInteresee pt3 = new PontoInteresee(41.585773, -8.359406, "Ourense", "Possivel localização de forte inimigo");

            pi.Add(pt3);
            interesse.DataSource = pi;
        }