public static async void RefreshServerConfigValue(IWebService service)
        {
            bool imageAsButton = AppSettings.ShowImageAsButton;
            bool showImages = AppSettings.ShowSettingsAutoLoadImages;
            
            try
            {
                AppSettings.ShowImageAsButton = AppSettings.ShowSettingsAutoLoadImages = false;
                ZumpaReader.WebService.WebService.ContextResult<Dictionary<string, object>> result = await service.GetConfig();

                if (!result.HasError)
                {
                    Dictionary<string, object> data = result.Context;
                    if(data.ContainsKey(AppSettings.PropertyKeys.ShowImageAsButton.ToString()))
                    {
                        AppSettings.ShowImageAsButton = Convert.ToBoolean(data[AppSettings.PropertyKeys.ShowImageAsButton.ToString()]);
                    }
                    if (data.ContainsKey(AppSettings.PropertyKeys.ShowSettingsAutoLoadImages.ToString()))
                    {
                        AppSettings.ShowSettingsAutoLoadImages = Convert.ToBoolean(data[AppSettings.PropertyKeys.ShowSettingsAutoLoadImages.ToString()]);
                    }
                }
            }
            catch (Exception e)
            {
                //do nothing
                RLog.E(typeof(AppStartHelper), e, "Loading config from server");
            }
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.SignIn);

            webService = WebServiceFactory.Create ();

            editTextUsername = FindViewById<EditText> (Resource.Id.editTextUsername);
            editTextPassword = FindViewById<EditText> (Resource.Id.editTextPassword);
            buttonSignIn = FindViewById<Button> (Resource.Id.buttonSignIn);
            buttonRegister = FindViewById<Button> (Resource.Id.buttonRegister);

            buttonSignIn.Click += async delegate {

                var r = await webService.SignInAsync(new SignInRequest {
                    Username = editTextUsername.Text
                });

                if (!r.Succeeded) {
                    Toast.MakeText(this, "SignIn Failed: " + r.Exception, ToastLength.Short).Show();
                    return;
                }

                App.Settings.SignedInUsername = editTextUsername.Text;
                StartActivity(typeof(CommitmentsActivity));
            };

            buttonRegister.Click += delegate {
                StartActivity(typeof(RegisterActivity));
            };
        }
예제 #3
0
		public async Task<string> StaffLogin (string username, string password, IWebService webService, IErrorLog errorLog)
		{
			if (CrossConnectivity.Current.IsConnected) {
				return await StaffMemberDAL.StaffLogin (username, password, webService, errorLog);
			} else {
				return "Not connected";
			}
		}
예제 #4
0
 /// <summary>
 /// sql 쿼리를 서버에 보낸다
 /// </summary>
 /// <param name="EncryptionSeed">서버보안문자(seed)</param>
 /// <param name="sqlService">sql웹서비스 프록시객체</param>
 public SQLDataServiceModel(string EncryptionSeed, string ServiceURL, IWebService sqlService)
 {
     //[1] 웹서비스 동적 추가
     this.sqlProxy = sqlService;
     this.ServiceURL = ServiceURL;
     //[2] 암호화키
     this.EncryptionSeed = EncryptionSeed;
 }
예제 #5
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void init() { 
     switch (this.WebServiceEnum) {
         case WebServiceEnum.get: this.WebService = new GetWebService(); break;
         case WebServiceEnum.post: this.WebService = new PostWebService(); break;
         case WebServiceEnum.soap: this.WebService = new SoapWebService(); break;
         case WebServiceEnum.dynamic: this.WebService = new DynamicWebService(); break;
         default: this.WebService = new GetWebService(); break;
     }
 }
 public StringCalculator(ILogger logger, IWebService service)
 {
     _logger = logger;
     _service = service;
     _invalidNumbers = new List<int>();
     _numberStrageies = new List<ProcessValueAction>();
     _numberStrageies.Add(ThrowOnNegativeValues);
     _numberStrageies.Add(SkipNumbersLargerThan1000);
     _numberStrageies.Add(AggregateNewNumber);
 }
예제 #7
0
   public LeadController(IWebService<Lead> leadService, IWebService<User> userService,
 IWebService<Course> courseWebService, IWebService<Country> countryWebService)
   {
       _leadService = leadService;
         IEnumerable<User> users = userService.Get((int?) null);
         IEnumerable<Country> countries = countryWebService.Get((int?) null);
         IEnumerable<Course> courses = courseWebService.Get((int?) null);
         ViewBag.Courses = courses;
         ViewBag.Users = users;
         ViewBag.Countries = countries;
   }
