2024年5月31日发(作者:)

109 ///

110 int intColorIndex = 0;

111 ///

112 /// The m rect working

113 ///

114 Rectangle m_rectWorking;

115 ///

116 /// Initializes a new instance of the class.

117 ///

118 public UCAlarmLamp()

119 {

120 le(ntingInWmPaint, true);

121 le(Buffer, true);

122 le(Redraw, true);

123 le(able, true);

124 le(tsTransparentBackColor, true);

125 le(int, true);

126 aleMode = ;

127 anged += UCAlarmLamp_SizeChanged;

128 = new Size(50, 50);

129 timer = new Timer();

130 al = 200;

131 += timer_Tick;

132 }

133

134 ///

135 /// Handles the SizeChanged event of the UCAlarmLamp control.

136 ///

137 /// The source of the event.

138 /// The instance containing the event data.

139 void UCAlarmLamp_SizeChanged(object sender, EventArgs e)

140 {

141 m_rectWorking = new Rectangle(10, 0, - 20, );

142 }

143 ///

144 /// Handles the Tick event of the timer control.

145 ///

146 /// The source of the event.

147 /// The instance containing the event data.

148 void timer_Tick(object sender, EventArgs e)

149 {

150 intColorIndex++;

151 if (intColorIndex >= )

152 intColorIndex = 0;

153 Refresh();

154 }

155 ///

156 /// 引发 事件。

157 ///

158 /// 包含事件数据的

159 protected override void OnPaint(PaintEventArgs e)

160 {

161 t(e);

162 var g = cs;

163 High();

164

165 Color c1 = lampColor[intColorIndex];

166 GraphicsPath path = new GraphicsPath();

167 e(new Point(m_, m_), new Point(m_, m_ + m_));

168 (new Rectangle(m_, m_, m_, m_), 180f, 180f);

169 e(new Point(m_, m_ + m_), new Point(m_, m_));

170 llFigures();

171 th(new SolidBrush(c1), path);

172

173 ctangle(new SolidBrush(lampstand), new Rectangle(5, m_ - 19, - 10, 10));

174 ctangle(new SolidBrush(lampstand), new Rectangle(0, m_ - 10, , 10));

175 }

176 }

177 }

最后的话

标签: