public SqlConnectionSettingsViewPresenter(ISqlConnectionSettingsView view, 
            IWindowsIdentityProvider windowsIdentityProvider)
        {
            _view = view;

            _view.AuthMode = SqlAuthMode.Windows;
            _view.UserName = windowsIdentityProvider.CurrentUserName;
            _view.DisableUserNameAndPassword();
            _view.AuthModeChanged += view_AuthModeChanged;
        }
Exemple #2
0
        public SqlConnectionSettingsViewPresenter(ISqlConnectionSettingsView view,
                                                  IWindowsIdentityProvider windowsIdentityProvider)
        {
            _view = view;

            _view.AuthMode = SqlAuthMode.Windows;
            _view.UserName = windowsIdentityProvider.CurrentUserName;
            _view.DisableUserNameAndPassword();
            _view.AuthModeChanged += view_AuthModeChanged;
        }
 public MainViewModel(ISqlQueryExecutor sqlExecutor, IMainView mainView,
                      IWindowsIdentityProvider windowsIdentityProvider, IDBInfoBuilder dbInfoBuilder)
 {
     _sqlExecutor = sqlExecutor;
     _mainView = mainView;
     _dbInfoBuilder = dbInfoBuilder;
     AllDataBases = new ObservableCollection<DBInfoListItem>();
     Connect = new RelayCommand(ConnectClicked);
     Analyse = new RelayCommand(AnalyseClicked, CanClickAnalyse);
     ShowAboutWindow = new RelayCommand(AboutClicked);
     SqlConnectionSettingsViewModel = new SqlConnectionSettingsViewModel(windowsIdentityProvider);
     HelpText = INIT_TEXT;
 }
 public MainViewModel(ISqlQueryExecutor sqlExecutor, IMainView mainView,
                      IWindowsIdentityProvider windowsIdentityProvider, IDBInfoBuilder dbInfoBuilder)
 {
     _sqlExecutor    = sqlExecutor;
     _mainView       = mainView;
     _dbInfoBuilder  = dbInfoBuilder;
     AllDataBases    = new ObservableCollection <DBInfoListItem>();
     Connect         = new RelayCommand(ConnectClicked);
     Analyse         = new RelayCommand(AnalyseClicked, CanClickAnalyse);
     ShowAboutWindow = new RelayCommand(AboutClicked);
     SqlConnectionSettingsViewModel = new SqlConnectionSettingsViewModel(windowsIdentityProvider);
     HelpText = INIT_TEXT;
 }
 public DataBasesPresenter(IDataBasesView view,
                           ISqlQueryExecutor sqlExecutor,
                           IWindowsIdentityProvider windowsIdentityProvider,
                           IDBInfoBuilder dbInfoBuilder)
 {
     _view                         = view;
     _sqlExecutor                  = sqlExecutor;
     _windowsIdentityProvider      = windowsIdentityProvider;
     _dbInfoBuilder                = dbInfoBuilder;
     _view.Shown                  += _view_Shown;
     _view.ConnectClicked         += _view_ConnectClicked;
     _view.DataBaseCheckedChanged += _view_DataBaseCheckedChanged;
     _view.AnalyseClicked         += _view_AnalyseClicked;
 }
 public DataBasesPresenter(IDataBasesView view, 
     ISqlQueryExecutor sqlExecutor, 
     IWindowsIdentityProvider windowsIdentityProvider,
     IDBInfoBuilder dbInfoBuilder)
 {
     _view = view;
     _sqlExecutor = sqlExecutor;
     _windowsIdentityProvider = windowsIdentityProvider;
     _dbInfoBuilder = dbInfoBuilder;
     _view.Shown += _view_Shown;
     _view.ConnectClicked += _view_ConnectClicked;
     _view.DataBaseCheckedChanged += _view_DataBaseCheckedChanged;
     _view.AnalyseClicked += _view_AnalyseClicked;
 }
Exemple #7
0
 public SqlConnectionSettingsViewModel(IWindowsIdentityProvider windowsIdentityProvider)
 {
     _windowsIdentityProvider = windowsIdentityProvider;
     AuthenticationMode       = (int)SqlAuthMode.Windows;
 }
Exemple #8
0
 public static Impersonate Using(IWindowsIdentityProvider provider)
 {
     return(new Impersonate(provider));
 }
Exemple #9
0
 internal Impersonate(IWindowsIdentityProvider provider)
 {
     this._provider = provider;
 }
Exemple #10
0
 public CustomConnectionPool(IWindowsIdentityProvider identityProvider)
 {
     _windowsIdentityProvider = identityProvider;
 }
 public SqlConnectionSettingsViewModel(IWindowsIdentityProvider windowsIdentityProvider)
 {
     _windowsIdentityProvider = windowsIdentityProvider;
     AuthenticationMode = (int)SqlAuthMode.Windows;
 }