예제 #8
0
        public LoginViewModel()
            : base()
        {
            _currentStateService.SetupTextProvider();
            _webService = Mvx.Resolve<IWebService>();
            _preferences = Mvx.Resolve<IPreferencesService>();

            if (!string.IsNullOrEmpty(_preferences.Username) && !string.IsNullOrEmpty(_preferences.Password))
            {
                LogInUser();
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainPageViewModel"/> class.
        /// </summary>
        public ThreadingPageViewModel(INavigationService navigator)
        {
            // INavigationService is available to us using Constructor Injection.
            m_navigator = navigator;

            // HACK: The following call to instantiate the m_svc is the opposite of 
            // Inversion of Control, also known as Direct Control and is considered
            // a DI Anti-Pattern. This happens every time we create a new instance 
            // of a type by using the new keyword.
            m_webService = new WebService(new StockQuote());

            SetStatus(String.Empty, StatusState.Ready);
        }
		public CommitmentsViewController () :
			base (MonoTouch.UIKit.UITableViewStyle.Grouped, new RootElement ("Commitments"), true)
		{
			webService = WebServiceFactory.Create ();

			Root = new RootElement ("Commitments") {
				new Section ("Active Commitments") {

				},
				new Section ("Inactive / Past Commitments") {

				}
			};
		}
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.CommitmentDetails);

            webService = WebServiceFactory.Create ();

            //Deserialize the commitment that was passed in
            commitment = JsonSerializer.Deserialize<Commitment> (this.Intent.GetStringExtra ("COMMITMENT"));

            textViewName = FindViewById<TextView> (Resource.Id.textViewName);
            textViewDescription = FindViewById<TextView> (Resource.Id.textViewDescription);
            textViewStartDate = FindViewById<TextView> (Resource.Id.textViewStartDate);
            textViewEndDate = FindViewById<TextView> (Resource.Id.textViewEndDate);
            textViewCluster = FindViewById<TextView> (Resource.Id.textViewCluster);
            buttonCheckIn = FindViewById<Button> (Resource.Id.buttonCheckIn);

            //TODO: Need to add meaningful name/descriptions
            textViewName.Text = "TODO: Put in Name";
            textViewDescription.Text = "TODO: Put in Desc";
            textViewStartDate.Text = commitment.StartDate.ToString ("ddd MMM d, yyyy");
            textViewEndDate.Text = commitment.EndDate.ToString ("ddd MMM d, yyyy");
            textViewCluster.Text = "TODO: Put in Cluster";

            buttonCheckIn.Click += async delegate {

                //TODO: Create confirmation dialog  (Are you sure: Yes/No)

                var confirm = true;

                if (confirm) {
                    var checkedIn = commitment.IsActive;

                    if (checkedIn) {
                        var r = await webService.CheckOutAsync(new CheckOutRequest { Username = App.Settings.SignedInUsername });
                        checkedIn = !(r.Succeeded && r.Result);
                    } else {
                        var r = await webService.CheckInAsync(new CheckInRequest { Username = App.Settings.SignedInUsername });
                        checkedIn = r.Succeeded && r.Result;
                    }

                    buttonCheckIn.Text = checkedIn ? "Check Out" : "Check In";
                    commitment.IsActive = checkedIn;
                }
            };
        }
예제 #12
0
        public CloneViewModel(IDialog dialog, IMessenger messenger, IShellService shell, IStorage storage, IWebService web)
        {
            _dialog    = dialog;
            _messenger = messenger;
            _shell     = shell;
            _storage   = storage;
            _web       = web;

            _repositories = new ObservableCollection <ProjectViewModel>();

            Repositories = CollectionViewSource.GetDefaultView(_repositories);
            Repositories.GroupDescriptions.Add(new PropertyGroupDescription("Owner"));

            _baseRepositoryPath = _storage.GetBaseRepositoryDirectory();

            LoadRepositoriesAsync();

            _cloneCommand  = new DelegateCommand(OnClone, CanClone);
            _browseCommand = new DelegateCommand(OnBrowse);
        }
