同步操作将从 糖醋鱼/ClientServerProject 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
using System;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Data;using System.Linq;using System.Text;using System.Windows.Forms;using HslCommunication;using Newtonsoft.Json.Linq;using CommonLibrary;namespace ClientsLibrary.Configuration{public partial class GeneralConfiguration : UserControl{#region Constructorpublic GeneralConfiguration(){InitializeComponent();}#endregion#region Control Loadprivate void GeneralConfiguration_Load(object sender, EventArgs e){// 初始化OperateResult<string> result = UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.请求信任客户端, "");if (result.IsSuccess){JObject json = JObject.Parse(result.Content);checkBox1.Checked = HslCommunication.BasicFramework.SoftBasic.GetValueFromJsonObject(json, "AllowUserMulti", false);}else{MessageBox.Show("请求服务器失败,请稍后重试!");userButton2.Enabled = false;}// 文本本地化UILocalization();}#endregion#region Submitprivate void userButton2_Click(object sender, EventArgs e){JObject json = new JObject{{ "AllowUserMulti", new JValue(checkBox1.Checked) },{ "AllowFrameLogin", new JValue(checkBox2.Checked) },};OperateResult<string> result = UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.上传信任客户端, json.ToString());if (result.IsSuccess){MessageBox.Show("上传成功!");}else{MessageBox.Show("上传失败!");}}#endregion#region Localization Support/// <summary>/// 本地化显示的操作,还未完成/// </summary>private void UILocalization(){checkBox1.Text = UserLocalization.Localization.CheckBoxAllowUserMulti;checkBox2.Text = UserLocalization.Localization.CheckBoxAllowFrameLogin;userButton2.UIText = UserLocalization.Localization.ButtonSave;}#endregion}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。