Beispiel #1
0
 public static void FormatAttribute(this Cell cell, CellAttribute key, StringBuilder input)
 {
     if (cell.Attributes.ContainsKey(key))
     {
         cell.Attributes[key].Format(cell, input);
     }
 }
Beispiel #2
0
 public static void SetAttribute(this Cell cell, CellAttribute key, string value)
 {
     if (!cell.HasAttribute(key))
     {
         cell.Attributes.Add(key, CellAttributeValue.Make(key));
     }
     cell.Attributes[key].SetValue(value);
 }
Beispiel #3
0
 public void SetAttribute(CellAttribute key, string value)
 {
     if (attributes == null)
     {
         attributes = new Dictionary <CellAttribute, string>();
     }
     attributes[key] = value;
 }
Beispiel #4
0
 public bool HasAttribute(CellAttribute key)
 {
     return attributes == null ? false : attributes.ContainsKey(key);
 }
Beispiel #5
0
 public void AddToAttribute(CellAttribute key, string value)
 {
     SetAttribute(key, string.Format(
                           key == CellAttribute.InformationPrefix ? PrefixFormat : SuffixFormat,
                           GetAttribute(key), value));
 }
Beispiel #6
0
 public bool HasAttribute(CellAttribute key)
 {
     return baseCell.HasAttribute(key);
 }
Beispiel #7
0
 public void AddToAttribute(CellAttribute key, string value)
 {
     baseCell.AddToAttribute(key, value);
 }
Beispiel #8
0
 public static string GetAttribute(this Cell cell, CellAttribute key)
 {
     return(cell.Attributes.ContainsKey(key) ? cell.Attributes[key].Value : string.Empty);
 }
Beispiel #9
0
 public static void SetAttribute(this Cell cell, CellAttribute key, string value)
 {
     if (!cell.HasAttribute(key)) cell.Attributes.Add(key, CellAttributeValue.Make(key));
     cell.Attributes[key].SetValue(value);
 }
Beispiel #10
0
 public static bool HasAttribute(this Cell cell, CellAttribute key)
 {
     return cell.Attributes.ContainsKey(key);
 }
Beispiel #11
0
 public static string GetAttribute(this Cell cell, CellAttribute key)
 {
     return cell.Attributes.ContainsKey(key) ? cell.Attributes[key].Value : string.Empty;
 }
Beispiel #12
0
 public static void FormatAttribute(this Cell cell, CellAttribute key, StringBuilder input)
 {
     if (cell.Attributes.ContainsKey(key)) cell.Attributes[key].Format(cell, input);
 }
Beispiel #13
0
 public static void ClearAttribute(this Cell cell, CellAttribute key)
 {
     cell.Attributes.Remove(key);
 }
Beispiel #14
0
 public static CellAttributeValue Make(CellAttribute attribute)
 {
     return factories.ContainsKey(attribute)
         ? factories[attribute](attribute)
         : new CellAttributeValue();
 }
Beispiel #15
0
 /// <summary>
 /// Initializes a new instance of theTennis_Management_Software.Timetabling.Visualization.Cell class.
 /// </summary>
 /// <param name="attribute">The attribute to set.</param>
 public Cell(CellAttribute attribute)
 {
     InitializeComponent();
     this.textLabel.Text = string.Empty;
     this.Attribute      = attribute;
 }
Beispiel #16
0
 public void ToNumber()
 {
     cellAttribute = CellAttribute.NUMBER;
 }
Beispiel #17
0
 public bool HasAttribute(CellAttribute key)
 {
     return(attributes == null ? false : attributes.ContainsKey(key));
 }
Beispiel #18
0
 public bool HasAttribute(CellAttribute key)
 {
     return(baseCell.HasAttribute(key));
 }
Beispiel #19
0
 public static void ClearAttribute(this Cell cell, CellAttribute key)
 {
     cell.Attributes.Remove(key);
 }
Beispiel #20
0
 public string GetAttribute(CellAttribute key)
 {
     return(baseCell.GetAttribute(key));
 }
Beispiel #21
0
 public static bool HasAttribute(this Cell cell, CellAttribute key)
 {
     return(cell.Attributes.ContainsKey(key));
 }
Beispiel #22
0
 public void SetAttribute(CellAttribute key, string value)
 {
     baseCell.SetAttribute(key, value);
 }
Beispiel #23
0
 public static CellAttributeValue Make(CellAttribute attribute)
 {
     return(factories.ContainsKey(attribute)
         ? factories[attribute]()
         : new CellAttributeValue());
 }
Beispiel #24
0
 public void AddToAttribute(CellAttribute key, string value)
 {
     baseCell.AddToAttribute(key, value);
 }
Beispiel #25
0
 public string GetAttribute(CellAttribute key)
 {
     return baseCell.GetAttribute(key);
 }
Beispiel #26
0
 public void ClearAttribute(CellAttribute key)
 {
     if (attributes == null) return;
     attributes.Remove(key);
 }
Beispiel #27
0
 public void SetAttribute(CellAttribute key, string value)
 {
     baseCell.SetAttribute(key, value);
 }
Beispiel #28
0
 public void AddToAttribute(CellAttribute key, string value)
 {
     SetAttribute(key, string.Format(
                      key == CellAttribute.InformationPrefix ? PrefixFormat : SuffixFormat,
                      GetAttribute(key), value));
 }
Beispiel #29
0
 public string GetAttribute(CellAttribute key)
 {
     return HasAttribute(key) ? attributes[key] : string.Empty;
 }
Beispiel #30
0
 public string GetAttribute(CellAttribute key)
 {
     return(HasAttribute(key) ? attributes[key] : string.Empty);
 }
Beispiel #31
0
 public void SetAttribute(CellAttribute key, string value)
 {
     if (attributes == null) attributes = new Dictionary<CellAttribute, string>();
     attributes[key] = value;
 }
Beispiel #32
0
 public void ToBomb()
 {
     cellAttribute = CellAttribute.BOMB;
 }