public override void LoadAdditionals(XPathNavigator reader)
        {
            Connections.Clear();
            var readerAdd = reader.Select("Connectors/Connector");

            while (readerAdd.MoveNext())
            {
                var c = new Connector();
                c.Id    = int.Parse(readerAdd.Current.GetAttribute("Id", readerAdd.Current.NamespaceURI));
                c.Order = c.Id;
                c.Name  = readerAdd.Current.GetAttribute("Name", readerAdd.Current.NamespaceURI);
                var a = new AssignmentForButton();
                a.SetInverseState(bool.Parse(readerAdd.Current.GetAttribute("Invert", readerAdd.Current.NamespaceURI)));
                a.SetAssignedHardware(ControlProcessorHardware.FixForNewVersion(readerAdd.Current.GetAttribute("AssignedHardware", readerAdd.Current.NamespaceURI)));
                a.SetConnector(c);
                Connections.Add(a);
            }
        }
 public virtual void LoadAdditionals(XPathNavigator reader)
 {
     // Фикс для старой версии профиля
     Connections[0].SetAssignedHardware(reader.GetAttribute("AssignedHardware", reader.NamespaceURI));
     if (string.IsNullOrEmpty(Connections[0].GetAssignedHardware()))
     {
         Connections.Clear();
         var readerAdd = reader.Select("Connectors/Connector");
         while (readerAdd.MoveNext())
         {
             var c = new Connector
             {
                 Id    = int.Parse(readerAdd.Current.GetAttribute("Id", readerAdd.Current.NamespaceURI)),
                 Order = int.Parse(readerAdd.Current.GetAttribute("Order", readerAdd.Current.NamespaceURI)),
                 Name  = readerAdd.Current.GetAttribute("Name", readerAdd.Current.NamespaceURI)
             };
             var a = new AssignmentForButton();
             a.SetInverseState(bool.Parse(readerAdd.Current.GetAttribute("Invert", readerAdd.Current.NamespaceURI)));
             a.SetAssignedHardware(ControlProcessorHardware.FixForNewVersion(readerAdd.Current.GetAttribute("AssignedHardware", readerAdd.Current.NamespaceURI)));
             a.SetConnector(c);
             Connections.Add(a);
         }
     }
 }