<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)netfx.props" />
<PropertyGroup>
- <TargetFrameworks>net461;net471;netstandard2.0</TargetFrameworks>
+ <TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<AssemblyName>Crow</AssemblyName>
<Copyright></Copyright>
<AssemblyVersion>0.8.3.2</AssemblyVersion>
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
+using System.Threading;
using Crow.IML;
namespace Crow {
NotifyValueChanged ("Data", data);
- //lock (CurrentInterface.LayoutMutex)
+ lock (IFace.LayoutMutex)
ClearItems ();
if (data == null)
/// Items loading thread
/// </summary>
void loading(){
- loadPage (data, items, dataTest);
+ try {
+ loadPage (data, items, dataTest);
+ } catch (Exception ex) {
+ if (Monitor.IsEntered (IFace.LayoutMutex))
+ Monitor.Exit (IFace.LayoutMutex);
+ Console.WriteLine ("loading thread aborted");
+ }
+
}
// //if (!ItemTemplates.ContainsKey ("default"))
// // ItemTemplates ["default"] = Interface.GetItemTemplate (ItemTemplate);
iTemp = ItemTemplates ["default"];
}
- lock (IFace.LayoutMutex) {
+ Monitor.Enter (IFace.LayoutMutex);
g = iTemp.CreateInstance();
#if DESIGN_MODE
g.design_isTGItem = true;
// if (isPaged)
g.LogicalParent = this;
g.MouseClick += itemClick;
- }
+ Monitor.Exit (IFace.LayoutMutex);
if (iTemp.Expand != null && g is Expandable) {
Expandable e = g as Expandable;
#if DEBUG_LOG
DbgEvent dbgEvt = DebugLog.AddEvent(DbgEvtType.GOLockLayouting, this);
#endif
- lock (IFace.LayoutMutex) {
+ lock (IFace.UpdateMutex) {
OnDataSourceChanged (this, dse);
NotifyValueChanged ("DataSource", DataSource);
}