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);
 }
Beispiel #2
0
        public AboutViewModel(ILauncherService launcherService, IAppService appService)
        {
            this.launcherService = launcherService;
            this.appService      = appService;

            this.CreateCommands();
        }
Beispiel #3
0
        public SettingsViewModel(CognitiveClient cognitiveClient, ILauncherService launcherService)
        {
            this.cognitiveClient = cognitiveClient;
            this.launcherService = launcherService;

            this.CreateCommands();
        }
Beispiel #4
0
 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));
        }
Beispiel #6
0
 public DirectoryWizardPageVM(ILauncherService launcherService, IDirectoryList directoryList)
 {
     _launcherService = launcherService;
     DirectoryList    = directoryList;
     //if (VistaFolderBrowserDialog.IsVistaFolderDialogSupported)
     //{
     //    new VistaFolderBrowserDialog().ShowDialog();
     //}
 }
Beispiel #7
0
        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;
 }
Beispiel #10
0
 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);
 }
Beispiel #11
0
 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);
 }
Beispiel #12
0
 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>();
 }
Beispiel #13
0
 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);
 }
Beispiel #14
0
        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;
        }
Beispiel #15
0
        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;
        }
Beispiel #16
0
        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;
            }
        }
Beispiel #17
0
 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>();
 }
Beispiel #18
0
 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 =>
                {

                });
            });
        }
Beispiel #20
0
 public LauncherController(ILauncherService auncherService)
 {
     _launcherService = auncherService;
 }
Beispiel #21
0
 public AboutViewModel(IStoreService storeService, ILauncherService launcherService)
 {
     _storeService    = storeService;
     _launcherService = launcherService;
 }
Beispiel #22
0
        public PrivacyViewModel(ILauncherService launcherService, IAppService appService)
        {
            this.launcherService = launcherService;

            this.CreateCommands();
        }
 public BookingViewModel(
     ILauncherService launcherService)
 => _launcherService = launcherService;
Beispiel #24
0
 public Worker(ILauncherService launcherSvc, ILogger <Worker> logger)
 {
     this.launcherSvc = launcherSvc;
     this.logger      = logger;
 }
Beispiel #25
0
        public SettingsViewModel(ILauncherService launcherService)
        {
            this.launcherService = launcherService;

            this.CreateCommands();
        }
Beispiel #26
0
 public PrivacyViewModel(ILauncherService launcherService)
 {
     _launcherService = launcherService;
 }
Beispiel #27
0
        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 }));
        }
Beispiel #28
0
        public ToolsUsedViewModel(ILauncherService launcherService)
        {
            _launcherService = launcherService;

            Tools = Tool.GetTools();
        }