diff --git a/UICatalog/Scenarios/Unicode.cs b/UICatalog/Scenarios/Unicode.cs index 0f764f5bb..349bd7df8 100644 --- a/UICatalog/Scenarios/Unicode.cs +++ b/UICatalog/Scenarios/Unicode.cs @@ -10,9 +10,17 @@ namespace UICatalog { class UnicodeInMenu : Scenario { public override void Setup () { + const string IdenticalSign = "\u2261"; + const string ArrowUpSign = "\u2191"; + const string ArrowDownSign = "\u2193"; + const string EllipsesSign = "\u2026"; + const string StashSign = "\u205E"; + //string text = "Hello world, how are you today? Pretty neat!\nSecond line\n\nFourth Line."; string unicode = "Τὴ γλῶσσα μοῦ ἔδωσαν ἑλληνικὴ\nτὸ σπίτι φτωχικὸ στὶς ἀμμουδιὲς τοῦ Ὁμήρου.\nΜονάχη ἔγνοια ἡ γλῶσσα μου στὶς ἀμμουδιὲς τοῦ Ὁμήρου."; + string gitString = $"gui.cs master {IdenticalSign} {ArrowDownSign}18 {ArrowUpSign}10 {StashSign}1 {EllipsesSign}"; + var menu = new MenuBar (new MenuBarItem [] { new MenuBarItem ("_Файл", new MenuItem [] { new MenuItem ("_Создать", "Creates new file", null), @@ -30,7 +38,7 @@ namespace UICatalog { var label = new Label ("Label:") { X = 0, Y = 1 }; Win.Add (label); - var testlabel = new Label ("Стоял _он, дум великих полн") { X = 20, Y = Pos.Y (label), Width = Dim.Percent (50), }; + var testlabel = new Label (gitString) { X = 20, Y = Pos.Y (label), Width = Dim.Percent (50), }; Win.Add (testlabel); label = new Label ("Label (CanFocus):") { X = Pos.X (label), Y = Pos.Bottom (label) + 1 }; @@ -45,7 +53,7 @@ namespace UICatalog { label = new Label ("CheckBox:") { X = Pos.X (label), Y = Pos.Bottom (label) + 1 }; Win.Add (label); - var checkBox = new CheckBox (" ~  s  gui.cs   master ↑10") { X = 20, Y = Pos.Y (label), Width = Dim.Percent (50) }; + var checkBox = new CheckBox (gitString) { X = 20, Y = Pos.Y (label), Width = Dim.Percent (50) }; Win.Add (checkBox); label = new Label ("ComboBox:") { X = Pos.X (label), Y = Pos.Bottom (label) + 1 }; @@ -55,14 +63,14 @@ namespace UICatalog { Y = Pos.Y (label), Width = Dim.Percent (50), }; - comboBox.SetSource (new List () { "item #1", " ~  s  gui.cs   master ↑10", "Со_хранить" }); + comboBox.SetSource (new List () { gitString, "Со_хранить" }); Win.Add (comboBox); - comboBox.Text = " ~  s  gui.cs   master ↑10"; + comboBox.Text = gitString; label = new Label ("HexView:") { X = Pos.X (label), Y = Pos.Bottom (label) + 2 }; Win.Add (label); - var hexView = new HexView (new System.IO.MemoryStream (Encoding.ASCII.GetBytes (" ~  s  gui.cs   master ↑10 Со_хранить"))) { + var hexView = new HexView (new System.IO.MemoryStream (Encoding.ASCII.GetBytes (gitString + " Со_хранить"))) { X = 20, Y = Pos.Y (label), Width = Dim.Percent (60), @@ -72,7 +80,7 @@ namespace UICatalog { label = new Label ("ListView:") { X = Pos.X (label), Y = Pos.Bottom (hexView) + 1 }; Win.Add (label); - var listView = new ListView (new List () { "item #1", " ~  s  gui.cs   master ↑10", "Со_хранить", unicode }) { + var listView = new ListView (new List () { "item #1", gitString, "Со_хранить", unicode }) { X = 20, Y = Pos.Y (label), Width = Dim.Percent (60), @@ -82,7 +90,7 @@ namespace UICatalog { label = new Label ("RadioGroup:") { X = Pos.X (label), Y = Pos.Bottom (listView) + 1 }; Win.Add (label); - var radioGroup = new RadioGroup (new ustring [] { "item #1", " ~  s  gui.cs   master ↑10", "Со_хранить" }, selected: 0) { + var radioGroup = new RadioGroup (new ustring [] { "item #1", gitString, "Со_хранить" }, selected: 0) { X = 20, Y = Pos.Y (label), Width = Dim.Percent (60), @@ -91,7 +99,7 @@ namespace UICatalog { label = new Label ("TextField:") { X = Pos.X (label), Y = Pos.Bottom (radioGroup) + 1 }; Win.Add (label); - var textField = new TextField (" ~  s  gui.cs   master ↑10 = Со_хранить") { X = 20, Y = Pos.Y (label), Width = Dim.Percent (60) }; + var textField = new TextField (gitString + " = Со_хранить") { X = 20, Y = Pos.Y (label), Width = Dim.Percent (60) }; Win.Add (textField); label = new Label ("TextView:") { X = Pos.X (label), Y = Pos.Bottom (textField) + 1 };