2 using Tizen.NUI.BaseComponents;
3 using Tizen.NUI.Components;
4 using Tizen.NUI.Wearable;
10 namespace Tizen.NUI.Samples
12 public class TextPageSample : IExample
14 private TextLabel label;
17 public string LoadTerms()
20 var filename = "res/pl_PL.txt";
23 terms = File.ReadAllText(filename);
24 } catch (Exception e) {
25 Tizen.Log.Debug("oobe", $"Unable to load terms: {e.Message}");
32 public void Activate()
34 Window window = NUIApplication.GetDefaultWindow();
36 TextLabelStyle attr = new TextLabelStyle
39 BackgroundColor = Color.Yellow,
40 TextColor = Color.Blue,
44 label = new TextLabel(attr);
45 label.Size = new Size(300, 700);
46 label.PointSize = 11.0f;
47 label.MultiLine = true;
50 TextPageUtil util = new TextPageUtil();
51 int pageCount = util.SetText( label, LoadTerms() );
52 Tizen.Log.Error("NUI", $"pageCount: {pageCount}\n");
53 label.Text = util.GetText(1);
57 public void Deactivate()
61 NUIApplication.GetDefaultWindow().Remove(root);