Esempio n. 1
0
 private void buscaEscudo(int codigo)
 {
     clsToys t = new clsToys();
      try{
          picFoto.Image = null;
          picFoto.SizeMode = PictureBoxSizeMode.Zoom;
          picFoto.Image = Image.FromFile(t.buscaEscudo(codigo));
      }
      catch (Exception ex)
      {
          MessageBox.Show("Error: " + ex.Message, "buscaEscudo local");
          MessageBox.Show("Error: " + ex.StackTrace);
          return;
      }
 }
Esempio n. 2
0
 private string extraeClaveZona(string color)
 {
     string colorResul = null;
        clsToys tamagochi = new clsToys();
        colorResul = "ERROR";
        try {
        if (color.Length > 2) {
            foreach (string Value in _zonas) {
                colorResul = tamagochi.extraePalabra(color, Value);
            }
        }
        } catch (Exception ex) {
        MessageBox.Show("Error: " + ex.Message, "extraeClaveZona");
        MessageBox.Show("Error: " + ex.StackTrace);
        }
        return colorResul;
 }
Esempio n. 3
0
 public List<objetos> returMatrizDataUnique(IFeatureClass fc, string fld, string fld2)
 {
     int iFldIndex = fc.Fields.FindField(fld);
     int iFldIndex2 = fc.Fields.FindField(fld2);
     IFeatureCursor pFCursor = fc.Search(null, false);
     IFeature pFeature = default(IFeature);
     ArrayList col = new ArrayList();
     ArrayList col2 = new ArrayList();
     clsToys toy  = new clsToys();
     List<objetos> matriz = null;
     int i = 0;
     try
     {
         pFeature = pFCursor.NextFeature();
         while (!(pFeature == null))
         {
             col.Add(pFeature.get_Value(iFldIndex));
             col2.Add(pFeature.get_Value(iFldIndex2));
             if (i > 1)
                 if (col[i - 1].ToString() == col[i].ToString())
                 {
                     col.Remove(i);
                     col2.Remove(i);
                     i = i - 1;
                 }
             i = i + 1;
             pFeature = pFCursor.NextFeature();
         }
         if (i > 0)
             matriz = toy.eliminaDuplicadosM(col, col2);
         else
             toy.insertaDatosM("ERROR", "0", ref matriz);
         return matriz;
     }catch (System.Exception ex){
         MessageBox.Show("Error: " + ex.Message, "clsFeatureTools.returMatrizDataUnique");
         MessageBox.Show("Error: " + ex.StackTrace);
         return null;
     }
 }