public WormholeConnectionEditDialog(WormholeConnection whConnection, bool isShowingFirstSystemOnTop = true)
        {
            _whConnection = whConnection;
            _isShowingFirstSystemOnTop = isShowingFirstSystemOnTop;
            DataContext = _whConnection;
            InitializeComponent();
            var cboFirstSystem  = isShowingFirstSystemOnTop ? CboOldSystem : CboNewSystem;
            var cboSecondSystem = isShowingFirstSystemOnTop ? CboNewSystem : CboOldSystem;

            var firstSystem  = isShowingFirstSystemOnTop ? whConnection.FirstSystem : whConnection.SecondSystem;
            var secondSystem = isShowingFirstSystemOnTop ? whConnection.SecondSystem : whConnection.FirstSystem;

            var firstToSecond = isShowingFirstSystemOnTop ? whConnection.FirstToSecondSignature : whConnection.SecondToFirstSignature;
            var secondToFirst = isShowingFirstSystemOnTop ? whConnection.SecondToFirstSignature : whConnection.FirstToSecondSignature;

            TxtOldSystem.Text = firstSystem;
            TxtNewSystem.Text = secondSystem;

            ScanningStorage.ScannedSignaturesUpdate += ScanningStorageOnScannedSignaturesUpdate;

            InitSignatureComboBox(firstSystem, cboFirstSystem, firstToSecond);

            InitSignatureComboBox(secondSystem, cboSecondSystem, secondToFirst);
        }
Exemplo n.º 2
0
 public WormholeSolarSystemConnection(SolarSystemViewModel first, SolarSystemViewModel second, WormholeConnection whConnection)
     : base(first, second)
 {
     _wormholeConnection = whConnection;
 }