2 using Tizen.NUI.BaseComponents;
3 using Tizen.NUI.Utility;
9 namespace Tizen.NUI.Samples
11 public class TextPageSample : IExample
13 private TextLabel label;
16 public string LoadTerms()
19 var filename = "res/pl_PL.txt";
22 terms = File.ReadAllText(filename);
23 } catch (Exception e) {
24 Tizen.Log.Debug("oobe", $"Unable to load terms: {e.Message}");
31 public void Activate()
33 Window window = NUIApplication.GetDefaultWindow();
35 label = new TextLabel();
36 label.Size = new Size(300, 700);
37 label.PointSize = 11.0f;
38 label.MultiLine = true;
40 TextPageUtil util = new TextPageUtil();
41 int pageCount = util.SetText( label, LoadTerms() );
42 Tizen.Log.Error("NUI", $"pageCount: {pageCount}\n");
43 label.Text = util.GetText(1);
47 public void Deactivate()
51 NUIApplication.GetDefaultWindow().Remove(root);