frmMain.cs

(开头部分) 10KB

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

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ConExpress.Calculator
{
    public partial class frmMain : Form
    {
        SyntaxAnalyse myAnalyse = new SyntaxAnalyse();

        public frmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            this.ActiveControl = this.rtbInput;//设置输入框为激活控件
            this.LoadOperateTokenTree();
        }


        #region 内部方法

        /// <summary>
        /// 加载操作记号树视图
        /// </summary>
        /// <remarks>xxxxxxxxx; Date:2008-6-12;</remarks>
        private void LoadOperateTokenTree()
        {
            this.trvOperateToken.BeginUpdate();
            this.trvOperateToken.Nodes.Clear();
            
            TreeNode nodRootKeyword = new TreeNode("关键字");
            this.LoadOperateTokenChildNode(nodRootKeyword, TokenKeywordFactory.GetKeywordDictionary(), OperateTokenTypeEnum.TokenKeyword);

            TreeNode nodRootSymbol = new TreeNode("运算符");
            this.LoadOperateTokenChildNode(nodRootSymbol, TokenSymbolFactory.GetSymbolDictionary(), OperateTokenTypeEnum.TokenSymbol);

            this.trvOperateToken.Nodes.Add(nodRootKeyword);
            this.trvOperateToken.Nodes.Add(nodRootSymbol);

            this.trvOperateToken.EndUpdate();
        }

        /// <summary>
        /// 加载操作记号下级节点
        /// </summary>
        /// <param name="ParentNode">父节点</param>
        /// <param name="OperateTokenDictionary">操作记号字典</param>
        /// <param name="OperateTokenType">操作记号类型</param>
        /// <remarks>xxxxxxxxx; Date:2008-6-12;</remarks>
        private void LoadOperateTokenChildNode(TreeNode ParentNode, SortedDictionary<string, string> OperateTokenDictionary, OperateTokenTypeEnum OperateTokenType)
        {
            foreach (string OperateToken in OperateTokenDictionary.Keys)
            {
后面还有 219 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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