Skip to content

Commit

Permalink
SecurityEditor. Update text fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikasoukhov committed Mar 2, 2015
1 parent 29eeea5 commit ff4e900
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Xaml/SecurityEditor.xaml.cs
Expand Up @@ -100,9 +100,7 @@ public Security SelectedSecurity
private static void OnSelectedSecurityPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
{
var editor = (SecurityEditor)source;

editor._selectedSecurity = (Security)e.NewValue;
editor.UpdatedControls();
editor.UpdatedControls((Security)e.NewValue);
}

private void Button_Click(object sender, RoutedEventArgs e)
Expand All @@ -119,9 +117,10 @@ private void Button_Click(object sender, RoutedEventArgs e)
}
}

private void UpdatedControls()
private void UpdatedControls(Security selectedSecurity)
{
//ButtonSecurity.Content = security == null ? string.Empty : security.Id;
_selectedSecurity = selectedSecurity;
SecurityTextBox.Text = selectedSecurity == null ? string.Empty : selectedSecurity.Id;
SecuritySelected.SafeInvoke();
}

Expand All @@ -133,8 +132,9 @@ private void ClearCommand_OnExecuted(object sender, ExecutedRoutedEventArgs e)
private FilterableSecurityProvider GetSecurityProvider()
{
return SecurityProvider
?? ConfigManager.TryGetService<FilterableSecurityProvider>()
?? (ConfigManager.IsServiceRegistered<IConnector>()
?? ConfigManager.TryGetService<ISecurityProvider>() as FilterableSecurityProvider
?? ConfigManager.TryGetService<FilterableSecurityProvider>()
?? (ConfigManager.IsServiceRegistered<IConnector>()
? new FilterableSecurityProvider(ConfigManager.TryGetService<IConnector>())
: null);
}
Expand Down

0 comments on commit ff4e900

Please sign in to comment.