public FeedsController(IMessageService messageService, INavigationService navigationService, ISyndicationService syndicationService, INetworkInfoService networkInfoService, ILauncherService launcherService, ShellViewModel shellViewModel, Lazy <AddEditFeedViewModel> addEditFeedViewModel, Lazy <FeedViewModel> feedViewModel, Lazy <FeedItemViewModel> feedItemViewModel) { this.messageService = messageService; this.navigationService = navigationService; this.syndicationService = syndicationService; this.networkInfoService = networkInfoService; this.launcherService = launcherService; this.shellViewModel = shellViewModel; this.addEditFeedViewModel = new Lazy <AddEditFeedViewModel>(() => InitializeViewModel(addEditFeedViewModel.Value)); this.feedViewModel = new Lazy <FeedViewModel>(() => InitializeViewModel(feedViewModel.Value)); this.feedItemViewModel = new Lazy <FeedItemViewModel>(() => InitializeViewModel(feedItemViewModel.Value)); addFeedCommand = new AsyncDelegateCommand(AddFeed); addEditLoadFeedCommand = new AsyncDelegateCommand(AddEditLoadFeed); addUpdateFeedCommand = new AsyncDelegateCommand(AddUpdateFeed, CanAddUpdateFeed); showFeedViewCommand = new AsyncDelegateCommand(ShowFeedView); editFeedCommand = new AsyncDelegateCommand(EditFeed); moveFeedUpCommand = new DelegateCommand(MoveFeedUp, CanMoveFeedUp); moveFeedDownCommand = new DelegateCommand(MoveFeedDown, CanMoveFeedDown); removeFeedCommand = new AsyncDelegateCommand(RemoveFeed); refreshFeedCommand = new AsyncDelegateCommand(RefreshFeed); readUnreadCommand = new DelegateCommand(MarkAsReadUnread); showFeedItemViewCommand = new AsyncDelegateCommand(ShowFeedItemView); launchBrowserCommand = new AsyncDelegateCommand(LaunchBrowser, CanLaunchBrowser); }
public AboutViewModel(ILauncherService launcherService, IAppService appService) { this.launcherService = launcherService; this.appService = appService; this.CreateCommands(); }
public SettingsViewModel(CognitiveClient cognitiveClient, ILauncherService launcherService) { this.cognitiveClient = cognitiveClient; this.launcherService = launcherService; this.CreateCommands(); }
public AboutViewModel(INavigationService navigationService, ILauncherService launcherService, IEmailComposeService emailCompose, ReviewService reviewService) { _navigationService = navigationService; _launcherService = launcherService; _emailCompose = emailCompose; _reviewService = reviewService; _version = Package.Current.Id.Version; }
public ActivityDetailViewModel(INavigationService navigationService, IStravaService stravaService, ILauncherService launcherService) : base(navigationService) { _stravaService = stravaService; _launcherService = launcherService; MessengerInstance.Register <ActivitySummaryMessage>(this, async item => await LoadActivityDetails(item.ActivitySummary.Id.ToString())); MessengerInstance.Register <ActivitySummaryCommentMessage>(this, async item => await OnCommentAsync(item.ActivitySummary as ActivityMeta)); }
public DirectoryWizardPageVM(ILauncherService launcherService, IDirectoryList directoryList) { _launcherService = launcherService; DirectoryList = directoryList; //if (VistaFolderBrowserDialog.IsVistaFolderDialogSupported) //{ // new VistaFolderBrowserDialog().ShowDialog(); //} }
public MainViewModel(CognitiveClient cognitiveClient, IStreamingService streamingService, ISpeechService speechService, ILauncherService launcherService) { this.cognitiveClient = cognitiveClient; this.streamingService = streamingService; this.speechService = speechService; this.launcherService = launcherService; this.CreateCommands(); }
/// <summary> /// Creates an AboutViewModel Object /// </summary> /// <param name="appInformation">Instance of a <see cref="IAppInformation" /> implementation.</param> /// <param name="emailComposeService">Instance of a <see cref="IEmailComposeService" /> implementation.</param> /// <param name="launcherService">Instance of a <see cref="ILauncherService" /> implementation.</param> /// <param name="storeService">Instance of a <see cref="IStoreService" /> implementation.</param> public AboutViewModel(IAppInformation appInformation, IEmailComposeService emailComposeService, ILauncherService launcherService, IStoreService storeService) { this.appInformation = appInformation; this.emailComposeService = emailComposeService; this.launcherService = launcherService; this.storeService = storeService; }
/// <summary> /// Creates an AboutViewModel Object /// </summary> /// <param name="appInformation">Instance of a <see cref="IAppInformation" /> implementation.</param> /// <param name="emailComposeService">Instance of a <see cref="IEmailComposeService" /> implementation.</param> /// <param name="launcherService">Instance of a <see cref="ILauncherService" /> implementation.</param> /// <param name="storeService">Instance of a <see cref="IStoreService" /> implementation.</param> public AboutViewModel(IAppInformation appInformation, IEmailComposeService emailComposeService, ILauncherService launcherService, IStoreService storeService) { this.appInformation = appInformation; this.emailComposeService = emailComposeService; this.launcherService = launcherService; this.storeService = storeService; }
public SettingsController(ILauncherService launcherService, IAppInfoService appInfoService, IAppDataService appDataService, Lazy<SettingsLayoutViewModel> settingsLayoutViewModel, Lazy<GeneralSettingsViewModel> generalSettingsViewModel, Lazy<InfoSettingsViewModel> infoSettingsViewModel) { this.launcherService = launcherService; this.appInfoService = appInfoService; this.appDataService = appDataService; this.settingsLayoutViewModel = new Lazy<SettingsLayoutViewModel>(() => InitializeSettingsLayoutViewModel(settingsLayoutViewModel)); this.generalSettingsViewModel = new Lazy<GeneralSettingsViewModel>(() => InitializeGeneralSettingsViewModel(generalSettingsViewModel)); this.infoSettingsViewModel = new Lazy<InfoSettingsViewModel>(() => InitializeInfoSettingsViewModel(infoSettingsViewModel)); this.launchWindowsStoreCommand = new AsyncDelegateCommand(LaunchWindowsStore); }
public SettingsController(ILauncherService launcherService, IAppInfoService appInfoService, IAppDataService appDataService, Lazy <SettingsLayoutViewModel> settingsLayoutViewModel, Lazy <GeneralSettingsViewModel> generalSettingsViewModel, Lazy <InfoSettingsViewModel> infoSettingsViewModel) { this.launcherService = launcherService; this.appInfoService = appInfoService; this.appDataService = appDataService; this.settingsLayoutViewModel = new Lazy <SettingsLayoutViewModel>(() => InitializeSettingsLayoutViewModel(settingsLayoutViewModel)); this.generalSettingsViewModel = new Lazy <GeneralSettingsViewModel>(() => InitializeGeneralSettingsViewModel(generalSettingsViewModel)); this.infoSettingsViewModel = new Lazy <InfoSettingsViewModel>(() => InitializeInfoSettingsViewModel(infoSettingsViewModel)); this.launchWindowsStoreCommand = new AsyncDelegateCommand(LaunchWindowsStore); }
public GroupViewModel(IGraphService graphService, IConfigService configService, ILauncherService launcherService, IFilePickerService filePickerService) { _graphService = graphService; _configService = configService; _launcherService = launcherService; _filePickerService = filePickerService; Files = new ObservableCollection <FileModel>(); Conversations = new ObservableCollection <ConversationModel>(); Tasks = new ObservableCollection <TaskModel>(); }
public ClientAppService(IClientDialogService dialogService, ISettingsViewModel settingsViewModel, IRepository repository, IConnectViewModel connectViewModel, ILauncherService launcherService, IPaymentsCalculationViewModel paymentsCalculationViewModel) { SetState(ClientState.Initializing); _dialogService = dialogService; _settingsViewModel = settingsViewModel; _repository = repository; _connectViewModel = connectViewModel; _launcherService = launcherService; _paymentsCalculationViewModel = paymentsCalculationViewModel; _connectViewModel.InjectAppServiceAndInit(this); ClaimItems = new ObservableCollection <ClaimItemViewModel>(); _isClient = _repository.GetSettingValue <bool>(Settings.IsClient); }
public NewsFeedsController(IResourceService resourceService, IAppService appService, ILauncherService launcherService, IMessageService messageService, ISyndicationService syndicationService, SelectionService selectionService, Lazy<FeedListViewModel> feedListViewModel) { this.resourceService = resourceService; this.appService = appService; this.launcherService = launcherService; this.messageService = messageService; this.selectionService = selectionService; this.feedListViewModel = feedListViewModel; this.client = syndicationService.CreateClient(); this.addNewFeedCommand = new AsyncDelegateCommand(AddNewFeed); this.removeFeedCommand = new AsyncDelegateCommand(RemoveFeedAsync, CanRemoveFeed); this.refreshFeedCommand = new AsyncDelegateCommand(RefreshFeed, CanRefreshFeed); this.readUnreadCommand = new DelegateCommand(MarkAsReadUnread, CanMarkAsReadUnread); this.launchWebBrowserCommand = new AsyncDelegateCommand(LaunchWebBrowser, CanLaunchWebBrowser); this.selectionService.PropertyChanged += SelectionServicePropertyChanged; }
public NewsFeedsController(IResourceService resourceService, IAppService appService, ILauncherService launcherService, IMessageService messageService, ISyndicationService syndicationService, SelectionService selectionService, Lazy <FeedListViewModel> feedListViewModel) { this.resourceService = resourceService; this.appService = appService; this.launcherService = launcherService; this.messageService = messageService; this.selectionService = selectionService; this.feedListViewModel = feedListViewModel; this.client = syndicationService.CreateClient(); this.addNewFeedCommand = new AsyncDelegateCommand(AddNewFeed); this.removeFeedCommand = new AsyncDelegateCommand(RemoveFeedAsync, CanRemoveFeed); this.refreshFeedCommand = new AsyncDelegateCommand(RefreshFeed, CanRefreshFeed); this.readUnreadCommand = new DelegateCommand(MarkAsReadUnread, CanMarkAsReadUnread); this.launchWebBrowserCommand = new AsyncDelegateCommand(LaunchWebBrowser, CanLaunchWebBrowser); this.selectionService.PropertyChanged += SelectionServicePropertyChanged; }
public void Launch(int[] invIds, string pattern, string Serial, out string Messages) { Company currentCom = ((EInvoiceContext)FXContext.Current).CurrentCompany; IInvoiceService IInvSrv = InvServiceFactory.GetService(pattern, currentCom.id); Messages = ""; if (!LockTable.Contains(String.Format("{0}${1}", pattern, currentCom.id))) { object lockobj = new object(); LockTable.Add(String.Format("{0}${1}", pattern, currentCom.id), lockobj); } lock (LockTable[String.Format("{0}${1}", pattern, currentCom.id)]) { IList <IInvoice> lst = IInvSrv.GetByID(currentCom.id, invIds).OrderBy(p => p.ArisingDate).ToList(); ILauncherService _launcher = IoC.Resolve(Type.GetType(currentCom.Config["LauncherType"])) as ILauncherService; _launcher.PublishInv(pattern, Serial, lst.ToArray(), HttpContext.Current.User.Identity.Name); Messages = _launcher.Message; } }
public AppController(ILauncherService launcherService, IAppInfoService appInfoService, IAppDataService appDataService, SelectionService selectionService, Lazy <NewsFeedsController> newsFeedsController, Lazy <SettingsController> settingsController, Lazy <ShellViewModel> shellViewModel, Lazy <FeedListViewModel> feedListViewModel, Lazy <FeedItemListViewModel> feedItemListViewModel, Lazy <FeedItemViewModel> feedItemViewModel) { this.launcherService = launcherService; this.appInfoService = appInfoService; this.appDataService = appDataService; this.selectionService = selectionService; this.newsFeedsController = newsFeedsController; this.settingsController = settingsController; this.shellViewModel = shellViewModel; this.feedListViewModel = new Lazy <FeedListViewModel>(() => InitializeFeedListViewModel(feedListViewModel)); this.feedItemListViewModel = new Lazy <FeedItemListViewModel>(() => InitializeFeedItemListViewModel(feedItemListViewModel)); this.feedItemViewModel = new Lazy <FeedItemViewModel>(() => InitializeFeedItemViewModel(feedItemViewModel)); this.navigateBackCommand = new DelegateCommand(NavigateBack, CanNavigateBack); this.showFeedListViewCommand = new DelegateCommand(() => SelectedNavigationItem = NavigationItem.FeedList); this.showFeedItemListViewCommand = new DelegateCommand(ShowFeedItemListView); this.showFeedItemViewCommand = new DelegateCommand(ShowFeedItemView); this.showReviewViewCommand = new AsyncDelegateCommand(ShowReviewView); this.showSettingsViewCommand = new DelegateCommand(ShowSettingsView); this.navigationStack = new Stack <NavigationItem>(); }
public AppController(ILauncherService launcherService, IAppInfoService appInfoService, SelectionService selectionService, Lazy<DataController> dataController, Lazy<AccountController> accountController, Lazy<NewsFeedsController> newsFeedsController, Lazy<SettingsController> settingsController, Lazy<ShellViewModel> shellViewModel, Lazy<FeedListViewModel> feedListViewModel, Lazy<FeedItemListViewModel> feedItemListViewModel, Lazy<FeedItemViewModel> feedItemViewModel) { this.launcherService = launcherService; this.appInfoService = appInfoService; this.selectionService = selectionService; this.dataController = dataController; this.accountController = accountController; this.newsFeedsController = newsFeedsController; this.settingsController = settingsController; this.shellViewModel = shellViewModel; this.feedListViewModel = new Lazy<FeedListViewModel>(() => InitializeFeedListViewModel(feedListViewModel)); this.feedItemListViewModel = new Lazy<FeedItemListViewModel>(() => InitializeFeedItemListViewModel(feedItemListViewModel)); this.feedItemViewModel = new Lazy<FeedItemViewModel>(() => InitializeFeedItemViewModel(feedItemViewModel)); this.navigateBackCommand = new DelegateCommand(NavigateBack, CanNavigateBack); this.showFeedListViewCommand = new DelegateCommand(() => SelectedNavigationItem = NavigationItem.FeedList); this.showFeedItemListViewCommand = new DelegateCommand(ShowFeedItemListView); this.showFeedItemViewCommand = new DelegateCommand(ShowFeedItemView); this.showReviewViewCommand = new AsyncDelegateCommand(ShowReviewView); this.showSettingsViewCommand = new DelegateCommand(ShowSettingsView); this.navigationStack = new Stack<NavigationItem>(); }
public StartupPageVM(IRecentMasterFileList masterFileList, ILauncherService launcherService) { MasterFileList = masterFileList; _launcherService = launcherService; this.WhenActivated(disposables => { OpenDirectoryWizard = ReactiveCommand .Create(() => { HostScreen.Router.Navigate.Execute( Locator.Current.GetService<IDirectoryWizardPage>()); }) .DisposeWith(disposables); OpenDirectoryWizard.ThrownExceptions.Subscribe(err => { }); HostScreen.Router.Navigate.ThrownExceptions.Subscribe(err => { }); }); }
public LauncherController(ILauncherService auncherService) { _launcherService = auncherService; }
public AboutViewModel(IStoreService storeService, ILauncherService launcherService) { _storeService = storeService; _launcherService = launcherService; }
public PrivacyViewModel(ILauncherService launcherService, IAppService appService) { this.launcherService = launcherService; this.CreateCommands(); }
public BookingViewModel( ILauncherService launcherService) => _launcherService = launcherService;
public Worker(ILauncherService launcherSvc, ILogger <Worker> logger) { this.launcherSvc = launcherSvc; this.logger = logger; }
public SettingsViewModel(ILauncherService launcherService) { this.launcherService = launcherService; this.CreateCommands(); }
public PrivacyViewModel(ILauncherService launcherService) { _launcherService = launcherService; }
public ActionResult CreateAdJustInv(string NewPattern, string NewSerial, string Pattern, string PubDatasource, string NoInv, string SerialNo, string type, HttpPostedFileBase FileUpload) { ICompanyService _comSrv = IoC.Resolve <ICompanyService>(); Company currentCom = _comSrv.Getbykey(((EInvoiceContext)FXContext.Current).CurrentCompany.id); ICustomerService _CusSvc = IoC.Resolve <ICustomerService>(); InvoiceBase model = (InvoiceBase)InvServiceFactory.NewInstance(NewPattern, currentCom.id); TryUpdateModelFromType(model.GetType(), model); model.Pattern = NewPattern; model.Serial = NewSerial; model.ComID = currentCom.id; IInvoiceService IInvSrv = InvServiceFactory.GetService(Pattern, currentCom.id); IInvoice inv = IInvSrv.GetByNo(currentCom.id, Pattern, SerialNo, Convert.ToDecimal(NoInv)); IList <ProductInv> lst = (IList <ProductInv>)PubDatasource.DeserializeJSON <ProductInv>(typeof(IList <ProductInv>)); if (lst.Count() == 0) { Messages.AddErrorFlashMessage(Resources.Message.MRequestProd); return(RedirectToAction("CreateAdJustInv", new { Pattern = Pattern, Serial = SerialNo, invNo = NoInv })); } try { var Typecus = (from c in _CusSvc.Query where c.Code == model.CusCode && c.CusType == 1 && c.ComID == currentCom.id select c.CusType).SingleOrDefault(); if (Typecus == 0) { model.CusSignStatus = cusSignStatus.NocusSignStatus; } else { model.CusSignStatus = cusSignStatus.NoSignStatus; } if ((inv.Status == InvoiceStatus.SignedInv || inv.Status == InvoiceStatus.InUseInv || inv.Status == InvoiceStatus.AdjustedInv))// =1 hoa don dieu chinh { if (lst != null && lst.Count > 0) { model.Products = (from pr in lst select pr as IProductInv).ToList(); } string xmldata = string.Empty; string message = string.Empty; string resultLauncher = string.Empty; model.Fkey = ""; model.id = 0; model.Type = (InvoiceType)Convert.ToInt32(type); //save file and get path string strPath = ""; if (FileUpload != null) { string fileext = (Path.GetExtension(FileUpload.FileName).Length > 1) ? Path.GetExtension(FileUpload.FileName).Substring(1) : ""; if (fileext.ToLower() == "docx" || fileext.ToLower() == "pdf" || fileext.ToLower() == "doc") { strPath = @"\RecordsInv\" + currentCom.id + @"\" + Pattern.Replace("/", "") + @"\" + SerialNo.Replace("/", "") + "_" + NoInv + "." + fileext; string strFullPath = GetFullPathRecordsCancel(strPath); FileUpload.SaveAs(strFullPath); } } ILauncherService _launcher = IoC.Resolve(Type.GetType(currentCom.Config["LauncherType"])) as ILauncherService; _launcher.PublishAdjust(inv, lst, model, strPath); resultLauncher = _launcher.Message; if (resultLauncher.Contains("OK:")) { Messages.AddFlashMessage("Điều chỉnh hóa đơn thành công."); } else { Messages.AddErrorFlashMessage(StringErrorService(resultLauncher)); } } } catch (Exception ex) { Messages.AddErrorFlashMessage("Có lỗi xảy ra, vui lòng thực hiện lại."); log.Error(" CreateAdJustInv -: " + ex); } return(RedirectToAction("AdjustInvIndex", new { pattern = Pattern, Serial = SerialNo })); }
public ToolsUsedViewModel(ILauncherService launcherService) { _launcherService = launcherService; Tools = Tool.GetTools(); }