当前位置: 首页>>代码示例>>C#>>正文


C# ApplicationSettings类代码示例

本文整理汇总了C#中ApplicationSettings的典型用法代码示例。如果您正苦于以下问题:C# ApplicationSettings类的具体用法?C# ApplicationSettings怎么用?C# ApplicationSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ApplicationSettings类属于命名空间,在下文中一共展示了ApplicationSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CalculateAnticipatedFeesStrategy

 public CalculateAnticipatedFeesStrategy(CreditContractOptions pCCO,Loan pContract, ApplicationSettings pGeneralSettings)
 {
     if(pCCO.CancelFees || pCCO.KeepExpectedInstallments)
         _cFfar = new AnticipatedFeesNotCalculate();
     else
         _cFfar = new AnticipatedFeesCalculate(pCCO,pContract);
 }
开发者ID:Ramazanov,项目名称:FomsNet,代码行数:7,代码来源:CalculateAnticipatedFeesStrategy.cs

示例2: PreferencesViewModel

 public PreferencesViewModel(ApplicationSettings settings)
 {
     _settings = settings;
     ImageResultSize = _settings.ImageResultSize;
     Rating = _settings.Rating;
     ResetHistoryCommand = new AsyncDelegateCommand(ResetHistory);
 }
开发者ID:schmidp,项目名称:GettingStartedWithMetroApps,代码行数:7,代码来源:PreferencesViewModel.cs

示例3: DecliningKeepNotExpectedInstallments

 public DecliningKeepNotExpectedInstallments(Loan contract, User pUser, ApplicationSettings pGeneralSettings)
 {
     _user = pUser;
     _generalSettings = pGeneralSettings;
     _contract = contract;
     _paidInstallments = new List<Installment>();
 }
开发者ID:Ramazanov,项目名称:FomsNet,代码行数:7,代码来源:DecliningKeepNotExpectedInstallments.cs

示例4: SearchResultsPageViewModel

        public SearchResultsPageViewModel(ApplicationSettings settings, INavigationService navigationService, IImageSearchService imageSearchService, IHub hub, IAccelerometer accelerometer, IStatusService statusService, IShareDataRequestedPump shareMessagePump)
        {
            _settings = settings;
            _navigationService = navigationService;
            _imageSearchService = imageSearchService;
            _hub = hub;
            _accelerometer = accelerometer;
            _statusService = statusService;

            HomeCommand = _navigationService.GoBackCommand;
            ViewDetailsCommand = new DelegateCommand(ViewDetails, () => SelectedImage != null);
            LoadMoreCommand = new AsyncDelegateCommand(LoadMore);
            ThumbnailViewCommand = new DelegateCommand(ThumbnailView);
            ListViewCommand = new DelegateCommand(ListView);
            SplitViewCommand = new DelegateCommand(SplitView);
            SettingsCommand = new DelegateCommand(Settings);

            AddImages(_settings.SelectedInstance.Images);
            shareMessagePump.DataToShare = _settings.SelectedInstance.QueryLink;
            _statusService.Title = _settings.SelectedInstance.Query;
            _accelerometer.Shaken += accelerometer_Shaken;
            _navigationService.Navigating += NavigatingFrom;

            UpdateCurrentView(CurrentView);
            _hub.Send(new UpdateTileImageCollectionMessage(_settings.SelectedInstance));
        }
开发者ID:schmidp,项目名称:GettingStartedWithMetroApps,代码行数:26,代码来源:SearchResultsPageViewModel.cs

示例5: BallerburgGame

        /// <summary>
        /// Initializes a new instance of the BallerburgGame class
        /// </summary>
        public BallerburgGame()
        {
            Instance = this;
              gameSettings = new GameSettings();
              playerSettings = new PlayerSettings[4];

              applicationSettings = new ApplicationSettings();

              graphics = new GraphicsDeviceManager(this)
                     {
                       PreferredBackBufferWidth = 640,
                       PreferredBackBufferHeight = 480
                     };

              graphicsManager = new BallerburgGraphicsManager();
              contentManager = new ContentManager();
              shaderManager = new ShaderManager();
              audioManager = new AudioManager(applicationSettings, contentManager);
              gameObjectManager = new GameObjectManager(contentManager, this.audioManager, this.graphicsManager);

              MousePointer = new MousePointer(this)
                         {
                           DrawOrder = 1000,
                           RestrictZone = new Rectangle(0, 0, 640, 480)
                         };
              Components.Add(MousePointer);

              // Create the screen manager component.
              screenManager = new ScreenManager(graphicsManager, contentManager, gameObjectManager, applicationSettings, gameSettings, shaderManager, audioManager, playerSettings)
                          {
                            GameMousePointer = MousePointer
                          };
        }
