|
12 | 12 | using Avalonia.Media; |
13 | 13 | using AvaloniaEdit; |
14 | 14 | using AvaloniaEdit.Document; |
| 15 | +using Jeek.Avalonia.Localization; |
15 | 16 | using Wissance.Zerial.Desktop.ViewModels; |
16 | 17 |
|
17 | 18 | namespace Wissance.Zerial.Desktop.Views |
@@ -60,24 +61,6 @@ private void OnTreeItemTapped(object? sender, TappedEventArgs e) |
60 | 61 | ExecuteUpdate(sender as TextBlock); |
61 | 62 | } |
62 | 63 |
|
63 | | - /*private void OnConnectButtonTextChanged(object? sender, AvaloniaPropertyChangedEventArgs e) |
64 | | - { |
65 | | - if (SerialDeviceBtnConnOptionsPanel != null && TextEditorContainerPanel != null) |
66 | | - { |
67 | | - // Set equal resize by edit Right as Width - Margin |
68 | | - if (SerialDeviceBtnConnOptionsPanel.Bounds != null && SerialDeviceBtnConnOptionsPanel.Bounds.Right > 0) |
69 | | - { |
70 | | - double newWidth = Width - 20 - SerialDeviceBtnConnOptionsPanel.Bounds.Left; |
71 | | - SerialDeviceBtnConnOptionsPanel.Width = newWidth; |
72 | | - SerialDeviceBtnConnOptionsPanel. |
73 | | - } |
74 | | - // double newWidth = SerialDeviceBtnConnOptionsPanel.Bounds.Right - TextEditorContainerPanel.Bounds.Left; |
75 | | - // double newWidth = TextEditorContainerPanel.Bounds.Right - SerialDeviceBtnConnOptionsPanel.Bounds.Left; |
76 | | - // SerialDeviceBtnConnOptionsPanel.Width = newWidth; |
77 | | - // TextEditorContainerPanel.Width = newWidth; |
78 | | - } |
79 | | - }*/ |
80 | | - |
81 | 64 | private void OnTreeItemPointerPressed(object? sender, PointerPressedEventArgs e) |
82 | 65 | { |
83 | 66 | ExecuteUpdate(sender as TextBlock); |
@@ -191,7 +174,7 @@ private void InitializeTextEditor() |
191 | 174 | _textEditor.Options.ShowBoxForControlCharacters = true; |
192 | 175 | _textEditor.Options.ColumnRulerPositions = new List<int>() { 80, 100 }; |
193 | 176 | _textEditor.TextArea.RightClickMovesCaret = true; |
194 | | - _textEditor.Document = new TextDocument("Application started!"); |
| 177 | + _textEditor.Document = new TextDocument(Localizer.Get(ApplicationStartedMessageKey)); |
195 | 178 | } |
196 | 179 |
|
197 | 180 | private void OnWindowResized(object? sender, WindowResizedEventArgs e) |
@@ -244,6 +227,7 @@ private void OnWindowResized(object? sender, WindowResizedEventArgs e) |
244 | 227 | }; |
245 | 228 |
|
246 | 229 | private const int LinesPerEditorViewMin = 16; |
| 230 | + private const string ApplicationStartedMessageKey = "Zerial_Device_Application_Status_Message"; |
247 | 231 |
|
248 | 232 | private readonly MainWindowViewModel _context; |
249 | 233 | private TextEditor _textEditor; |
|
0 commit comments