예제 #13
0
        public LoginViewModel(IDialog dialog, IPasswordMediator mediator, IMessenger messenger, IShellService shell, IStorage storage, IWebService web)
        {
            _dialog    = dialog;
            _messenger = messenger;
            _shell     = shell;
            _storage   = storage;
            _web       = web;

            _mediator   = mediator;
            ApiVersions = new Dictionary <string, string>();

            ApiVersions.Add("V4_Oauth", "GitLab ApiV4 Oauth2");
            ApiVersions.Add("V3_Oauth", "GitLab ApiV3 Oauth2");
            ApiVersions.Add("V4", "GitLab ApiV4 ");
            ApiVersions.Add("V3", "GitLab ApiV3");
            SelectedApiVersion     = "V4_Oauth";
            _loginCommand          = new DelegateCommand(OnLogin);
            _forgetPasswordCommand = new DelegateCommand(OnForgetPassword);
            _activeAccountCommand  = new DelegateCommand(OnActiveAccount);
            _signupCommand         = new DelegateCommand(OnSignup);
        }
        public GitLabNavigationItem(Octicon icon, IGitService git, IShellService shell, IStorage storage, ITeamExplorerServices tes, IWebService web)
        {
            _git     = git;
            _shell   = shell;
            _storage = storage;
            _tes     = tes;
            _web     = web;
            octicon  = icon;
            var brush = new SolidColorBrush(Color.FromRgb(66, 66, 66));

            brush.Freeze();
            OnThemeChanged();
            VSColorTheme.ThemeChanged += _ =>
            {
                OnThemeChanged();
                Invalidate();
            };
            var gitExt = ServiceProvider.GlobalProvider.GetService <Microsoft.VisualStudio.TeamFoundation.Git.Extensibility.IGitExt>();

            gitExt.PropertyChanged += GitExt_PropertyChanged;
        }
예제 #15
0
        public string TestWebService(IWebService inputValues)
        {
            var con            = Connection;
            var comsController = CommunicationControllerFactory.CreateController("TestWebService");
            var serialiser     = new Dev2JsonSerializer();

            comsController.AddPayloadArgument("WebService", serialiser.SerializeToBuilder(inputValues));
            var output = comsController.ExecuteCommand <IExecuteMessage>(con, GlobalConstants.ServerWorkspaceID);

            if (output == null)
            {
                throw new WarewolfTestException(ErrorResource.UnableToContactServer, null);
            }

            if (output.HasError)
            {
                throw new WarewolfTestException(output.Message.ToString(), null);
            }

            return(output.Message.ToString());
        }
예제 #16
0
        public async Task MatchFinished(ITransaction tx, ActorInfo actorId, GameState finalGameState, IReliableDictionary <UserRequest, ActorInfo> matchmakedUsers, IReliableDictionary <ActorInfo, PlayersInMatch> usedActors)
        {
            ConditionalValue <PlayersInMatch> playersInMatch = await usedActors.TryRemoveAsync(tx, actorId);

            if (!playersInMatch.HasValue)
            {
                ServiceEventSource.Current.ServiceMessage(this.Context, $"Somethings went wrong while removing in use actors");
            }
            else
            {
                foreach (var player in playersInMatch.Value.Players)
                {
                    ConditionalValue <ActorInfo> remove = await matchmakedUsers.TryRemoveAsync(tx, player);

                    if (!remove.HasValue)
                    {
                        ServiceEventSource.Current.ServiceMessage(this.Context, $"Somethings went wrong while removing request, it's not present in dictionary");
                        continue;
                    }
                }
            }

            bool r = poolInfo.pool[actorId.ActorIndex].ActiveActors.Remove(actorId.ActorId);

            if (!r)
            {
                ServiceEventSource.Current.ServiceMessage(this.Context, $"Something went wrong, cannot remove actor with id {actorId}");
            }

            ServiceEventSource.Current.ServiceMessage(this.Context, $"Match finished, ActorId: {actorId}");

            if (finalGameState != null)
            {
                string serviceUri = $"{this.context.CodePackageActivationContext.ApplicationName}/WebService";

                IWebService service = ServiceProxy.Create <IWebService>(new Uri(serviceUri));

                await service.MatchFinished(finalGameState);
            }
        }
        public MainController(MainViewModel mainViewModel, PlaylistViewModel playlistViewModel, PodcastViewModel podcastViewModel,
                              IWebService webService, PlayerViewModel playerViewModel, ILogService logService)
        {
            string baseAddress = string.Empty;

            username                                    = Preferences.Get(nameof(LoginViewModel.Username), default(string), "login");
            password                                    = Preferences.Get(nameof(LoginViewModel.Password), default(string), "login");
            this.mainViewModel                          = mainViewModel;
            this.playlistViewModel                      = playlistViewModel;
            this.podcastViewModel                       = podcastViewModel;
            this.playerViewModel                        = playerViewModel;
            this.webService                             = webService;
            this.logService                             = logService;
            this.mainViewModel.MenuItems                = MainRepository.GetMenuItems();
            this.mainViewModel.PropertyChanged         += MainViewModel_PropertyChanged;
            this.playlistViewModel.PropertyChanged     += PlaylistViewModel_PropertyChanged;
            this.podcastViewModel.PropertyChanged      += PodcastViewModel_PropertyChanged;
            this.playerViewModel.PropertyChanged       += PlayerViewModel_PropertyChanged;
            this.playlistViewModel.LoadPlaylistsCommand = new Command(async refresh => await LoadPlaylists(refresh));
            this.podcastViewModel.LoadPodcastsCommand   = new Command(async refresh => await LoadPodcasts(refresh));
            this.podcastViewModel.PlayerCommand         = new Command(GoToPlayer);
            this.playlistViewModel.LoadPlaylistCommand  = new Command(async id => await LoadPlaylist(id));
            this.podcastViewModel.LoadPodcastCommand    = new Command(async id => await LoadPodcast(id));
            this.playlistViewModel.PlayCommand          = new Command(PlaylistPlay);
            this.playlistViewModel.PlayerCommand        = new Command(GoToPlayer);
            this.podcastViewModel.PlayCommand           = new Command(PodcastPlay);
            InitializeMediaPlayer();
#if DEBUG
            baseAddress = Preferences.Get("BASE_URI_DEBUG", default(string));
#else
            baseAddress = Preferences.Get("BASE_URI", default(string));
#endif
            baseUri = new Uri(baseAddress);
            pages   = new Dictionary <Pages, NavigationPage>()
            {
                { Pages.Playlist, new NavigationPage(playlistViewModel.View) },
                { Pages.Podcast, new NavigationPage(podcastViewModel.View) }
            };
            this.mainViewModel.SelectedMenuItem = this.mainViewModel.MenuItems.FirstOrDefault();
        }
        //(L3R1)
        public BuildingController(string id, ILightManager iLightManager,
                                  IFireAlarmManager iFireAlarmManager,
                                  IDoorManager iDoorManager, IWebService iWebService,
                                  IEmailService iEmailService)
        {
            checkIdIsWithinLimits(id);

            this.buildingID        = id.ToLower();
            this._lightManager     = iLightManager;
            this._fireAlarmManager = iFireAlarmManager;
            this._doorManager      = iDoorManager;
            this._webService       = iWebService;
            this._emailService     = iEmailService;

            this.currentState = STATE_OUT_OF_HOURS; //(L1R2)

            ThrowExcpetionIfAnObjectIsNull();       //(L3R1)

            ThrowExceptionStateInvalid();           //(L2R3)

            ThrowExceptionIfIdIsNull(id);           // (L1R1)
        }