开发者ID:urmuelle,项目名称:MonoGameBallerburg,代码行数:36,代码来源:BallerburgGame.cs

示例6: Main

        public static void Main()
        {
            var applicationSettings = new ApplicationSettings();

            // Use topshelf for installing and activating the Windows service
            // http://topshelf-project.com/
            HostFactory.Run(x =>
            {
                x.Service<MailSenderService>(s =>
                {
                    s.ConstructUsing(name => new MailSenderService());
                    s.WhenStarted(tc => tc.Start());
                    s.WhenStopped(tc => tc.Stop());
                });

                // http://4sysops.com/archives/service-account-best-practices-part-1-choosing-a-service-account/
                x.RunAsLocalSystem();

                x.SetServiceName(applicationSettings.WindowsServiceMailSenderName);
                x.SetDisplayName(applicationSettings.WindowsServiceMailSenderName);
                x.SetDescription("Service for sending email");

                x.EnableServiceRecovery(rc => rc.RestartService(1));
            });
        }
开发者ID:robinvanderknaap,项目名称:SkaeleArchitecture,代码行数:25,代码来源:Program.cs

示例7: CreateDatabaseSchemaAndDemoData

        private static void CreateDatabaseSchemaAndDemoData()
        {
            CreateDatabaseSchema();

            var session = NHibernateHelper.SessionFactory.OpenSession();
            var passwordPolicy = new RegularExpressionPasswordPolicy(".{5,}$");
            var translationsRepository = new TranslationRepository(session, new InMemoryKeyValueCache());
            var applicationSettings = new ApplicationSettings();
            var encryptor = new DefaultEncryptor();

            var userRepository = new UserRepository(session, passwordPolicy, applicationSettings, encryptor);

            // Create administrators
            PocoGenerator.CreateAdministrators(userRepository);

            // Create users
            PocoGenerator.CreateUsers(100, userRepository);

            session.Transaction.Begin();

            // Create translations
            PocoGenerator.CreateTranslations(translationsRepository);

            session.Transaction.Commit();

            // Create logitems
            PocoGenerator.CreateLogItems(new NLogLogger(applicationSettings, "Console.Admin"));
        }
开发者ID:robinvanderknaap,项目名称:SkaeleArchitecture,代码行数:28,代码来源:Program.cs

示例8: ConfigureSettings

 protected override void ConfigureSettings(ApplicationSettings settings)
 {
     base.ConfigureSettings(settings);
     #if DEBUG
     settings.IsSingleProcess = true;
     #endif
 }
开发者ID:kaagati,项目名称:spectre,代码行数:7,代码来源:WinformsBootstrapper.cs

示例9: StartApplication

        public ApplicationStartResponse StartApplication(ApplicationSettings settings, ManualResetEvent reset)
        {
            var response = new ApplicationStartResponse();

            try
            {
                var source = _sourceFinder.FindSource(settings, response);
                if (source == null)
                {
                    response.Status = ApplicationStartStatus.CouldNotResolveApplicationSource;
                }
                else
                {
                    StartApplication(source, settings, reset);
                    response.ApplicationSourceName = source.GetType().AssemblyQualifiedName;

                    reset.WaitOne();
                    determineBottleFolders(response);
                }
            }
            catch (Exception ex)
            {
                response.ErrorMessage = ex.ToString();
                response.Status = ApplicationStartStatus.ApplicationSourceFailure;
            }

            return response;
        }
开发者ID:jemacom,项目名称:fubumvc,代码行数:28,代码来源:ApplicationRunner.cs

示例10: GetReportNumber

 static private int GetReportNumber(ApplicationSettings applicationSettings, string fileName)
 {
     int dataIndex = 0, refIndex = 0;
     for (; ; )
     {
         char token;
         int refStart = refIndex;
         if (!GetNextToken(applicationSettings, ref refIndex, out token))
             break;
         int length = refIndex - refStart;
         if (token == 'n' || token == 't')
             length -= 2;
         else
             length -= 1;
         dataIndex += length;
         if (token == 'n' || token == 't')
         {
             int dataStart = dataIndex;
             while (dataIndex < fileName.Length && char.IsDigit(fileName[dataIndex]))
                 ++dataIndex;
             if (token == 'n')
             {
                 int dataLength = dataIndex - dataStart;
                 if (dataLength > 0)
                     return int.Parse(fileName.Substring(dataStart, dataLength));
             }
         }
     }
     return -1;
 }
开发者ID:jinby,项目名称:BugTrap,代码行数:30,代码来源:Global.asax.cs

