Settings 设置(2010-04-26)

//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.3603
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace Mtxspfrom.Config {
   
   
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
    internal sealed partial class SetUser : global::System.Configuration.ApplicationSettingsBase {
       
        private static SetUser defaultInstance = ((SetUser)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new SetUser())));
       
        public static SetUser Default {
            get {
                return defaultInstance;
            }
        }
       
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("False")]
        public bool Setting {
            get {
                return ((bool)(this["Setting"]));
            }
            set {
                this["Setting"] = value;
            }
        }
       
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("True")]
        public bool get {
            get {
                return ((bool)(this["get"]));
            }
            set {
                this["get"] = value;
            }
        }
       
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("测试1")]
        public string test1 {
            get {
                return ((string)(this["test1"]));
            }
            set {
                this["test1"] = value;
            }
        }
       
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("测试2")]
        public string test2 {
            get {
                return ((string)(this["test2"]));
            }
            set {
                this["test2"] = value;
            }
        }
    }
}

/窗体区域

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Mtxspfrom.Config;
using System.Configuration;

namespace Mtxspfrom.Show
{
    public partial class Set_Form : Form
    {
        private SetUser user = new SetUser();

        internal SetUser SetUser
        {
            get
            {
                return user;
            }
            set
            {
                user = value;
            }
        }

        public Set_Form()
        {
            InitializeComponent();
        }

        public void UpdateOptionSetting()
        {
            if (checkBox1.Checked)
                user.Setting = true;
            else
                user.Setting = false;

            if (checkBox2.Checked)
                user.get = true;
            else
                user.get = false;
            user.test1 = txt_one.Text.ToString();
            user.test2 = txt_two.Text.ToString();
        }

        //窗体加载读取配置信息
        private void Set_Form_Load(object sender, EventArgs e)
        {
            button2.Text = user.test1;
            if (user.Setting)
                checkBox1.Checked = true;
            else
                checkBox1.Checked = false;

            if (user.get)
                checkBox2.Checked = true;
            else
                checkBox2.Checked = false;
            txt_one.Text = user.test1;
            txt_two.Text = user.test2;
        }

        private void btn_test_Click(object sender, EventArgs e)
        {
            UpdateOptionSetting();
            user.Save();
            //这里需要线程来执行 窗体再加载 和 用户提示加载进度(类似保存中....20%)
            Set_Form_Load(sender, e);
        }

        private void btn_tests_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}

 

转载于:https://www.cnblogs.com/Deckard/archive/2010/04/26/1721282.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: ms-settings:personalization-background是Windows 10操作系统中的一个设置选项,用于更改桌面背景图片。用户可以通过该选项选择自己喜欢的图片或幻灯片作为桌面背景,也可以设置背景图片的填充方式、颜色等。 ### 回答2: ms-settings:personalization-background是Windows 10的设置功能之一,它允许用户自定义桌面背景图像。通过这个设置,用户可以选择一张图片作为桌面背景,或者设置幻灯片来自动轮换多张图片。 这个设置功能非常简便易用,用户只需点击桌面上任意一处空白区域,然后选择“个性化”选项,就可以进入ms-settings:personalization-background页面。在该页面上,用户可以从本地计算机上选择图片作为桌面背景,或者从Microsoft Store下载背景图片。用户还可以选择“幻灯片”选项,将多张图片作为背景并设置轮换时间。此外,用户还可以选择背景显示方式,包括平铺、居中、填充等。 ms-settings:personalization-background不仅方便了用户自定义桌面背景,同时也让桌面背景更加个性化。用户可以根据自己的喜好选择各种美丽独特的背景图片,或者选择自己喜欢的图片拼贴成幻灯片进行轮播。无论是工作还是休闲,这个设置功能都可以让用户的计算机桌面更加舒适、个性化、温馨。 ### 回答3: ms-settings:personalization-background是Windows 10中的一个设置页面,用于更改桌面背景。Windows 10允许用户选择不同的背景图片或幻灯片作为桌面背景,以及对背景色进行自定义。此外,用户还可以选择是否在锁定屏幕上显示相同的桌面背景。 通过这个设置页面,用户可以轻松地上传自己的图片作为桌面背景,并应用到所有的设备上。此外,用户可以通过“背景选项”中的下拉框选择不同的背景设置,包括桌面背景、开始菜单和任务栏、锁定屏幕,以及高对比度设置等,以适应不同的使用习惯和视力。 此外,Windows 10还提供了“Dynamic Theme”和“Slideshow”两种背景设置,让用户可以轻松地更改背景图片,实现更加个性化的桌面。用户可以设置图片轮播时间间隔,以及图片来源。此外,用户还可以通过“浏览”按钮来添加自己喜爱的图片文件夹,使得Windows随机选择其中的图片作为桌面背景。 总的来说,ms-settings:personalization-background是Windows 10中一个非常有用的设置页面,可以让用户轻松自定义自己的桌面背景,实现更加个性化的用户体验。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值