Exemplo n.º 1
0
        static void Main()
        {
            string wstrGeneralStringFileName = ScriptTreeManager.strKRStringDir + "General.ess";
            string wstrScriptStringFileName  = ScriptTreeManager.strKRStringDir + "Script.ess";

            StringManager.InitializeStringTable(wstrGeneralStringFileName, wstrScriptStringFileName);

            DungeonDataDivider FD = new DungeonDataDivider();

            FD.DivideDungeonData(ScriptTreeManager.strDungeonDir + "DungeonData.lua");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            m_Form = new Form1();
            Application.Run(m_Form);

            FD.CleanUpDungeonData();
        }
        public override void AddtoTreeView(TreeNodeCollection treeNodeCollection, bool bParentChecked)
        {
            TreeNode treeNode = new TreeNode(m_strEnumName);

            treeNode.Checked = m_bOn && bParentChecked;
            treeNode.Tag     = this;
            if (m_DInfoData == null)
            {
                treeNode.ToolTipText = "DID : " + m_iID.ToString() + "\nDungeonInfoFileName : " + m_strFileName;
            }
            else
            {
                treeNode.ToolTipText = "DID : " + m_iID.ToString() +
                                       "\nDungeonName : " + StringManager.GetGeneralString(m_DInfoData.m_DungeonName_ID) +
                                       "\nDungeonInfoFileName : " + m_strFileName +
                                       "\nDungeonDataFileName : " + m_DInfoData.m_DataFileName;
            }


            // Create the ContextMenuStrip.
            ContextMenuStrip DungeonMenu = new ContextMenuStrip();

            //Create some menu items.
            ToolStripMenuItem openLabel = new ToolStripMenuItem();

            openLabel.Text = "Open DungeonData Script(Not Yet)";

            //Create some menu items.
            ToolStripMenuItem openLabel2 = new ToolStripMenuItem();

            openLabel2.Text = "Open Data Script(Not Yet)";

            //Add the menu items to the menu.
            DungeonMenu.Items.AddRange(new ToolStripMenuItem[] { openLabel, openLabel2 });

            // Set the ContextMenuStrip property to the ContextMenuStrip.
            treeNode.ContextMenuStrip = DungeonMenu;


            treeNodeCollection.Add(treeNode);
        }