예제 #1
0
 private void BindCommands()
 {
     _view.LoginCommand = new BaseCommand(new Action(() =>
     {
         if (_networkConnection.TryConnect(_networkPathInfo.GetNetworkPath(), _view.Model.Username, _view.Model.Password))
         {
             var permissions = new CredentialsDto()
             {
                 NetworkPath = _networkPathInfo.GetCredentialsName(),
                 Login       = _view.Model.Username,
                 Password    = _view.Model.Password
             };
             _userAccess.WriteCredentials(permissions);
             _view.CloseDialog();
         }
         else
         {
             MessageBox.Show("Fill all fields or enter the correct data");
         }
     }));
 }