コード例 #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
ファイル: RichTextControl.xaml.cs プロジェクト: JatinR/quest
        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
ファイル: RichTextControl.xaml.cs プロジェクト: JatinR/quest
 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
ファイル: RichTextControl.xaml.cs プロジェクト: JatinR/quest
        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);
            }
        }