Exemplo n.º 1
0
        internal void Add(Type modelType, InternalNodeViewCustomization internalNodeViewCustomization)
        {
            List <InternalNodeViewCustomization> entries;

            if (!lookupDict.TryGetValue(modelType, out entries))
            {
                entries = new List <InternalNodeViewCustomization>();
                lookupDict[modelType] = entries;
            }
            entries.Add(internalNodeViewCustomization);
        }
Exemplo n.º 2
0
 private void TryApplyCustomization(NodeModel model, NodeView view, InternalNodeViewCustomization customization)
 {
     try
     {
         var disposable = customization.CustomizeView(model, view);
         view.Unloaded += (s, a) => disposable.Dispose();
     }
     catch (Exception e)
     {
         var message = "Failed to apply NodeViewCustomization for " + model.GetType().Name;
         logger.LogError(message);
         logger.Log(e);
     }
 }
 private void TryApplyCustomization(NodeModel model, NodeView view, InternalNodeViewCustomization customization)
 {
     try
     {
         var disposable = customization.CustomizeView(model, view);
         view.Unloaded += (s, a) => disposable.Dispose();
     }
     catch (Exception e)
     {
         var message = string.Format(Wpf.Properties.Resources.MessageFailedToApplyCustomization, model.GetType().Name);
         logger.LogError(message);
         logger.Log(e);
     }
 }
 private void TryApplyCustomization(NodeModel model, NodeView view, InternalNodeViewCustomization customization)
 {
     try
     {
         var disposable = customization.CustomizeView(model, view);
         view.Unloaded += (s, a) => disposable.Dispose();
     }
     catch (Exception e)
     {
         var message = string.Format(Wpf.Properties.Resources.MessageFailedToApplyCustomization, model.GetType().Name);
         logger.LogError(message);
         logger.Log(e);
     }
 }
Exemplo n.º 5
0
        internal void Add(INodeViewCustomizations cs)
        {
            var custs = cs.GetCustomizations();

            foreach (var pair in custs)
            {
                var nodeModelType = pair.Key;
                var custTypes     = pair.Value;

                foreach (var custType in custTypes)
                {
                    this.Add(nodeModelType, InternalNodeViewCustomization.Create(nodeModelType, custType));
                }
            }
        }
 internal void Add(Type modelType, InternalNodeViewCustomization internalNodeViewCustomization)
 {
     List<InternalNodeViewCustomization> entries;
     if (!lookupDict.TryGetValue(modelType, out entries))
     {
         entries = new List<InternalNodeViewCustomization>();
         lookupDict[modelType] = entries;
     }
     entries.Add(internalNodeViewCustomization);
 }