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); } }
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); } }
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); } }
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); } }