Ejemplo n.º 1
0
        /*
         * override internal void setKeyList(List<ONKEY_EVENT> keyList, List<ON_ACTION_EVENT> actionList, UIContext currContext)
         * {
         *
         *  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;
         *      }
         *  }
         *
         * }
         */

        public FGLLabelFieldWidget(AubitDesktop.Xml.XMLForm.FormField ff, AubitDesktop.Xml.XMLForm.Label label, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ff);
            createWidget(a, ma, Convert.ToInt32(label.posY), index, Convert.ToInt32(label.posX), 1, Convert.ToInt32(label.gridWidth), "", config, -1, ff.sqlTabName + "." + ff.colName, label.action, Convert.ToInt32(ff.fieldId), ff.include, label.text);
            setPixelSize(label.pixelWidth, label.pixelHeight);
            if (label.justify != null && label.justify.Length > 0)
            {
                if (label.justify == "left")
                {
                    l.TextAlign = ContentAlignment.MiddleLeft;
                }
                if (label.justify == "right")
                {
                    l.TextAlign = ContentAlignment.MiddleRight;
                }
                if (label.justify == "center")
                {
                    l.TextAlign = ContentAlignment.MiddleCenter;
                }
            }
            if (label.fontPitch == "fixed")
            {
                l.Font = new Font(FontFamily.GenericMonospace, l.Font.Size);;
            }
        }
        public FGLCheckboxFieldWidget(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.CheckBox cbox, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ffx);

            if (ffx.notNull != null && ffx.notNull == "1")
            {
                notNull = true;
            }
            else
            {
                notNull = false;
            }


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


            createCheckBoxWidget(a, ma,
                                 Convert.ToInt32(cbox.posY), index, Convert.ToInt32(cbox.posX), Convert.ToInt32(cbox.gridWidth), "", config, -1, ffx.sqlTabName + "." + ffx.colName, cbox.action, Convert.ToInt32(ffx.fieldId), ffx.include, cbox.text);

            setPixelSize(cbox.pixelWidth, cbox.pixelHeight);

            this.strTrue          = cbox.valueChecked;
            this.strFalse         = cbox.valueUnchecked;
            this.strIndeterminate = "";
            adjustDisplayPropertiesForContext();
        }
Ejemplo n.º 3
0
        internal ATTRIB createAttribForWidget(AubitDesktop.Xml.XMLForm.FormField ff)
        {
            ATTRIB a = new ATTRIB();


            if (ff.noEntry != null)
            {
                a.ATTRIB_NOENTRY = new ATTRIB_NOENTRY();
            }
            if (ff.required != null)
            {
                a.ATTRIB_REQUIRED = new ATTRIB_REQUIRED();
            }

            if (ff.hidden != null)
            {
                a.ATTRIB_INVISIBLE = new ATTRIB_INVISIBLE();
            }
            if (ff.sqlType != null)
            {
                a.DATATYPE      = decode_datatype(ff.sqlType).ToString();
                a.DATATYPE_SIZE = decode_datatype_size(ff.sqlType).ToString();
            }
            a.ATTRIBUTE_NO = ff.fieldId;



            if (ff.defaultValue != null)
            {
                a.ATTRIB_DEFAULT      = new ATTRIB_DEFAULT();
                a.ATTRIB_DEFAULT.Text = ff.defaultValue;
            }

            return(a);
        }
Ejemplo n.º 4
0
        public FGLDateFieldWidget(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.DateEdit edit, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

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



            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();
            }



            createTextWidget(a, ma, Convert.ToInt32(edit.posY), index, Convert.ToInt32(edit.posX), 1, Convert.ToInt32(edit.gridWidth), "", edit.config, -1, ffx.sqlTabName + "." + ffx.colName, "", Convert.ToInt32(ffx.fieldId), ffx.include, false, "");
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
        public FGLPixmapFieldWidget(AubitDesktop.Xml.XMLForm.FormField ff, AubitDesktop.Xml.XMLForm.Image pixmap, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ff);


            createWidget(a, ma, Convert.ToInt32(pixmap.posY), index, Convert.ToInt32(pixmap.posX), 1, Convert.ToInt32(pixmap.gridWidth), "", config, -1, ff.sqlTabName + "." + ff.colName, pixmap.action, Convert.ToInt32(ff.fieldId), ff.include);
            setPixelSize(pixmap.pixelWidth, pixmap.pixelHeight);
        }
Ejemplo n.º 8
0
        public FGLLabelFieldWidget(AubitDesktop.Xml.XMLForm.FormField ff, AubitDesktop.Xml.XMLForm.RipLABEL label, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ff);
            createWidget(a, ma, Convert.ToInt32(label.posY), index, Convert.ToInt32(label.posX), 1, Convert.ToInt32(label.gridWidth), "", config, -1, ff.sqlTabName + "." + ff.colName, "", Convert.ToInt32(ff.fieldId), ff.include, "");
            setPixelSize(label.pixelWidth, label.pixelHeight);
            if (label.fontPitch == "fixed")
            {
                l.Font = new Font(FontFamily.GenericMonospace, l.Font.Size);;
            }
        }
Ejemplo n.º 9
0
        public FGLTextFieldWidget(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.Edit edit, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

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


            if (edit.picture != null)
            {
                a.ATTRIB_PICTURE      = new ATTRIB_PROGRAM();
                a.ATTRIB_PICTURE.Text = edit.picture;
            }



            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), "", edit.config, -1, ffx.sqlTabName + "." + ffx.colName, edit.action, Convert.ToInt32(ffx.fieldId), ffx.include, false, "");
            setPixelSize(edit.pixelWidth, edit.pixelHeight);
            if (edit.fontPitch == "fixed")
            {
                t.Font = new Font(FontFamily.GenericMonospace, t.Font.Size);
                //lblInsteadOfTxtBox.Font = t.Font;
            }
        }
