Example #1
0
        // call from main script editor
        public static MessageEditor MessageEditorInit(TabInfo tab, Form frm)
        {
            string msgPath = null;

            if (tab != null)
            {
                if (!MessageFile.GetAssociatePath(tab, true, out msgPath))
                {
                    return(null);
                }

                tab.msgFilePath = msgPath;
            }

            // Show form
            MessageEditor msgEdit = new MessageEditor(msgPath, tab);

            msgEdit.scriptForm = frm;
            if (tab != null)
            {
                msgEdit.alwaysOnTopToolStripMenuItem.Checked = true;
            }
            msgEdit.Show();
            //if (Settings.autoOpenMsgs && msgEdit.scrptEditor.msgAutoOpenEditorStripMenuItem.Checked)
            //    msgEdit.WindowState = FormWindowState.Minimized;

            return(msgEdit);
        }
Example #2
0
        // for open custom message file
        public static MessageEditor MessageEditorOpen(string msgPath, Form frm)
        {
            if (msgPath == null)
            {
                MessageBox.Show("No output path selected.", "Error");
            }

            // Show form
            MessageEditor msgEdit = new MessageEditor(msgPath, null);

            msgEdit.scriptForm  = frm;
            msgEdit.WindowState = FormWindowState.Maximized;
            frm.TopMost         = false;
            msgEdit.Show();

            return(msgEdit);
        }