| | |
| | | {
|
| | | public class PanelBackLighWithSensorForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________ |
| | | #region ■ 变量声明___________________________
|
| | | /// <summary>
|
| | | /// 列表控件
|
| | | /// </summary>
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 节能模式行_________________________ |
| | | #region ■ 节能模式行_________________________
|
| | | /// <summary>
|
| | | /// 添加节能模式行
|
| | | /// </summary>
|
| | |
| | | int B1 = Convert.ToInt32(this.keyColorData.CloseColorB, 16);
|
| | | uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
|
| | |
|
| | | //颜色外框 |
| | | //颜色外框
|
| | | var btnColorLine = new FrameLayoutStatuControl();
|
| | | btnColorLine.Width = Application.GetRealHeight(79);
|
| | | btnColorLine.Height = this.GetPictrueRealSize(79);
|
| | |
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | { |
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | }; |
| | | }; |
| | | btnColorView.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | }; |
| | | };
|
| | | btnColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | }; |
| | | };
|
| | | btnColorLine.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | }; |
| | | };
|
| | | btnRight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// PanelColorBefore
|
| | | /// </summary>
|
| | | private void PanelColor(NormalViewControl btnColor, SeekBarControl seekBar1, int R1, int G1, int B1)
|
| | | {
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | |
|
| | | this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | { |
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | }; |
| | | };
|
| | | btnColorView.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | }; |
| | | };
|
| | | btnColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | }; |
| | | };
|
| | | btnColorLine.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | }; |
| | | };
|
| | | btnRight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | } |
| | | }
|
| | | #endregion
|
| | | |
| | | #region ■ 获取初始数据_______________________
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 补充容器___________________________ |
| | | #region ■ 补充容器___________________________
|
| | | /// <summary>
|
| | | /// 行数超过容器时,补一个空白FrameLayout,使之能滑动
|
| | | /// </summary>
|
| | |
| | | return (uint)(0xFF000000 + R * 256 * 256 + G * 256 + B);
|
| | | }
|
| | |
|
| | | #endregion |
| | | #endregion
|
| | | }
|
| | | }
|