예제 #19
0
 public MaintenanceController(IUnitOfWork unitOfWork, ISettingRepository settingRepository, IPositionRepository positionRepository, IPaymentFrequencyRepository paymentFrequencyRepository,
                              IHolidayRepository holidayRepository, IDepartmentRepository departmentRepository, ILeaveRepository leaveRepository, ILoanRepository loanRepository,
                              IMachineRepository machineRepository, IWebService webService, IDeductionRepository deductionRepository,
                              IEmployeeMachineService emplyeeMachineService, IWorkScheduleRepository workScheduleRepository, IAdjustmentRepository adjustmentRepository,
                              ICompanyRepository companyRepository)
 {
     _unitOfWork                 = unitOfWork;
     _settingRepository          = settingRepository;
     _positionRepository         = positionRepository;
     _paymentFrequencyRepository = paymentFrequencyRepository;
     _departmentRepository       = departmentRepository;
     _holidayRepository          = holidayRepository;
     _leaveRepository            = leaveRepository;
     _loanRepository             = loanRepository;
     _machineRepository          = machineRepository;
     _webService                 = webService;
     _emplyeeMachineService      = emplyeeMachineService;
     _workScheduleRepository     = workScheduleRepository;
     _deductionRepository        = deductionRepository;
     _adjustmentRepository       = adjustmentRepository;
     _companyRepository          = companyRepository;
 }
예제 #20
0
        public LoginViewModel(IDialog dialog, IPasswordMediator mediator, IMessenger messenger, IShellService shell, IStorage storage, IWebService web)
        {
            _dialog    = dialog;
            _messenger = messenger;
            _shell     = shell;
            _storage   = storage;
            _web       = web;

            _mediator   = mediator;
            ApiVersions = new Dictionary <string, string>();
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.AutoDiscovery), Strings.AutoDiscovery);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V4_Oauth), Strings.GitLabApiV4Oauth2);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V3_Oauth), Strings.GitLabApiV3Oauth2);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V4), Strings.GitLabApiV4);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V3), Strings.GitLabApiV3);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V3_1), Strings.GitLabApiV31);
            SelectedApiVersion     = Enum.GetName(typeof(ApiVersion), ApiVersion.AutoDiscovery);
            _loginCommand          = new DelegateCommand(OnLogin);
            _forgetPasswordCommand = new DelegateCommand(OnForgetPassword);
            _activeAccountCommand  = new DelegateCommand(OnActiveAccount);
            _signupCommand         = new DelegateCommand(OnSignup);
        }
