//──────────────────────────────────────── /// <summary> /// ブラシの再利用。 /// </summary> /// <param name="nStyle"></param> /// <returns></returns> public Brush GetByStyle(XenonStyle xenonStyle) { if (null == this.dictionary_Brush) { this.dictionary_Brush = new Dictionary <string, Brush>(); } if (this.dictionary_Brush.ContainsKey(xenonStyle.ForeXenonColor.Name_Color)) { return(this.dictionary_Brush[xenonStyle.ForeXenonColor.Name_Color]); } // // 指定の色のブラシを作成。 Brush brush = new SolidBrush(xenonStyle.ForeXenonColor.Color); this.dictionary_Brush[xenonStyle.ForeXenonColor.Name_Color] = brush; return(brush); }
//──────────────────────────────────────── /// <summary> /// ブラシの再利用。 /// </summary> /// <param name="nStyle"></param> /// <returns></returns> public Brush GetByStyle(XenonStyle xenonStyle) { if (null == this.dictionary_Brush) { this.dictionary_Brush = new Dictionary<string, Brush>(); } if (this.dictionary_Brush.ContainsKey(xenonStyle.ForeXenonColor.Name_Color)) { return this.dictionary_Brush[xenonStyle.ForeXenonColor.Name_Color]; } // // 指定の色のブラシを作成。 Brush brush = new SolidBrush(xenonStyle.ForeXenonColor.Color); this.dictionary_Brush[xenonStyle.ForeXenonColor.Name_Color] = brush; return brush; }