Beispiel #1
0
        /*
         * override internal void setKeyList(List<ONKEY_EVENT> keyList, List<ON_ACTION_EVENT> actionList, UIContext currContext)
         * {
         *
         *  if (Action == "") return;
         *  if (Action == null) return;
         *
         *  onActionID = "";
         *
         *  foreach (ONKEY_EVENT a in keyList)
         *  {
         *      if (Convert.ToInt32(a.KEY) == FGLUtils.getKeyCodeFromKeyName(Action))
         *      {
         *          // The action is really a fake keypress...
         *          onActionID = a.ID;
         *
         *
         *
         *          break;
         *      }
         *  }
         *
         *  foreach (ON_ACTION_EVENT a in actionList) {
         *      if (a.ACTION.ToLower() == Action.ToLower())
         *      {
         *          onActionID = a.ID;
         *      }
         *  }
         *
         *  ContextTypeChanged();
         *
         * }
         */

        public FGLButtonFieldWidget(AubitDesktop.Xml.XMLForm.FormField ff, AubitDesktop.Xml.XMLForm.ButtonEdit button, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ff);


            createWidget(a, ma, Convert.ToInt32(button.posY), index, Convert.ToInt32(button.posX), 1, Convert.ToInt32(button.gridWidth), "", config, -1, ff.sqlTabName + "." + ff.colName, button.action, Convert.ToInt32(ff.fieldId), ff.include, button.text);
        }
        public FGLDateFieldWidget(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.ButtonEdit edit, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;
            string action = "";
            string image  = "";

            a = createAttribForWidget(ffx);


            if (edit.format != null)
            {
                a.ATTRIB_FORMAT      = new ATTRIB_FORMAT();
                a.ATTRIB_FORMAT.Text = edit.format;
            }

            if (edit.action != null)
            {
                action = (string)edit.action;
            }

            if (edit.image != null)
            {
                image = (string)edit.image;
            }

            if (edit.comments != null)
            {
                a.ATTRIB_COMMENTS      = new ATTRIB_COMMENTS();
                a.ATTRIB_COMMENTS.Text = edit.comments;
            }

            if (edit.autoNext != null && edit.autoNext == "1")
            {
                a.ATTRIB_AUTONEXT = new ATTRIB_AUTONEXT();
            }

            if (edit.shift != null)
            {
                if (edit.shift == "down")
                {
                    a.ATTRIB_DOWNSHIFT = new ATTRIB_DOWNSHIFT();
                }
                else
                {
                    a.ATTRIB_UPSHIFT = new ATTRIB_UPSHIFT();
                }
            }


            createTextWidget(a, ma,
                             Convert.ToInt32(edit.posY), index,
                             Convert.ToInt32(edit.posX), 1, Convert.ToInt32(edit.gridWidth),
                             Widget, config,
                             -1, ffx.sqlTabName + "." + ffx.colName,
                             action, Convert.ToInt32(ffx.fieldId), ffx.include, true, image);
        }
        public FGLTextFieldWidget(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.ButtonEdit edit, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;
            string action = "";
            string image  = "";

            a = createAttribForWidget(ffx);


            if (edit.format != null)
            {
                a.ATTRIB_FORMAT      = new ATTRIB_FORMAT();
                a.ATTRIB_FORMAT.Text = edit.format;
            }

            if (edit.action != null)
            {
                action = (string)edit.action;
            }

            if (edit.image != null)
            {
                image = (string)edit.image;
            }

            if (edit.comments != null)
            {
                a.ATTRIB_COMMENTS      = new ATTRIB_COMMENTS();
                a.ATTRIB_COMMENTS.Text = edit.comments;
            }

            if (edit.autoNext != null && edit.autoNext == "1")
            {
                a.ATTRIB_AUTONEXT = new ATTRIB_AUTONEXT();
            }

            if (edit.shift != null)
            {
                if (edit.shift == "down")
                {
                    a.ATTRIB_DOWNSHIFT = new ATTRIB_DOWNSHIFT();
                }
                else
                {
                    a.ATTRIB_UPSHIFT = new ATTRIB_UPSHIFT();
                }
            }


            createTextWidget(a, ma,
                             Convert.ToInt32(edit.posY), index,
                             Convert.ToInt32(edit.posX), 1, Convert.ToInt32(edit.gridWidth),
                             Widget, config,
                             -1, ffx.sqlTabName + "." + ffx.colName,
                             action, Convert.ToInt32(ffx.fieldId), ffx.include, true, image);

            setPixelSize(edit.pixelWidth, edit.pixelHeight);

            if (edit.fontPitch == "fixed")
            {
                t.Font = new Font(FontFamily.GenericMonospace, t.Font.Size);
                //lblInsteadOfTxtBox.Font = t.Font;
            }
        }