标签: application-settings

iPhone settings.bundle 中的数字文本字段

我最近查看了这个 Apple 文档:https : //developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html

我现在可以将 settings.bundle 添加到我的应用程序中并可以使用它。我可以编辑 Root.plist 并且我知道如何在其中使用文本字段,但我希望用户输入的是数值。

默认文本字段允许用户输入任何文本,但我只想从用户那里获取数值。

怎么做?

iphone application-settings

3
推荐指数
1
解决办法
2946
查看次数

应用程序设置中的StringCollection不会被存储

我想使用StringCollection作为应用程序设置,但是在阅读它不是问题时,我发现没有存储设置.

如何使其工作?任何解决方法?这有什么问题?

我正在使用的代码:

    private static void AddToRecentProfiles(string path)
    {
        if (SpellCaster3.Properties.Settings.Default.RecentProfiles == null) 
            SpellCaster3.Properties.Settings.Default.RecentProfiles = new StringCollection();

        int index = SpellCaster3.Properties.Settings.Default.RecentProfiles.IndexOf(path);
        if (index >= 0)
            SpellCaster3.Properties.Settings.Default.RecentProfiles.Swap(index, 0);
        else
            SpellCaster3.Properties.Settings.Default.RecentProfiles.Insert(0, path);

        if (SpellCaster3.Properties.Settings.Default.RecentProfiles.Count > SpellCaster3.Properties.Settings.Default.MaxRecentProfiles)
            SpellCaster3.Properties.Settings.Default.RecentProfiles.RemoveAt(SpellCaster3.Properties.Settings.Default.RecentProfiles.Count - 1);

        SpellCaster3.Properties.Settings.Default.Save();

        OnRecentProfilesChanged(SpellCaster3.Properties.Settings.Default.RecentProfiles, EventArgs.Empty);
    }
Run Code Online (Sandbox Code Playgroud)

c# string collections application-settings

3
推荐指数
1
解决办法
5286
查看次数

保存设置的最佳做法?

我目前正在开发一个项目,其中应该保存许多选项.

  • 通常如何保存选项?
  • 保存/加载设置时的最佳做法是什么?

java application-settings

3
推荐指数
1
解决办法
1811
查看次数

如何订购应用程序设置

每当我的C#项目中需要新的应用程序设置时,我都会通过PROJECT - > Properties - > Settings添加它.目前我的C#项目中有大约20个应用程序设置,但是它们不正常.

为了能够在运行时更改设置,我通过迭代设置创建了一个简单的设置面板.

foreach (System.Configuration.SettingsProperty prop in Properties.Settings.Default.Properties)
{
    Label caption = new Label();
    caption.Text = prop.Name;
    caption.Location = new Point(10, this.Height - 70);
    caption.Size = new Size(100, 13);
    caption.Anchor = AnchorStyles.Left | AnchorStyles.Top;

    TextBox textbox = new TextBox();
    textbox.Name = prop.Name;
    textbox.Text = Properties.Settings.Default[prop.Name].ToString();
    textbox.Location = new Point(120, this.Height - 70);
    textbox.Size = new Size(this.Width - 140, 23);
    textbox.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
    if (prop.IsReadOnly)
        textbox.ReadOnly = true;

    this.Height += …
Run Code Online (Sandbox Code Playgroud)

c# linq application-settings visual-studio-2012

3
推荐指数
1
解决办法
1266
查看次数

在 PyCharm 中使用黑色格式化程序的问题

我正在尝试设置格式化程序“黑色”以使用 PyCharm。我尝试使用标准的外部工具首选项和文件观察器插件进行设置。两者都没有为我工作。

我收到这些错误:

运行控制台中的 PyCharm 错误

我已经安装了它,/Users/Scott/Library/Python/3.8/lib/python/site-packages/black.py并希望它在我保存时为所有 Python 项目文件全局运行。

这是我的偏好的样子:

黑色格式化程序的 PyCharm 外部工具配置

我是 Python 和 PyCharm 以及 Stack Overflow 的新手,并且仍在设置它。我感谢您的帮助。

application-settings ide-customization pycharm python-3.x black-code-formatter

3
推荐指数
1
解决办法
3981
查看次数

Android:无论如何要知道是否检查了"未知来源"?

有没有办法找出用户是否已选中"应用程序设置"菜单中的"未知来源"复选框?

android application-settings

2
推荐指数
1
解决办法
1135
查看次数

代码保存在注册表中的设置

我有一个弹出菜单..每次用户登录系统时,都会出现弹出菜单,但对于不希望弹出窗口显示在屏幕上的用户,我使用复选框以便每次登录时都不会显示弹出窗口.我想如何在注册表中保存选中复选框的用户的设置,以便不显示弹出菜单

delphi registry application-settings

2
推荐指数
1
解决办法
4755
查看次数

如何在Android中启用互联网访问?

我试图创建一个连接到Web服务器和重新数据的应用程序,我想做一些功能

  1. 当我点击我的应用程序时,首先检查是否启用了互联网访问?如果它启用它启动应用程序,否则打开Internet访问设置..之后它重定向到我的应用程序....
  2. 当应用程序连接到Web服务器时,如果连接不成功,连接将在特定时间后超时.

android application-settings

2
推荐指数
1
解决办法
6647
查看次数

从C#应用程序设置文件返回空

我正在尝试使用以下代码:

 String MainDB = ConfigurationManager.AppSettings["MainDB"];
 MessageBox.Show(MainDB);
 String MailInfo = ConfigurationManager.AppSettings["MailInfo"];
 MessageBox.Show(MailInfo);
 String HousingIndexLocation = ConfigurationManager.AppSettings["HousingIndex"];
 MessageBox.Show(HousingIndexLocation);
Run Code Online (Sandbox Code Playgroud)

访问此屏幕生成的值:

在此处输入图片说明

每次返回的值都为null。

在这些设置的实现中我缺少什么?

c# settings null configurationmanager application-settings

2
推荐指数
1
解决办法
2278
查看次数

C#设置中的制表符

我正在尝试将一个制表符添加\t到C#应用程序的设置中(如char).我到目前为止失败了.我也尝试使用其他序列化作为BinaryXML但没有让它工作.

所以我的简单问题是,你能以某种方式将标签字符放入C#中的应用程序/用户设置吗?

更新:

这是.NET 4.5.2

看起来,它的类型string也是错误的.当我从例如notepad ++粘贴选项卡时,它会将一个新行加上一些空格字符放入app.config但没有制表符: 在此输入图像描述

.net c# application-settings

2
推荐指数
1
解决办法
1346
查看次数