예제 #21
0
 public ChatHub(IThongTin_ThietBiAppService thongTin_ThietBiAppService,
                ILogDieuKhienAppService logDieuKhienAppService,
                IDM_ThietBiAppService dm_ThietBiAppService,
                IImageAppService imageAppService,
                IThongTinCanhBaoAppService thongtinCanhBaoAppService,
                ILichSuHoatDongThietBiAppService lichSuHoatDongThietBiAppService,
                IDM_THONGTINQUANLYAppService dm_THONGTINQUANLYAppService,
                IWebService webService,
                IUserNewAppService userService)
 {
     AbpSession = NullAbpSession.Instance;
     Logger     = NullLogger.Instance;
     _thongTin_ThietBiAppService      = thongTin_ThietBiAppService;
     _logDieuKhienAppService          = logDieuKhienAppService;
     _dm_ThietBiAppService            = dm_ThietBiAppService;
     _imageAppService                 = imageAppService;
     _thongtinCanhBaoAppService       = thongtinCanhBaoAppService;
     _lichSuHoatDongThietBiAppService = lichSuHoatDongThietBiAppService;
     _dm_THONGTINQUANLYAppService     = dm_THONGTINQUANLYAppService;
     _webService  = webService;
     _userService = userService;
 }
예제 #22
0
        public SensorClient(string username, string ipaddress, int port, IDataProvider dataProvider, IWebService webService, ILogger logger)
        {
            _WebService   = webService;
            _DataProvider = dataProvider;
            _Logger       = logger;

            Username  = username;
            IPaddress = ipaddress;
            Port      = port;

            SetNeighbour(new UserAddress()
            {
                UserExists = false
            });

            _startTime = DateTime.Now; // Save start time

            SetLatLon();               // Generate Latitude and Longitude

            Register();                // Register sensor with web-service

            StartServer();
        }
예제 #23
0
 public EmployeeController(IUnitOfWork unitOfWork, IEmployeeRepository employeeRepository, IEmployeeInfoRepository employeeInfoRepository,
                           ISettingRepository settingRepository, IPositionRepository positionRepository, IEmployeeLoanRepository employeeLoanRepository,
                           IWebService webService, IDepartmentRepository departmentRepository, ILoanRepository loanRepository, IEmployeeInfoHistoryRepository employeeInfoHistoryRepository, IEmployeeLeaveRepository employeeLeaveRepository,
                           ILeaveRepository leaveRepository, IDeductionRepository deductionRepository, IEmployeeDeductionService employeeDeductionService,
                           IEmployeeWorkScheduleService employeeWorkScheduleService, IWorkScheduleRepository workScheduleRepository)
 {
     _unitOfWork                    = unitOfWork;
     _employeeRepository            = employeeRepository;
     _settingRepository             = settingRepository;
     _employeeInfoRepository        = employeeInfoRepository;
     _positionRepository            = positionRepository;
     _webService                    = webService;
     _employeeLoanRepository        = employeeLoanRepository;
     _departmentRepository          = departmentRepository;
     _loanRepository                = loanRepository;
     _employeeInfoHistoryRepository = employeeInfoHistoryRepository;
     _employeeLeaveRepository       = employeeLeaveRepository;
     _leaveRepository               = leaveRepository;
     _deductionRepository           = deductionRepository;
     _employeeDeductionService      = employeeDeductionService;
     _employeeWorkScheduleService   = employeeWorkScheduleService;
     _workScheduleRepository        = workScheduleRepository;
 }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			SetContentView (Resource.Layout.Register);

			webService = WebServiceFactory.Create ();

			editTextFirstName = FindViewById<EditText> (Resource.Id.editTextFirstName);
			editTextLastName = FindViewById<EditText> (Resource.Id.editTextLastName);
			editTextEmail = FindViewById<EditText> (Resource.Id.editTextEmail);
			editTextPhone = FindViewById<EditText> (Resource.Id.editTextPhone);
			editTextUsername = FindViewById<EditText> (Resource.Id.editTextUsername);
			editTextPassword = FindViewById<EditText> (Resource.Id.editTextPassword);
			editTextPassword2 = FindViewById<EditText> (Resource.Id.editTextPassword2);
			spinnerCluster = FindViewById<Spinner> (Resource.Id.spinnerCluster);
			buttonCreate = FindViewById<Button> (Resource.Id.buttonCreate);

			//Let's disable the button until the clusters have loaded
			buttonCreate.Enabled = false;

			Refresh ();
		}
