Пример #1
0
 /// <summary>
 /// Fonction d'ordonnancement des ouvrages (descendre)
 /// </summary>
 /// <param name="olist"></param>
 public static void Move_Ouvrage_Down(C1.Win.C1List.C1List olist)
 {
     if (olist.SelectedIndex < olist.ListCount - 1)
     {
         int saveIndex = olist.SelectedIndex;
         olist.InsertItem(olist.Columns["Nom"].CellText(saveIndex + 1) + ";" + olist.Columns["Type"].CellText(saveIndex + 1) + ";" + olist.Columns["Code forme"].CellText(saveIndex + 1) + ";" + olist.Columns["Intitulé forme"].CellText(saveIndex + 1) + ";" + olist.Columns["Position"].CellText(saveIndex + 1), saveIndex);
         olist.RemoveItem(saveIndex + 2);
         olist.SelectedIndex = saveIndex + 1;
     }
 }
Пример #2
0
        /// <summary>
        /// Fonction de sauvegarde de l'odre des ouvrages
        /// </summary>
        /// <param name="olist"></param>
        public static void Save_Ouvrage_Order(C1.Win.C1List.C1List olist)
        {
            XmlNode onod;

            for (int i = 0; i < olist.ListCount; i++)
            {
                onod = SVF.DocumentElement.SelectSingleNode("/inspection/ouvrage[@nom='" + olist.Columns["nom"].CellText(i) + "']");
                onod.Attributes["position"].InnerText = (i + 1).ToString();
            }

            mod_accueil.SVF.Save(System.IO.Path.Combine(mod_accueil.SVF_FOLDER, mod_accueil.SVF_FILENAME));
            mod_accueil.Fill_Ouvrage_List(mod_global.MF.OuvrageList);
        }
Пример #3
0
        public static void Fill_Ouvrage_List(C1.Win.C1List.C1List olist)
        {
            if (SVF_LOADED == true)
            {
                olist.ClearItems();
                olist.SelectedStyle.BackColor = System.Drawing.Color.Gold;

                XmlNodeList nodelist;
                XmlNode     unNode;

                olist.AddItemTitles("Nom; Type; Code forme; Intitulé forme; Position");

                olist.Columns[0].Caption = "Nom";
                olist.Columns[1].Caption = "Type";
                olist.Columns[2].Caption = "Code forme";
                olist.Columns[3].Caption = "Intitulé forme";
                olist.Columns[4].Caption = "Position";

                nodelist = SVF.SelectNodes("/inspection/ouvrage");

                SortedList sortednodelist = SortNodeList_By_Position(nodelist);

                foreach (object obj in sortednodelist.Values)
                {
                    unNode = (XmlNode)obj;
                    if (CHECKED_TYPES.Contains(unNode.Attributes["type"].InnerText))
                    {
                        olist.AddItem(unNode.Attributes["nom"].InnerText + ";" + unNode.Attributes["type"].InnerText + ";" + unNode.Attributes["forme"].InnerText + ";" + mod_global.Get_Section_Intitule_By_Code(unNode.Attributes["forme"].InnerText, unNode.Attributes["type"].InnerText) + ";" + unNode.Attributes["position"].InnerText);
                    }
                }

                mod_global.Enable_Ouvrage_Controls();
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("Veuillez ouvrir un fichier SVF", "Erreur", System.Windows.Forms.MessageBoxButtons.OK);
            }
        }