예제 #1
0
        private void 导出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (CurrentMapFloor == null)
            {
                return;
            }
            StringBuilder sb = new StringBuilder();

            if (ObstructionFloor.grids.Count > 0)
            {
                foreach (var grid in ObstructionFloor.grids)
                {
                    sb.AppendFormat("{0}_{1},", grid.tableX, grid.tableY);
                }
                sb.Length--;
            }

            sb.Append('|');
            if (TriggerFloor.grids.Count > 0)
            {
                foreach (var grid in TriggerFloor.grids)
                {
                    sb.AppendFormat("{0}_{1},", grid.tableX, grid.tableY);
                }
                sb.Length--;
            }

            var dlgTxt = new ShowTextDialog();

            dlgTxt.ShowText = sb.ToString();
            dlgTxt.ShowDialog(this);
        }
예제 #2
0
        private void 导入ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (CurrentMapFloor == null)
            {
                MessageBox.Show("先打开图片");
                return;
            }

            var dlgTxt = new ShowTextDialog();
            //dlgTxt.EnterEndCallback += LoadText;
            var ret = dlgTxt.ShowDialog(this);

            if (ret == DialogResult.OK)
            {
                LoadText(dlgTxt.Text);
            }
            Invalidate();
        }