示例#1
0
        private void SetOriginalSource(SourceViewModel svm)
        {
            originalSource = svm;
            RaisePropertyChanged(IDVisibilityProperty);

            var source = svm.Data;

            IDText   = source.ID.Value.ToString();
            Name     = source.SourceName;
            Url      = SourceViewModel.GetUrl(source);
            Disabled = svm.Disabled;

            CanSelectProvider = false;
            SelectedProvider  = providers.First(p => p.ProviderId == source.ProviderID);

            //TODO:ADD
            //TypeComboBox.SelectedItem = providers.First(p => p.ProviderId == source.ProviderID);
            //TypeComboBox.IsEnabled = false;

            SetSelectedColor(SourceViewModel.GetColor(source));
        }