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


C# CommonFunctions.LogFlush方法代码示例

本文整理汇总了C#中Chummer.CommonFunctions.LogFlush方法的典型用法代码示例。如果您正苦于以下问题:C# CommonFunctions.LogFlush方法的具体用法?C# CommonFunctions.LogFlush怎么用?C# CommonFunctions.LogFlush使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Chummer.CommonFunctions的用法示例。


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

示例1: frmMain_Load

 private void frmMain_Load(object sender, EventArgs e)
 {
     if (GlobalOptions.Instance.StartupFullscreen)
         this.WindowState = FormWindowState.Maximized;
     if (GlobalOptions.Instance.UseLogging)
     {
         CommonFunctions objFunctions = new CommonFunctions();
         objFunctions.LogFlush();
     }
 }
开发者ID:ltdouthit,项目名称:chummer5a,代码行数:10,代码来源:frmMain.cs

示例2: SaveRegistrySettings

        /// <summary>
        /// Save the global settings to the registry.
        /// </summary>
        private void SaveRegistrySettings()
        {
            // If we're just now enabling logging, flush the log
            if (!GlobalOptions.Instance.UseLogging && chkUseLogging.Checked)
            {
                CommonFunctions objFunctions = new CommonFunctions();
                objFunctions.LogFlush();
            }

            // Set Registry values.
            GlobalOptions.Instance.AutomaticUpdate = chkAutomaticUpdate.Checked;
            GlobalOptions.Instance.LocalisedUpdatesOnly = chkLocalisedUpdatesOnly.Checked;
            GlobalOptions.Instance.UseLogging = chkUseLogging.Checked;
            GlobalOptions.Instance.Language = cboLanguage.SelectedValue.ToString();
            GlobalOptions.Instance.StartupFullscreen = chkStartupFullscreen.Checked;
            GlobalOptions.Instance.SingleDiceRoller = chkSingleDiceRoller.Checked;
            GlobalOptions.Instance.DefaultCharacterSheet = cboXSLT.SelectedValue.ToString();
            GlobalOptions.Instance.DatesIncludeTime = chkDatesIncludeTime.Checked;
            GlobalOptions.Instance.PrintToFileFirst = chkPrintToFileFirst.Checked;
            GlobalOptions.Instance.PDFAppPath = txtPDFAppPath.Text;
            Microsoft.Win32.RegistryKey objRegistry = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\\Chummer5");
            objRegistry.SetValue("autoupdate", chkAutomaticUpdate.Checked.ToString());
            objRegistry.SetValue("localisedupdatesonly", chkLocalisedUpdatesOnly.Checked.ToString());
            objRegistry.SetValue("uselogging", chkUseLogging.Checked.ToString());
            objRegistry.SetValue("language", cboLanguage.SelectedValue.ToString());
            objRegistry.SetValue("startupfullscreen", chkStartupFullscreen.Checked.ToString());
            objRegistry.SetValue("singlediceroller", chkSingleDiceRoller.Checked.ToString());
            objRegistry.SetValue("defaultsheet", cboXSLT.SelectedValue.ToString());
            objRegistry.SetValue("datesincludetime", chkDatesIncludeTime.Checked.ToString());
            objRegistry.SetValue("printtofilefirst", chkPrintToFileFirst.Checked.ToString());

            objRegistry.SetValue("pdfapppath", txtPDFAppPath.Text);

            // Save the SourcebookInfo.
            Microsoft.Win32.RegistryKey objSourceRegistry = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\\Chummer5\\Sourcebook");
            foreach (SourcebookInfo objSource in GlobalOptions.Instance.SourcebookInfo)
                objSourceRegistry.SetValue(objSource.Code, objSource.Path + "|" + objSource.Offset.ToString());
        }
开发者ID:kingcortez905,项目名称:chummer5,代码行数:41,代码来源:frmOptions.cs


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