diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-19 08:51:40 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-19 08:51:40 +0100 |
| commit | c4ba610f43b9302ae5ece7741ad12fd3ab4b1fac (patch) | |
| tree | c9f762f24fda555c8e210cf04c33d69d5e1e2155 /src/GraphicObjects | |
| parent | 0e44a661c488b012b9fc0eb56fec23ac8786436c (diff) | |
try to make tg loading multithreaded, thread sync probs
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/Group.cs | 2 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedGroup.cs | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index 3802a4d9..10d87ab6 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -263,7 +263,7 @@ namespace Crow gr.Clip (); } - lock (Children) { + lock (children) { foreach (GraphicObject c in Children) { if (!c.Visible) continue; diff --git a/src/GraphicObjects/TemplatedGroup.cs b/src/GraphicObjects/TemplatedGroup.cs index 264c9e80..f2c097a2 100644 --- a/src/GraphicObjects/TemplatedGroup.cs +++ b/src/GraphicObjects/TemplatedGroup.cs @@ -176,7 +176,7 @@ namespace Crow if (value == data) return; - //cancelLoadingThread (); + cancelLoadingThread (); if (data is IObservableList) { IObservableList ol = data as IObservableList; @@ -200,11 +200,9 @@ namespace Crow if (data == null) return; -// loadingThread = new CrowThread (this, loading); -// loadingThread.Finished += (object sender, EventArgs e) => (sender as TemplatedGroup).Loaded.Raise (sender, e); -// loadingThread.Start (); - - loadPage (data, items, dataTest); + loadingThread = new CrowThread (this, loading); + loadingThread.Finished += (object sender, EventArgs e) => (sender as TemplatedGroup).Loaded.Raise (sender, e); + loadingThread.Start (); NotifyValueChanged ("SelectedIndex", _selectedIndex); NotifyValueChanged ("SelectedItem", SelectedItem); @@ -327,7 +325,9 @@ namespace Crow /// <summary> /// Items loading thread /// </summary> -// void loading(){ + void loading(){ + loadPage (data, items, dataTest); + } // //if (!ItemTemplates.ContainsKey ("default")) // // ItemTemplates ["default"] = Interface.GetItemTemplate (ItemTemplate); // |