12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using DevExpress.XtraEditors;
- namespace Uninpho.Railway.Waveform
- {
- public partial class MessageFrm : DevExpress.XtraEditors.XtraForm
- {
- private CoorListClass coormess;
- RightLabelControl rightlabctrl;
- DrawCrl frm;
- int R = 0;
- int G = 0;
- int B = 0;
- int A = 1;
- public MessageFrm()
- {
- InitializeComponent();
- }
- public MessageFrm(CoorListClass mess, DrawCrl frm, RightLabelControl rightlabctrl_)
- {
- InitializeComponent();
- this.frm = frm;
- this.rightlabctrl = rightlabctrl_;
- this.coormess = mess;
- this.Text = "通道信息-" + coormess.ListName;
- ChineseLabel.Text = coormess.ListId;
- ScaleText.Text = coormess.Scale.ToString();
- OffsetText.Text = (coormess.Offset * 100).ToString();
- WidthText.Text = coormess.Width.ToString();
- colorPickEdit1.Color = Color.FromArgb(coormess.RGBA[3], coormess.RGBA[0], coormess.RGBA[1], coormess.RGBA[2]);
- }
-
-
-
-
-
- private void colorPickEdit1_ColorChanged(object sender, EventArgs e)
- {
-
-
-
-
- coormess.RGBA[0] = R = (int)colorPickEdit1.Color.R;
- coormess.RGBA[1] = G = (int)colorPickEdit1.Color.G;
- coormess.RGBA[2] = B = (int)colorPickEdit1.Color.B;
- coormess.RGBA[3] = A = (int)colorPickEdit1.Color.A;
- }
- private void OkBtn_Click(object sender, EventArgs e)
- {
-
- coormess.Scale = Convert.ToDouble(ScaleText.Text.Trim());
- coormess.Width = Convert.ToInt32(WidthText.Text.Trim());
-
- rightlabctrl.changeRGBLine(R, G, B, A);
- frm.updataWaveInput(coormess);
- }
- private void CancelBtn_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- }
- }
|