예제 #25
0
        // constructor
        public MiruDbService(
            ICurrentSeasonModel currentSeasonModel,
            ICurrentUserAnimeListModel currentUserAnimeListModel,
            IJikan jikanWrapper,
            Func <IMiruDbContext> createMiruDbContext,
            ISyncedMyAnimeListUser syncedMyAnimeListUser,
            IWebService webService,
            Lazy <IFileSystemService> fileSystemService,
            Func <MiruAnimeModel> createMiruAnimeModel)
        {
            #region dependency injection

            CurrentSeason         = currentSeasonModel;
            CurrentUserAnimeList  = currentUserAnimeListModel;
            JikanWrapper          = jikanWrapper;
            SyncedMyAnimeListUser = syncedMyAnimeListUser;
            WebService            = webService;
            CreateMiruDbContext   = createMiruDbContext;
            FileSystemService     = fileSystemService;
            CreateMiruAnimeModel  = createMiruAnimeModel;

            #endregion dependency injection
        }
예제 #26
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Register);

            webService = WebServiceFactory.Create();

            editTextFirstName = FindViewById <EditText> (Resource.Id.editTextFirstName);
            editTextLastName  = FindViewById <EditText> (Resource.Id.editTextLastName);
            editTextEmail     = FindViewById <EditText> (Resource.Id.editTextEmail);
            editTextPhone     = FindViewById <EditText> (Resource.Id.editTextPhone);
            editTextUsername  = FindViewById <EditText> (Resource.Id.editTextUsername);
            editTextPassword  = FindViewById <EditText> (Resource.Id.editTextPassword);
            editTextPassword2 = FindViewById <EditText> (Resource.Id.editTextPassword2);
            spinnerCluster    = FindViewById <Spinner> (Resource.Id.spinnerCluster);
            buttonCreate      = FindViewById <Button> (Resource.Id.buttonCreate);

            //Let's disable the button until the clusters have loaded
            buttonCreate.Enabled = false;

            Refresh();
        }
예제 #27
0
        public CoreService(ILoggingService loggingService, ITasksService tasksService, INotificationService notificationService, IHealthCheckService healthCheckService, ITradingService tradingService, IWebService webService, IBacktestingService backtestingService)
        {
            this.loggingService      = loggingService;
            this.tasksService        = tasksService;
            this.notificationService = notificationService;
            this.healthCheckService  = healthCheckService;
            this.tradingService      = tradingService;
            this.webService          = webService;
            this.backtestingService  = backtestingService;

            // Log unhandled exceptions
            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
            tasksService.SetUnhandledExceptionHandler(OnUnhandledException);

            // Set decimal separator to a dot for all cultures
            var cultureInfo = new CultureInfo(CultureInfo.CurrentCulture.Name);

            cultureInfo.NumberFormat.NumberDecimalSeparator = ".";
            CultureInfo.DefaultThreadCurrentCulture         = cultureInfo;
            CultureInfo.DefaultThreadCurrentUICulture       = cultureInfo;

            Version = GetType().Assembly.GetCustomAttribute <AssemblyFileVersionAttribute>().Version + VersionType;
        }
        public ConnectSectionViewModel(IMessenger messenger, IShellService shell, IStorage storage, ITeamExplorerServices teamexplorer, IViewFactory viewFactory, IWebService web)
        {
            messenger.Register("OnLogined", OnLogined);
            messenger.Register <string, Repository>("OnClone", OnRepositoryCloned);

            _messenger    = messenger;
            _shell        = shell;
            _storage      = storage;
            _teamexplorer = teamexplorer;
            _viewFactory  = viewFactory;
            _web          = web;

            Repositories = new ObservableCollection <Repository>();

            Repositories.CollectionChanged += OnRepositoriesChanged;

            _signOutCommand        = new DelegateCommand(OnSignOut);
            _cloneCommand          = new DelegateCommand(OnClone);
            _createCommand         = new DelegateCommand(OnCreate);
            _openRepositoryCommand = new DelegateCommand <Repository>(OnOpenRepository);

            LoadRepositoriesAsync();
        }