Ejemplo n.º 10
0
        public FGLBrowserFieldWidget(AubitDesktop.Xml.XMLForm.FormField ff, AubitDesktop.Xml.XMLForm.Browser browser, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ff);

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


            createWidget(a, ma, Convert.ToInt32(browser.posY), index, Convert.ToInt32(browser.posX), 1, Convert.ToInt32(browser.gridWidth), "", config, -1, ff.sqlTabName + "." + ff.colName, "", Convert.ToInt32(ff.fieldId), ff.include);

            setPixelSize(browser.pixelWidth, browser.pixelHeight);
        }
        public FGLComboBoxFieldWidget(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.ComboBox cbox, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ffx);
            if (cbox.format != null)
            {
                a.ATTRIB_FORMAT      = new ATTRIB_FORMAT();
                a.ATTRIB_FORMAT.Text = cbox.format;
            }



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

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

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


            createComboBoxWidget(a, ma,
                                 Convert.ToInt32(cbox.posY), index, Convert.ToInt32(cbox.posX), 1, Convert.ToInt32(cbox.gridWidth), "", config, -1, ffx.sqlTabName + "." + ffx.colName, cbox.action, Convert.ToInt32(ffx.fieldId), ffx.include, cbox.text);
            adjustDisplayPropertiesForContext();
            setPixelSize(cbox.pixelWidth, cbox.pixelHeight);
        }
Ejemplo n.º 12
0
        public FGLRadioFieldWidget(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.RipRADIO cbox, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            AubitDesktop.Xml.XMLForm.Radio cnew;
            cnew = new AubitDesktop.Xml.XMLForm.Radio();


            cnew.action      = cbox.action;
            cnew.autoNext    = cbox.autoNext;
            cnew.comments    = cbox.comments;
            cnew.config      = cbox.config;
            cnew.format      = cbox.format;
            cnew.gridWidth   = cbox.gridWidth;
            cnew.posX        = cbox.posX;
            cnew.posY        = cbox.posY;
            cnew.shift       = cbox.shift;
            cnew.width       = cbox.width;
            cnew.pixelHeight = cbox.pixelHeight;
            cnew.pixelWidth  = cbox.pixelWidth;
            List <string> items = FGLUtils.splitConfig(config);

            if (items.Count == 0)
            {
                cnew.Items = new AubitDesktop.Xml.XMLForm.Item[0];
            }
            else
            {
                int b = 0;
                cnew.Items = new AubitDesktop.Xml.XMLForm.Item[(items.Count + 1) / 2];
                for (int a = 0; a < cnew.Items.Length; a++)
                {
                    cnew.Items[a]      = new AubitDesktop.Xml.XMLForm.Item();
                    cnew.Items[a].name = items[b++];
                    if (b < items.Count)
                    {
                        cnew.Items[a].text = items[b++];
                    }
                }
            }

            makeRadio(ffx, cnew, config, index, ma);
        }
Ejemplo n.º 13
0
        public FGLProgressBarFieldWidget(AubitDesktop.Xml.XMLForm.FormField ff, AubitDesktop.Xml.XMLForm.ProgressBar xmlPb, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ff);
            createWidget(a, ma, Convert.ToInt32(xmlPb.posY), index, Convert.ToInt32(xmlPb.posX), 1, Convert.ToInt32(xmlPb.gridWidth), "", config, -1, ff.sqlTabName + "." + ff.colName, "", Convert.ToInt32(ff.fieldId), ff.include);
            this.pb.Enabled = true;
            this.pb.Visible = true;
            if (xmlPb.valueMax != null)
            {
                this.pb.Maximum = Convert.ToInt32(xmlPb.valueMax);
            }

            if (xmlPb.valueMin != null)
            {
                this.pb.Minimum = Convert.ToInt32(xmlPb.valueMin);
            }


            if (configSettings.ContainsKey("MAX"))
            {
                this.pb.Maximum = Convert.ToInt32((string)configSettings["MAX"]);
            }
            if (configSettings.ContainsKey("MIN"))
            {
                this.pb.Minimum = Convert.ToInt32((string)configSettings["MIN"]);
            }
            if (configSettings.ContainsKey("MAXIMUM"))
            {
                this.pb.Maximum = Convert.ToInt32((string)configSettings["MAXIMUM"]);
            }
            if (configSettings.ContainsKey("MINIMUM"))
            {
                this.pb.Minimum = Convert.ToInt32((string)configSettings["MINIMUM"]);
            }

            setPixelSize(xmlPb.pixelWidth, xmlPb.pixelHeight);
        }
Ejemplo n.º 14
0
        private void makeRadio(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.Radio cbox, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
        {
            ATTRIB a;

            a = createAttribForWidget(ffx);

            //if (ffx.notNull != null && ffx.notNull == "1") notNull = true;
            //else notNull = false;


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


            createRadioButtonWidget(a, ma,
                                    Convert.ToInt32(cbox.posY), index, Convert.ToInt32(cbox.posX), Convert.ToInt32(cbox.gridWidth), "", config, -1, ffx.sqlTabName + "." + ffx.colName, cbox.action, Convert.ToInt32(ffx.fieldId), ffx.include, cbox);


            adjustDisplayPropertiesForContext();
        }
Ejemplo n.º 15
0
 public FGLRadioFieldWidget(AubitDesktop.Xml.XMLForm.FormField ffx, AubitDesktop.Xml.XMLForm.Radio cbox, string config, int index, AubitDesktop.Xml.XMLForm.Matrix ma)
 {
     makeRadio(ffx, cbox, config, index, ma);
     setPixelSize(cbox.pixelWidth, cbox.pixelHeight);
 }