示例11: CalculateInstallmentsStrategy

        public CalculateInstallmentsStrategy(CalculateInstallmentsOptions pCio, int pStartInstallment, OCurrency pStartAmount, int pNumberOfInstallments, ApplicationSettings pGeneralSettings)
        {
            _generalSettings = pGeneralSettings;
            OCurrency initialOLBOfContractBeforeRescheduling = Loan.InitialOlbOfContractBeforeRescheduling;

            if (pCio.IsExotic)
            {
                if (pCio.LoanType == OLoanTypes.Flat)
                    _iCi = new Flat.ExoticStrategy(pCio.StartDate, pCio.Contract, _generalSettings);
                else
                    _iCi = new Declining.ExoticStrategy(pCio.StartDate, pCio.Contract, _generalSettings);
            }
            else
            {
                if (pCio.LoanType == OLoanTypes.Flat)
                    _iCi = new FlatStrategy(pCio.StartDate, pCio.Contract, _generalSettings, initialOLBOfContractBeforeRescheduling);
                else if (pCio.LoanType == OLoanTypes.DecliningFixedInstallments)
                {
                    if (pCio.Contract.InterestRate == 0)
                        _iCi = new FlatStrategy(pCio.StartDate, pCio.Contract, _generalSettings, initialOLBOfContractBeforeRescheduling);
                    else
                        _iCi = new FixedInstallmentStrategy(pCio.StartDate, pCio.Contract, pStartInstallment, pStartAmount, pNumberOfInstallments, _generalSettings);
                }
                else
                {
                    if (pCio.Contract.InterestRate == 0)
                        _iCi = new FlatStrategy(pCio.StartDate, pCio.Contract, _generalSettings, initialOLBOfContractBeforeRescheduling);
                    else
                        _iCi = new FixedPrincipalStrategy(pCio.StartDate, pCio.Contract, _generalSettings);
                }
            }
        }
开发者ID:Ramazanov,项目名称:FomsNet,代码行数:32,代码来源:CalculateInstallmentsStrategy.cs

示例12: SavingDeposit

 public SavingDeposit(ApplicationSettings pApplicationSettings, ChartOfAccounts pChartOfAccounts, User pUser)
 {
     _events = new List<SavingEvent>();
     _chartOfAccounts = _FillChartOfAccounts(pChartOfAccounts);
     _applicationSettings = pApplicationSettings;
     _user = pUser;
 }
开发者ID:Ramazanov,项目名称:FomsNet,代码行数:7,代码来源:SavingDeposit.cs

示例13: listens_and_finishes_after_receiving_the_all_clear

        public void listens_and_finishes_after_receiving_the_all_clear()
        {
            // trying to get the asset pipeline to shut up about
            // non-existent assets
            var settings = new ApplicationSettings
            {
                PhysicalPath = Environment.CurrentDirectory
                    .ParentDirectory().ParentDirectory().ParentDirectory()
                    .AppendPath("RemoteService")
            };

            var system = new FubuMvcSystem(settings, () => FubuApplication.DefaultPolicies().StructureMap().Bootstrap());

            system.AddRemoteSubSystem("Remote", x => {
                x.UseParallelServiceDirectory("RemoteService");
            });

            using (var context = system.CreateContext())
            {
                system.StartListeningForMessages();
                var message = new RemoteGo();
                MessageHistory.Record(MessageTrack.ForSent(message));

                var waitForWorkToFinish = MessageHistory.WaitForWorkToFinish(() => {
                    system.RemoteSubSystemFor("Remote").Runner.SendRemotely(message);
                }, timeoutMilliseconds:30000);
                waitForWorkToFinish.ShouldBeTrue();
            }
        }
开发者ID:joemcbride,项目名称:fubumvc,代码行数:29,代码来源:MessageWatching_over_remote_AppDomain_integration_tester.cs

示例14: FileOpenPickerPageViewModel

        public FileOpenPickerPageViewModel(ApplicationSettings settings, IImageSearchService imageSearchService, IFileOpenPickerUiManager fileOpenPicker)
        {
            _settings = settings;
            _imageSearchService = imageSearchService;
            _fileOpenPicker = fileOpenPicker;

            SearchCommand = new AsyncDelegateCommand(Search);
        }
开发者ID:schmidp,项目名称:GettingStartedWithMetroApps,代码行数:8,代码来源:FileOpenPickerPageViewModel.cs

示例15: ConfigureSettings

 protected override void ConfigureSettings(ApplicationSettings settings)
 {
     base.ConfigureSettings (settings);
     #if DEBUG
     settings.IsSingleProcess = true;
     #endif
     settings.LogSeverity = LogSeverity.LogseverityVerbose;
 }
开发者ID:kaagati,项目名称:spectre,代码行数:8,代码来源:GtkBootstrapper.cs


注:本文中的ApplicationSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。