예제 #29
0
        public GenericWebService(IWebService original, bool isNFCe)
        {
            if (isNFCe && original is IWebServiceProducaoNFCe producao)
            {
                ConsultarProducao         = producao.ConsultarProducaoNFCe;
                AutorizarProducao         = producao.AutorizarProducaoNFCe;
                RespostaAutorizarProducao = producao.RespostaAutorizarProducaoNFCe;
                RecepcaoEventoProducao    = producao.RecepcaoEventoProducaoNFCe;
                InutilizacaoProducao      = producao.InutilizacaoProducaoNFCe;
            }
            else
            {
                ConsultarProducao         = original.ConsultarProducao;
                AutorizarProducao         = original.AutorizarProducao;
                RespostaAutorizarProducao = original.RespostaAutorizarProducao;
                RecepcaoEventoProducao    = original.RecepcaoEventoProducao;
                InutilizacaoProducao      = original.InutilizacaoProducao;
            }

            if (isNFCe && original is IWebServiceHomologacaoNFCe homologacao)
            {
                ConsultarHomologacao         = homologacao.ConsultarHomologacaoNFCe;
                AutorizarHomologacao         = homologacao.AutorizarHomologacaoNFCe;
                RespostaAutorizarHomologacao = homologacao.RespostaAutorizarHomologacaoNFCe;
                RecepcaoEventoHomologacao    = homologacao.RecepcaoEventoHomologacaoNFCe;
                InutilizacaoHomologacao      = homologacao.InutilizacaoHomologacaoNFCe;
            }
            else
            {
                ConsultarHomologacao         = original.ConsultarHomologacao;
                AutorizarHomologacao         = original.AutorizarHomologacao;
                RespostaAutorizarHomologacao = original.RespostaAutorizarHomologacao;
                RecepcaoEventoHomologacao    = original.RecepcaoEventoHomologacao;
                InutilizacaoHomologacao      = original.InutilizacaoHomologacao;
            }
        }
예제 #30
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Commitments);

            webService = WebServiceFactory.Create();

            buttonVolunteer = FindViewById <Button> (Resource.Id.buttonVolunteer);
            listActive      = FindViewById <ListView> (Resource.Id.listActive);
            listInactive    = FindViewById <ListView> (Resource.Id.listInactive);

            activeAdapter   = new CommitmentsAdapter(this);
            inactiveAdapter = new CommitmentsAdapter(this);

            listActive.Adapter   = activeAdapter;
            listInactive.Adapter = inactiveAdapter;

            listActive.ItemClick += (sender, e) => {
                var c             = activeAdapter[e.Position];
                var detailsIntent = new Intent(this, typeof(CommitmentDetailsActivity));
                detailsIntent.PutExtra("COMMITMENT", JsonSerializer.Serialize(c));
                StartActivity(detailsIntent);
            };
            listInactive.ItemClick += (sender, e) => {
                var c             = inactiveAdapter[e.Position];
                var detailsIntent = new Intent(this, typeof(CommitmentDetailsActivity));
                detailsIntent.PutExtra("COMMITMENT", JsonSerializer.Serialize(c));
                StartActivity(detailsIntent);
            };
            buttonVolunteer.Click += delegate {
                StartActivity(typeof(DisastersActivity));
            };

            Refresh();
        }
        public PublishSectionViewModel(IMessenger messenger, IGitService git, IShellService shell, IStorage storage, ITeamExplorerServices tes, IViewFactory viewFactory, IWebService web)
        {
            messenger.Register("OnLogined", OnLogined);
            messenger.Register("OnSignOuted", OnSignOuted);

            _messenger   = messenger;
            _git         = git;
            _shell       = shell;
            _storage     = storage;
            _tes         = tes;
            _viewFactory = viewFactory;
            _web         = web;

            Name        = Strings.Name;
            Provider    = Strings.Provider;
            Description = Strings.Description;

            _loginCommand      = new DelegateCommand(OnLogin);
            _signUpCommand     = new DelegateCommand(OnSignUp);
            _getStartedCommand = new DelegateCommand(OnGetStarted);
            _publishCommand    = new DelegateCommand(OnPublish, CanPublish);

            LoadResources();
        }
예제 #32
0
        public CoreService(ILoggingService loggingService, INotificationService notificationService, IHealthCheckService healthCheckService, ITradingService tradingService, IWebService webService, IBacktestingService backtestingService)
        {
            this.loggingService      = loggingService;
            this.notificationService = notificationService;
            this.healthCheckService  = healthCheckService;
            this.tradingService      = tradingService;
            this.webService          = webService;
            this.backtestingService  = backtestingService;

            this.timedTasks     = new ConcurrentDictionary <string, HighResolutionTimedTask>();
            this.syncStopSwatch = new Stopwatch();

            // Log unhandled exceptions
            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;

            // Set decimal separator to a dot for all cultures
            var cultureInfo = new CultureInfo(CultureInfo.CurrentCulture.Name);

            cultureInfo.NumberFormat.NumberDecimalSeparator = ".";
            CultureInfo.DefaultThreadCurrentCulture         = cultureInfo;
            CultureInfo.DefaultThreadCurrentUICulture       = cultureInfo;

            Version = GetType().Assembly.GetCustomAttribute <AssemblyFileVersionAttribute>().Version;
        }
