Ejemplo n.º 1
0
        protected void OnEditorDocumentReady(object sender, RoutedEventArgs e)
        {
            var editor = sender as HtmlEditorExtend.Views.HtmlEditor;

            (editor.Document.MsHtmlDocInterface as HTMLDocumentEvents2_Event).ondblclick += obj =>
            {
                var htmlEditor = new HtmlEditor.HtmlEditor(new HtmlEditorVM(editor.ContentHtml));
                var dialog     = htmlEditor.ShowDialog();
                if (dialog.GetValueOrDefault(true))
                {
                    editor.BindingContent = htmlEditor.PageViewModel.HtmlContent;
                }

                return(true);
            };
        }
Ejemplo n.º 2
0
        private void OnViewResultClick(object sender, RoutedEventArgs e)
        {
            var selectedItem = trvTest.SelectedItem;

            if (selectedItem is KeyValueDisplay)
            {
                var type    = ((KeyValueDisplay)selectedItem).Key;
                var subTest = (SubTest)trvTest.SelectedContainer.ParentItem.Item;

                var testResult = XmlHelper.BuildTestResult(type == SubTestType.Writing.ToString()
                                             ? subTest.XmlWritingStructure : subTest.XmlListeningStructure);
                var htmlEditor = new HtmlEditor.HtmlEditor(new HtmlEditorVM(testResult));
                htmlEditor.Show();
            }
            else
            {
                RadMessageBox.Show(AppCommonResource.NotSelectedSubTest);
            }
        }