public void SaveDataLayers(Dictionary <string, string> dicLayers)
        {
            SerializerXml serialize = new SerializerXml();

            foreach (var item in dicLayers)
            {
                TranferLayer dataTransferLayer = new TranferLayer();
                dataTransferLayer.AuthorMark    = Environment.UserName;
                dataTransferLayer.LayerDocument = item.Key;
                dataTransferLayer.LayerStandart = item.Value;
                MainForm.listDataLayers.Add(dataTransferLayer);
            }
            serialize.SerializeList(MainForm.listDataLayers.GroupBy(x => x.LayerDocument).Select(q => q.First()).ToList());
        }
示例#2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            dicLineTypes = new Dictionary <long, string>();
            Dictionary <string, string> dicForTransferLayer = new Dictionary <string, string>();

            using (var stdDatabase = new Database(false, true))
            {
                standartList = lm.GetlistLayersStandart(stdDatabase, listBoxLayersStd);
                activeList   = lm.GetListLayersActiveDocument();
                SerializerXml ser = new SerializerXml();

                listDataLayers = ser.DeserializeXmlFile();                                         //Список слоев базы
                lm.GetListNotStandartLayers(dicForTransferLayer, listDataLayers, listViewTransfer, listBoxLayersDoc);
                groupBoxActive.Text = "Нестандартные слои в чертеже (" + activeList.Count + ")";
                groupBoxStd.Text    = "Стандартные слои (" + standartList.Count + ")";
                if (dicForTransferLayer.Count == 0)
                {
                    return;
                }
                lm.TransferLayer(dicForTransferLayer);                                                                  //Замена свойств слоя, совпадающего по названию со стандартным
            }
        }
        public void SaveDataLayers(Dictionary<string, string> dicLayers)
        {
            SerializerXml serialize = new SerializerXml();
             foreach (var item in dicLayers)
             {
            TranferLayer dataTransferLayer = new TranferLayer();
            dataTransferLayer.AuthorMark = Environment.UserName;
            dataTransferLayer.LayerDocument = item.Key;
            dataTransferLayer.LayerStandart = item.Value;
            MainForm.listDataLayers.Add(dataTransferLayer);

             }
             serialize.SerializeList(MainForm.listDataLayers.GroupBy(x => x.LayerDocument).Select(q => q.First()).ToList());
        }
        private void MainForm_Load(object sender, EventArgs e)
        {
            dicLineTypes = new Dictionary<long, string>();
             Dictionary<string, string> dicForTransferLayer = new Dictionary<string, string>();
             using (var stdDatabase = new Database(false, true))
             {
            standartList = lm.GetlistLayersStandart(stdDatabase, listBoxLayersStd);
            activeList = lm.GetListLayersActiveDocument();
            SerializerXml ser = new SerializerXml();

            listDataLayers = ser.DeserializeXmlFile();                                             //Список слоев базы
            lm.GetListNotStandartLayers(dicForTransferLayer, listDataLayers, listViewTransfer, listBoxLayersDoc);
            groupBoxActive.Text = "Нестандартные слои в чертеже (" + activeList.Count + ")";
            groupBoxStd.Text = "Стандартные слои (" + standartList.Count + ")";
            if (dicForTransferLayer.Count == 0) return;
            lm.TransferLayer(dicForTransferLayer);                                                                      //Замена свойств слоя, совпадающего по названию со стандартным
             }
        }