Пример #1
0
        private void InsertPicture(TextProcessorCommand command)
        {
            var window = new FilePopUp();

            window.Initialise(m_helper.Controller);
            window.ShowDialog();
            if (!string.IsNullOrEmpty(window.Filename))
            {
                InsertText(command.InsertBefore + window.Filename + command.InsertAfter, string.Empty);
            }
        }
Пример #2
0
        private void InsertPage(TextProcessorCommand command)
        {
            var pages  = m_helper.Controller.GetObjectNames("object", true).Where(n => n != "player").OrderBy(n => n);
            var result = PopupEditors.EditStringWithDropdown("Link text", string.Empty, "Add link to", pages, pages.First(), allowEmptyString: true);

            if (!result.Cancelled)
            {
                InsertText(
                    command.InsertBefore + result.ListResult + (result.Result.Length > 0 ? ":" + result.Result : "") +
                    command.InsertAfter, string.Empty);
            }
        }
Пример #3
0
        private void InsertObject(TextProcessorCommand command)
        {
            var objects = m_helper.Controller.GetObjectNames("object", true).OrderBy(n => n);
            var result  = PopupEditors.EditStringWithDropdown(
                "Please choose an object",
                string.Empty, null, null, string.Empty, objects);

            if (!result.Cancelled)
            {
                InsertText(command.InsertBefore + result.Result + command.InsertAfter, string.Empty);
            }
        }
Пример #4
0
        private void InsertExit(TextProcessorCommand command)
        {
            var text    = L.T("EditorKeypromptEnterExitName");
            var objects = m_helper.Controller.GetObjectNames("exit", true).OrderBy(n => n);
            var result  = PopupEditors.EditStringWithDropdown(
                text,
                string.Empty, null, null, string.Empty, objects);

            if (!result.Cancelled)
            {
                InsertText(command.InsertBefore + result.Result + command.InsertAfter, string.Empty);
            }
        }
Пример #5
0
        private void InsertPage(TextProcessorCommand command)
        {
            var pages = m_helper.Controller.GetObjectNames("object", true).Where(n => n != "player").OrderBy(n => n);
            var result = PopupEditors.EditStringWithDropdown("Link text", string.Empty, "Add link to", pages, pages.First(), allowEmptyString: true);

            if (!result.Cancelled)
            {
                InsertText(
                    command.InsertBefore + result.ListResult + (result.Result.Length > 0 ? ":" + result.Result : "") +
                    command.InsertAfter, string.Empty);
            }
        }
Пример #6
0
 private void InsertPicture(TextProcessorCommand command)
 {
     var window = new FilePopUp();
     window.Initialise(m_helper.Controller);
     window.ShowDialog();
     if (!string.IsNullOrEmpty(window.Filename))
     {
         InsertText(command.InsertBefore + window.Filename + command.InsertAfter, string.Empty);
     }
 }
Пример #7
0
        private void InsertObject(TextProcessorCommand command)
        {
            var objects = m_helper.Controller.GetObjectNames("object", true).OrderBy(n => n);
            var result = PopupEditors.EditStringWithDropdown(
                "Please choose an object",
                string.Empty, null, null, string.Empty, objects);

            if (!result.Cancelled)
            {
                InsertText(command.InsertBefore + result.Result + command.InsertAfter, string.Empty);
            }
        }