Beispiel #1
0
 /// <summary>
 /// This function adds a node style to the settings
 /// </summary>
 /// <param name="name">The name of style to add</param>
 /// <param name="nodeStyle">The style implementation</param>
 public void AddNodeStyle(string name, NodeStyle nodeStyle)
 {
     if (this.nodeStyleList.ContainsKey(name))
     {
         NodeStyle old = this.nodeStyleList[name];
         this.nodeStyleList.Remove(name);
         this.nodeStyleList.Add(name, nodeStyle);
         old.RaiseChangeEvent();
     }
     else
     {
         this.nodeStyleList.Add(name, nodeStyle);
         this.defaultNodeStyle.RaiseChangeEvent();
     }
 }
Beispiel #2
0
 /// <summary>
 /// this function sets or reset the style from the node
 /// </summary>
 private void SetStyle()
 {
     this.style = this.viewManager.Settings.GetNodeStyle(this.node.StyleName);
     this.style.Changed += new EventHandler(this.Style_Changed);
 }