• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ApplicationSettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: FlatStrategy

        public FlatStrategy(DateTime pStartDate, Loan pContract, ApplicationSettings pGeneralSettings, OCurrency pInitialOLBOfContractBeforeRescheduling)
        {
            RoundingPoint = pContract.UseCents ? 2 : 0;

            _initialOLBOfContractBeforeRescheduling = pInitialOLBOfContractBeforeRescheduling;
            _contract = pContract;
            GeneralSettings = pGeneralSettings;
        }
开发者ID:Ramazanov,项目名称:FomsNet,代码行数:8,代码来源:FlatStrategy.cs


示例17: GetPreferenceFormattedText

        public static string GetPreferenceFormattedText(this string text, ApplicationSettings applicationSettings, bool pluralize)
        {
            string formattedText = text.Replace('_', ' ');
            formattedText = formattedText.MakeTitleCase();
            formattedText = formattedText.Replace(" ", "");

            return formattedText;
        }
开发者ID:NumericTechnology,项目名称:KPCodeGen.Net,代码行数:8,代码来源:Extensions.cs


示例18: StartWatching

        public void StartWatching(ApplicationSettings settings, IEnumerable<string> folders)
        {
            cleanUpWatchers();

            Console.WriteLine("Listening for file changes at");

            addDirectory(settings.PhysicalPath);
            folders.Each(addDirectory);
        }
开发者ID:jemacom,项目名称:fubumvc,代码行数:9,代码来源:FubuMvcApplicationFileWatcher.cs


示例19: get_the_application_folder_with_a_file_but_no_physical_path

        public void get_the_application_folder_with_a_file_but_no_physical_path()
        {
            var settings = new ApplicationSettings{
                PhysicalPath = null,
                ParentFolder = ".".ToFullPath()
            };

            settings.GetApplicationFolder().ShouldEqual(settings.ParentFolder);
        }
开发者ID:joemcbride,项目名称:fubumvc,代码行数:9,代码来源:ApplicationSettingsTester.cs


示例20: IssueViewModel

        public IssueViewModel(IHub messageHub, ISettings settings, IDialogService dialogService, IJiraService service)
            : base(messageHub)
        {
            _dialogService = dialogService;
            _settings = (ApplicationSettings)settings;
            _service = service;

            LoadIssueComments();
        }
开发者ID:iinteractive,项目名称:jira-win8-client,代码行数:9,代码来源:IssueViewModel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ApplicationSignInManager类代码示例发布时间:2022-05-24
下一篇:
C# ApplicationRoleManager类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap