Пример #1
0
        private void ToolStripMenuItemAddMessage_Click(object sender, EventArgs e)
        {
            // New Message
            var dialog = new MessageEditDialog(null);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                var message = dialog.m_Message;
                EditorMessageManager.singleton.AddMessage(message);
                Command.SaveMessageData();
                listBoxMessage.Items.Add(message.Name);
            }
        }
Пример #2
0
        private void ToolStripMenuItemModifyMessage_Click(object sender, EventArgs e)
        {
            // Modify Message
            var message = GetSelectedMessage(listBoxMessage);

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

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

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