Esempio n. 1
0
        private void SetFrameToCtrller(SignSetTextFrame f, byte frmId, byte frmRev)
        {
            f.frameId  = frmId;
            f.frameRev = frmRev;
            if (cbFrmColour.SelectedIndex < 0 || cbFrmColour.SelectedIndex > 9)
            {
                throw new Exception("Illegal colour");
            }
            f.colour = (FrameColour)Enum.Parse(typeof(FrameColour), cbFrmColour.SelectedValue.ToString());
            f.cd     = (ConspicuityDevices)Enum.Parse(typeof(ConspicuityDevices), cbFrmConspicuity.SelectedValue.ToString());
            f.font   = (ITS_FONT_SIZE)Enum.Parse(typeof(ITS_FONT_SIZE), cbFrmFont.SelectedValue.ToString());



            // todo : font width
            RemoteControllerLink ctrl = remoteConctrollerLinks[parameters.ControllerID];
            ControllerReply      rpl;

            lock (ctrl)
            {
                rpl = ctrl.SignSetTextFrame(f);
            }
            if (rpl.status != ControllerReply.Status.SUCCESS)
            {
                MessageBox.Show(rpl.status.ToString());
            }
        }
Esempio n. 2
0
        private void LoadFrame(SignSetTextFrame f)
        {
            gridFrmFrameContent.Children.Clear();
            //            gridFrmFrameContent.Children.Add(canvas);

            cbFrmFrameType.SelectedIndex   = 0;
            tbFrmFrameRev.Text             = f.frameRev.ToString();
            cbFrmFont.SelectedIndex        = (int)f.font;
            cbFrmColour.SelectedValue      = f.colour.ToString();
            cbFrmConspicuity.SelectedValue = ((ConspicuityDevices)f.conspicuity).ToString();
            switch (f.font)
            {
            case TsiSp003.RtaFont.ITS_FONT_SIZE.FONT_DEFAULT:
                break;

            default:
                break;
            }
        }