コード例 #1
0
        CaptionEditBox GenCaptionTextBox(EmrAppConfig eac)
        {
            CaptionEditBox ctb = null;

            switch (eac.Ptype)
            {
            case ConfigParamType.Double:
                ctb = new CaptionDoubleBox();
                break;

            case ConfigParamType.Integer:
                ctb = new CaptionIntBox();
                break;

            case ConfigParamType.Color:
                ctb = new CaptionColorBox();
                break;

            default:
                ctb = new CaptionTextBox();
                break;
            }
            ctb.Caption        = eac.Descript;
            ctb.Config         = eac.Config;
            ctb.ConfigChanged += new EventHandler(ctb_ConfigChanged);
            return(ctb);
        }
コード例 #2
0
        void ctb_ConfigChanged(object sender, EventArgs e)
        {
            CaptionEditBox ctb = sender as CaptionEditBox;

            if (ctb == null)
            {
                return;
            }
            EmrAppConfig eac = ctb.Tag as EmrAppConfig;

            if (eac == null)
            {
                return;
            }
            eac.Config = ctb.Config;
            ValidateUpdateConfigs(eac);
        }