FormToolEvent.cs

(开头部分) 30KB

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

using AppManager.Config;
using AppManager.CustomEnum;
using AppManager.Excep;
using AppManager.Icon;
using AppManager.Pojo;
using AppManager.Services;
using AppManager.Utils;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Windows.Forms;

namespace AppManager {
    partial class Form1 {
        private readonly HttpSendService _httpSendService = HttpSendService.Instance;
        private readonly HttpSendParamService _httpSendParamService = HttpSendParamService.Instance;
        /// <summary>
        /// 工具TabControl设置TabPage左边栏
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolTabControl_DrawItem(object sender, DrawItemEventArgs e) {
            var tabCtl = sender as TabControl;
            var text = tabCtl?.TabPages[e.Index].Text;
            var brush = new SolidBrush(Color.DarkBlue);
            var sf = new StringFormat(StringFormatFlags.DirectionRightToLeft) {
                LineAlignment = StringAlignment.Center,
                Alignment = StringAlignment.Center
            };
            e.Graphics.DrawString(text, SystemInformation.MenuFont, brush, e.Bounds, sf);
        }

        private void InitToolPage() {
            #region http请求工具
            // 发送记录按钮的背景Image设置
            SendHistoryButton.BackgroundImage = Image.FromFile(IconConstants.HttpsendHistory);
            SendHistoryButton.BackgroundImageLayout = ImageLayout.Stretch;
            SaveHttpButton.BackgroundImage = Image.FromFile(IconConstants.HttpsendSaveHttp);
            SaveHttpButton.BackgroundImageLayout = ImageLayout.Stretch;
            // 设置参数面板水平滚动条不可用
            FormParamFlowLayoutPanel.HorizontalScroll.Maximum = 0;
            FormParamFlowLayoutPanel.AutoScroll = false;
            FormParamFlowLayoutPanel.VerticalScroll.Visible = false;
            FormParamFlowLayoutPanel.AutoScroll = true;
            // 当前参数Panel的宽度
            _currentWidth = FormParamFlowLayoutPanel.ClientSize.Width;
            SetParamPanelWidth(FormDataParamPanel1);

            RawTypeComboBox.Items.AddRange(Enum.GetNames(typeof(RawTypeEnum)));// raw参数中请求类型下拉框赋值
            RawTypeComboBox.Text = RawTypeEnum.Json.ToString("G");// raw参数默认JSON请求
            // 分隔距离
            var splitDisStr = IniUtils.IniReadValue(Configs.SystemIniPath, Configs.IniSectionTool, Configs.IniKeyToolSplitDis);
            if (string.IsNullOrEmpty(splitDisStr)) {
                splitDisStr = "200";
后面还有 529 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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