qhcode/FormLogin.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using ComponentFactory.Krypton.Toolkit;
using Quote2015;
using Trade2015;

namespace hf_terminal
{
	public partial class FormLogin : KryptonForm
	{
		#region 配置
		private readonly Configuration _config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
		private string GetConfig(string pKey)
		{
			return _config.AppSettings.Settings[pKey] == null ? string.Empty : _config.AppSettings.Settings[pKey].Value;
		}
		private void SetConfig(string pKey, string pValue)
		{
			if (_config.AppSettings.Settings[pKey] == null)
				_config.AppSettings.Settings.Add(pKey, pValue);
			else
				_config.AppSettings.Settings[pKey].Value = pValue;
			_config.Save(ConfigurationSaveMode.Full);
			ConfigurationManager.RefreshSection("appSettings");
		}
		#endregion

		public FormLogin()
		{
			InitializeComponent();
		}
		readonly DataTable _dt = new DataTable("ServerConfig");
		internal Trade trade;
		internal Quote quote;
		internal string Server;

		private void FormLogin_Load(object sender, EventArgs e)
		{
			_dt.Columns.Add("txt");
			_dt.Columns.Add("val");
			_dt.PrimaryKey = new[] { _dt.Columns[0] };
			if (File.Exists("server.txt"))
			{
				foreach (string line in File.ReadAllLines("server.txt", Encoding.GetEncoding("GB2312")))
				{
					if (string.IsNullOrEmpty(line))
						continue;
					_dt.Rows.Add(line.Split(','));
				}
			}
			else
后面还有 136 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。