예제 #33
0
 public void AddToCheck(IWebService check)
 {
     _array.Add(check);
 }
        public SurveyCommand(IWebService service, Action<Survey> callback) :base(service)
        {
            _service = service;
            _callback = callback;

        }
 public LoginCommand(IWebService service)
 {
     _service = service;
 }
예제 #36
0
 public LogAnalyzer(IWebService service)
 {
     this.service = service;
 }
예제 #37
0
 public LogAnalyzer(IWebService service, IEmailService email)
 {
     Email   = email;
     Service = service;
 }
 public SwitchFavoriteThreadCommand(IWebService service, Action<bool> callback)
 {
     CanExecuteIt = true;
     _service = service;
     _callback = callback;
 }
 public string TestWebService(IWebService inputValues) => UpdateManagerProxy.TestWebService(inputValues);
예제 #40
0
 public StringCalculator(ILogger logger, IWebService service)
 {
     _logger = logger;
     _service = service;
 }
예제 #41
0
 public CourseController(WebService<Course> courseWebService)
 {
     _courseWebService = courseWebService;
 }
예제 #42
0
		public AlertService(IFollowService followService, IWebService webService)
        {
            _WebService = webService;
            _followService = followService;
        }
 public CourseRequestedController(WebService<Course> courseWebService)
 {
     _courseWebService = courseWebService;
 }
 public PostPageViewModel()
 {
     _survey = new Survey() { Answers = new string[6] };
     _webService = HttpService.CreateInstance();
     SendMessageCommand = new SendMessageCommand(_webService);
     SendMessageCommand.CanExecuteChanged += (o, e) =>
     {
         IsProgressVisible = !SendMessageCommand.CanExecute(null);
         (Page.ApplicationBar.Buttons[SEND_INDEX] as ApplicationBarIconButton).IsEnabled = !IsProgressVisible;
     };
 }
예제 #45
0
 public Presenter(IView view,IWebService ws)
 {
     this.view = view;
     this.service= ws;
     view.Load += view_Load;
 }
예제 #46
0
 public LogAnalyzer4(IWebService webService, IEmailService emailService)
 {
     this.webService   = webService;
     this.emailService = emailService;
 }
 public UploadImageCommand(IWebService service, Action<string> callback)
 {
     _service = service;
     _callback = callback;
     CanExecuteIt = true;
 }
 public LoadMainPageCommand(IWebService client, Action<ZumpaReader.WebService.WebService.ContextResult<ZumpaItemsResult>> resultCallback) : base(client)
 {
     _callback = resultCallback;            
 }
예제 #49
0
 //3. 使用EmailInfo后形参需要使用IEmailServiceUseEmailInfo来定义了
 public LogAnalyzerAllUseEmailInfo(IWebService service, IEmailServiceUseEmailInfo email)
 {
     Email   = email;
     Service = service;
 }
예제 #50
0
 public LogAnalyzer(IWebService service)
 {
     this.service = service;
 }
 public void Save(IWebService model) => UpdateManagerProxy.SaveWebservice(model, GlobalConstants.ServerWorkspaceID);
예제 #52
0
 public void notUsedRightNow()
 {
     service = new SyncronousEditorWebRequest();
 }
예제 #53
0
        public LoginViewModel(IDialog dialog, IPasswordMediator mediator, IMessenger messenger, IShellService shell, IStorage storage, IWebService web)
        {
            _dialog    = dialog;
            _messenger = messenger;
            _shell     = shell;
            _storage   = storage;
            _web       = web;

            _mediator = mediator;

            _loginCommand          = new DelegateCommand(OnLogin);
            _forgetPasswordCommand = new DelegateCommand(OnForgetPassword);
            _activeAccountCommand  = new DelegateCommand(OnActiveAccount);
            _signupCommand         = new DelegateCommand(OnSignup);
        }
예제 #54
0
 public LoginManager2(ILogger logger, IWebService service)
 {
     this.service = service;
     log = logger;
 }
예제 #55
0
 public LoginManager1(ILogger logger, IWebService webservice)
 {
     Logger     = logger;
     WebService = webservice;
 }
예제 #56
0
 public LogAnalyzer3(ILogger logger,IWebService webService)
 {
     _logger = logger;
     _webService = webService;
 }
예제 #57
0
 public LogAnalyzer3(ILogger logger, IWebService webService)
 {
     _logger     = logger;
     _webService = webService;
 }
 public LoginManagerWithMockAndStub(ILogger logger,IWebService service)
 {
     this.service = service;
     log = logger;
 }
예제 #59
0
 public RestaurantRepository(IWebService webService)
     : base(webService, "Restaurant")
 {
 }
 public SwitchFavoriteThreadCommand(IWebService service) : this(service, null) { }