settings

Mono can't save user settings

六眼飞鱼酱① 提交于 2019-12-10 20:03:58
问题 I have problems with saving user settings on Mono (Ubuntu). Here is code sample: private void Form1_Load(object sender, EventArgs e) { string savedText = Properties.Settings.Default.tbText.ToString(); tbInput.Text = savedText; } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { string textToSave = tbInput.Text; Properties.Settings.Default.tbText = textToSave; Properties.Settings.Default.tbText = Properties.Settings.Default.tbText; Properties.Settings.Default.Save(); }

RStudio global settings (options) Export/Import

眉间皱痕 提交于 2019-12-10 18:46:48
问题 I would like to export/import RStudio global options, which can typically found and set in RStudio at Tools> Global Options... Ideally I could run a line of code, saving the existing settings to a file. Then run another line of code to load those settings from this file. These options include settings such as a Dark Theme for the GUI, or Tab Width etc. This has a range of uses but my specific use case is that I spin up virtual environments to utilize cloud computing. Each time I shutdown and

C# Way to serialize List<string> in settings containing any character (Regex/xml)

安稳与你 提交于 2019-12-10 18:46:31
问题 I am looking for a neat/clean way to store a list of strings into a C# settings file. As far as I can work out, you can't store List objects into these settings, so basically it needs to be converted to a string. For example, say I have a list of names: N a m e A Name;B Complex, Weird, Name Name"nickname"Person i.e. I am trying to demonstrate a list of names which can possibly contain any character. Does anyone have any recommendations for a neat format + Regex to read it that can handle any

Bind Drawing.Color from settings with Style in XAML

走远了吗. 提交于 2019-12-10 18:18:16
问题 How to bind Color Bkg (System.Drawing.Color), defined in settings, with Style in XAML? xmlns:props="clr-namespace:App.Properties" <Style TargetType="{x:Type StackPanel}" x:Key="_itemStyle"> <Setter Property="Background" Value="{Binding Path=Bkg, Source={x:Static props:Settings.Default}}"/> Background property is of type System.Windows.Media.Color, so it needs to be somehow converted? 回答1: Panel.Background property is of a System.Windows.Media.Brush type and not System.Windows.Media.Color

Windows 8 Metro Settings Flyouts don't seem to work in Javascript?

感情迁移 提交于 2019-12-10 17:57:12
问题 I've recently been trying to create a metro app for Windows 8 and tried to use settings flyout. So I followed msdn quickstart: http://msdn.microsoft.com/en-us/library/windows/apps/hh780611.aspx However, I can't make it work. Here's the part where I add the settings flyout: function setupSettings() { app.onsettings = function (e) { e.detail.applicationcommands = { 'serv_changer': { title: 'Change Server', href: 'settings.html' } }; WinJS.UI.SettingsFlyout.populateSettings(e); } } The function

Qt4 QSettings save enumeration value (for example Qt::CheckState)

末鹿安然 提交于 2019-12-10 17:45:26
问题 i wanna save state of QCheckBok in QSetting, i can cast its value to int but maybe exists more simple and proper method to do it? here is my code: QSetting setting; Qt::CheckState checkState; //... checkState = (Qt::CheckState)setting.value("checkState", Qt::Unchecked).toUInt(); //... setting.setValue("checkState", (uint)checkState); setting.sync(); 回答1: Firstly, try to avoid C-style casts. For example, replace the following line: checkState = (Qt::CheckState)setting.value("checkState", Qt:

Iterate through settings files

妖精的绣舞 提交于 2019-12-10 17:03:52
问题 I'm currently working on a VSTO project for which I have 5 .settings files: Settings.settings (Default) s201213.settings s201314.settings s201415.settings s201516.settings Over time there will be more settings files included following the same naming convention ('s' followed by a tax year). I know I can iterate through a settings file, but is there a way to iterate through the actual settings files themselves? I've tried things such as: public void Example() { System.Collections.IEnumerator

iOS Launching Settings -> Restrictions URL Scheme

自闭症网瘾萝莉.ら 提交于 2019-12-10 16:36:45
问题 I've recently discovered the awesome iOS5 custom Settings URL Scheme , which can be explained in detail at this great website. I've found this to work, directing the user to the Settings app from my application: [[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"prefs:root=General"]]; But cannot seem to route directly to the Restrictions path via the path parameter: [[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"prefs:root=General&path=Restrictions"]]; Has

How can you launch a URL from the iOS Settings Bundle?

▼魔方 西西 提交于 2019-12-10 16:00:50
问题 I would like to launch a URL from the iOS Settings Bundle that would at least launch Safari when they Touched the setting. Not sure if this is possible I couldn't find any examples of this in the Settings area with Apple or 3rd party apps. If it is not I would appreciate confirmation for this. 回答1: You can't. Current Settings.bundle is able to only display or change values . Better check Apple docs Settings Application Schema Reference and the few available element types. Sorry. 回答2: The

Where should local settings (per user, and not version-controlled) go in newer (0.10+) versions of SBT?

风流意气都作罢 提交于 2019-12-10 15:45:33
问题 My application which is built using SBT requires particular settings that are specific to the host system (and may not even have sensible defaults). In my particular case I'm talking about the location of a piece of third-party software with dependent libraries required for the build (although there are plenty of other use cases for this). These settings should not be version-controlled, so they can't go into build.sbt or project/build.scala which should usually be in a VCS and applicable to