//----------------------------------------------------------------------------------- //----------------------------------------------------------------------------------- public static void Get_All_Observations_From_SVF() { XmlNodeList nodeList; XmlNode root; String id; String code; root = mod_accueil.SVF.DocumentElement; nodeList = root.SelectNodes(string.Concat("/inspection/ouvrage[@nom='", mod_accueil.OUVRAGE, "']/observations/code")); destab = new dessin[nodeList.Count]; int i = 0; string forme = mod_accueil.FORME_OUVRAGE; foreach (XmlNode unNode in nodeList) { id = unNode.SelectSingleNode("id").InnerText; code = Get_C1_Code(unNode); dessin des = new dessin(); //Dans le cas d'un changement de section, on stocke la forme if (id == "AEC") { forme = code; } des.id = id; des.type = Get_Type(id, code); des.forme = forme; des.pm1 = mod_observation.Get_Pm(unNode, false); des.pm2 = mod_observation.Get_Pm2(unNode, false); des.h1 = mod_observation.Get_H1(unNode, false); des.h2 = mod_observation.Get_H2(unNode, false); des.q1 = mod_observation.Get_Q1(unNode); Get_Motif_Params(Get_Motif_Name(id, code), des); des.couleur = Get_Couleur(id); destab[i] = des; i++; } }
public static void Draw_All_By_Forme() { string forme = destab[0].forme; dessin[] destmp = new dessin[destab.GetLength(0)]; //On parcourt les observations foreach (dessin des in destab) { if (des.forme != forme) { forme = des.forme; destmp = new dessin[destab.GetLength(0)]; } } }
private static void Get_Motif_Params(string motifname, dessin des) { if (motifname == string.Empty) { return; } XmlNode motifNode = mod_accueil.Motif_Xml.SelectSingleNode("/motifs/*/motif[@nom='" + motifname + "']"); if (motifNode.Attributes.GetNamedItem("symbole") != null) { des.symbole = motifNode.Attributes["symbole"].InnerText; } else { des.symbole = string.Empty; } if (motifNode.Attributes.GetNamedItem("ligne") != null) { des.ligne = motifNode.Attributes["ligne"].InnerText; } else { des.ligne = string.Empty; } if (motifNode.Attributes.GetNamedItem("hachure") != null) { des.hachure = motifNode.Attributes["hachure"].InnerText; } else { des.hachure = string.Empty; } if (motifNode.Attributes.GetNamedItem("epaisseur") != null) { des.epaisseur = motifNode.Attributes["epaisseur"].InnerText; } else { des.epaisseur = string.Empty; } if (motifNode.Attributes.GetNamedItem("echelle") != null) { des.echelle = motifNode.Attributes["echelle"].InnerText; } else { des.echelle = string.Empty; } if (motifNode.Attributes.GetNamedItem("angle") != null) { des.angle = motifNode.Attributes["angle"].InnerText; } else { des.angle = string.Empty; } }