Skip to content

Commit 012836e

Browse files
committed
CleanUp+msg localization
1 parent 94f3e9d commit 012836e

1 file changed

Lines changed: 3 additions & 19 deletions

File tree

app/Wissance.Zerial/Wissance.Zerial.Desktop/Views/MainWindow.axaml.cs

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Avalonia.Media;
1313
using AvaloniaEdit;
1414
using AvaloniaEdit.Document;
15+
using Jeek.Avalonia.Localization;
1516
using Wissance.Zerial.Desktop.ViewModels;
1617

1718
namespace Wissance.Zerial.Desktop.Views
@@ -60,24 +61,6 @@ private void OnTreeItemTapped(object? sender, TappedEventArgs e)
6061
ExecuteUpdate(sender as TextBlock);
6162
}
6263

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-
8164
private void OnTreeItemPointerPressed(object? sender, PointerPressedEventArgs e)
8265
{
8366
ExecuteUpdate(sender as TextBlock);
@@ -191,7 +174,7 @@ private void InitializeTextEditor()
191174
_textEditor.Options.ShowBoxForControlCharacters = true;
192175
_textEditor.Options.ColumnRulerPositions = new List<int>() { 80, 100 };
193176
_textEditor.TextArea.RightClickMovesCaret = true;
194-
_textEditor.Document = new TextDocument("Application started!");
177+
_textEditor.Document = new TextDocument(Localizer.Get(ApplicationStartedMessageKey));
195178
}
196179

197180
private void OnWindowResized(object? sender, WindowResizedEventArgs e)
@@ -244,6 +227,7 @@ private void OnWindowResized(object? sender, WindowResizedEventArgs e)
244227
};
245228

246229
private const int LinesPerEditorViewMin = 16;
230+
private const string ApplicationStartedMessageKey = "Zerial_Device_Application_Status_Message";
247231

248232
private readonly MainWindowViewModel _context;
249233
private TextEditor _textEditor;

0 commit comments

Comments
 (0)