From: gdkhd812 Date: Mon, 15 May 2017 14:22:38 +0000 (+0900) Subject: WPF版のデモではドキュメントを切り替えないようにした X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4df91dcb5d8f3b6787d4f5fbd6f6db9cc8baf2e9;p=fooeditengine%2FFooEditEngine.git WPF版のデモではドキュメントを切り替えないようにした --- diff --git a/WPF/Test/MainWindow.xaml b/WPF/Test/MainWindow.xaml index b60016e..07b7656 100644 --- a/WPF/Test/MainWindow.xaml +++ b/WPF/Test/MainWindow.xaml @@ -35,10 +35,6 @@ - - - - diff --git a/WPF/Test/MainWindow.xaml.cs b/WPF/Test/MainWindow.xaml.cs index dbdc4d4..c8d548e 100644 --- a/WPF/Test/MainWindow.xaml.cs +++ b/WPF/Test/MainWindow.xaml.cs @@ -47,7 +47,7 @@ namespace Test complete_collection.Add(new CompleteWord("char")); complete_collection.Add(new CompleteWord("var")); - Document doc = new Document(); + Document doc = this.fooTextBox.Document; doc.AutoComplete = new AutoCompleteBox(doc); doc.AutoComplete.Items = complete_collection; doc.AutoComplete.Enabled = true; @@ -55,11 +55,6 @@ namespace Test //doc.LayoutLines.FoldingStrategy = new WZTextFoldingGenerator(); doc.Update += Document_Update; - this.fooTextBox.Document = doc; - - this.Documents.Add(doc); - this.Documents.Add(new Document()); - this.Closed += MainWindow_Closed; } @@ -232,22 +227,6 @@ namespace Test this.fooTextBox.Refresh(); } - private void MenuItem_Click_14(object sender, RoutedEventArgs e) - { - this.fooTextBox.Document = this.Documents[0]; - this.it = null; - this.InvalidateVisual(); - MessageBox.Show("Current Document is Document1"); - } - - private void MenuItem_Click_15(object sender, RoutedEventArgs e) - { - this.fooTextBox.Document = this.Documents[1]; - this.it = null; - this.InvalidateVisual(); - MessageBox.Show("Current Document is Document2"); - } - private void MenuItem_Click_16(object sender, RoutedEventArgs e) { if(this.fooTextBox.LineBreakMethod != LineBreakMethod.CharUnit)