OSDN Git Service

メトロ版でコンパイルが通らない不具合を修正した
[fooeditengine/FooEditEngine.git] / Metro / FooEditEngine / FooTextBox.cs
index e15249b..a4cb1ae 100644 (file)
@@ -729,12 +729,18 @@ namespace FooEditEngine.Metro
 
         void _textStore_GetSelectionIndex(int start_index, int max_count, out DotNetTextStore.TextSelection[] sels)
         {
-            TextStoreHelper.GetSelection(this._Controller, this.View.Selections, out sels);
+            TextRange selRange;
+            TextStoreHelper.GetSelection(this._Controller, this.View.Selections, out selRange);
+
+            sels = new DotNetTextStore.TextSelection[1];
+            sels[0] = new DotNetTextStore.TextSelection();
+            sels[0].start = selRange.Index;
+            sels[0].end = selRange.Index + selRange.Length;
         }
 
         void _textStore_SetSelectionIndex(DotNetTextStore.TextSelection[] sels)
         {
-            TextStoreHelper.SetSelectionIndex(this._Controller, this.View, sels);
+            TextStoreHelper.SetSelectionIndex(this._Controller, this.View, sels[0].start, sels[0].end);
             this.Refresh();
         }