コード例 #1
0
        private void ToolStripMenuItemAddEnum_Click(object sender, EventArgs e)
        {
            var dialog = new EnumEditDialog(null);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                var message = dialog.m_Message;
                EditorMessageManager.singleton.AddMessage(message);
                Command.SaveMessageData();
                listBoxEnum.Items.Add(message.Name);
            }
        }
コード例 #2
0
        private void ToolStripMenuItemModifyEnum_Click(object sender, EventArgs e)
        {
            var message = GetSelectedMessage(listBoxEnum);

            if (message == null)
            {
                MessageBox.Show("Has not selected Enum");
                return;
            }

            // editor message
            var dialog = new EnumEditDialog(message.Clone());

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                EditorMessageManager.singleton.UpdateMessage(dialog.m_Message, message);
                Command.SaveMessageData();
                UpdateRichText(richTextBoxEnum, message);
            }
        }