Esempio n. 1
0
        //This version of RunValidation is to be used when the file is already opened by other process and you have the handle
        //i.e. , this is used when the validation is called from the ValInterface.dll
        //The file name is needed just for the path of the report file
        public int RunValidation(Validator v, string fpath, SafeFileHandle hFile)
        {
            int ret = 0;

            v.SetOnValidateEvent(new
                                 Validator.OnValidateEvent(OnValidateEvent));
            // enable us to receive validation info messages
            DIAction vid = new DIAction(ValidatorCallback);

            v.SetValInfoDelegate(vid);

            try
            {
                // check to see if the user canceled validation
                if (v.CancelFlag)
                {
                    m_callbacks.OnCancel();
                    return(ret);
                }

                ret |= ValidateFont(v, fpath, hFile, 0, 1);
                m_callbacks.OnReportsReady();
            }
            catch (Exception e)
            {
                m_callbacks.OnException(e);
                return(1);
            }

            return(ret);
        }
Esempio n. 2
0
        //Validates a list of font files...meant to be used by the Font Validator UI and the command line
        public int RunValidation(Validator v, string [] fontList)
        {
            int i;
            int ret = 0;

            // setup notification for validation events
            v.SetOnValidateEvent(new
                                 Validator.OnValidateEvent(OnValidateEvent));
            // enable us to receive validation info messages
            DIAction vid = new DIAction(ValidatorCallback);

            v.SetValInfoDelegate(vid);

            try
            {
                for (i = 0; i < fontList.Length; i++)
                {
                    // check to see if the user canceled validation
                    if (v.CancelFlag)
                    {
                        m_callbacks.OnCancel();
                        return(ret);
                    }

                    ret |= ValidateFont(v, fontList[i], null, i, fontList.Length);
                }
                m_callbacks.OnReportsReady();
            }
            catch (Exception e)
            {
                m_callbacks.OnException(e);
                return(1);
            }

            return(ret);
        }
Esempio n. 3
0
        //This version of RunValidation is to be used when the file is already opened by other process and you have the handle
        //i.e. , this is used when the validation is called from the ValInterface.dll
        //The file name is needed just for the path of the report file
        public int RunValidation(Validator v, string fpath,SafeFileHandle hFile)
        {
            int ret = 0;
            v.SetOnValidateEvent(new
                    Validator.OnValidateEvent(OnValidateEvent));
            // enable us to receive validation info messages
            DIAction vid = new DIAction(ValidatorCallback);
            v.SetValInfoDelegate(vid);

            try
            {
                // check to see if the user canceled validation
                if (v.CancelFlag)
                {
                    m_callbacks.OnCancel();
                    return ret;
                }

                ret |= ValidateFont(v, fpath, hFile, 0, 1);
                m_callbacks.OnReportsReady();
            }
            catch (Exception e)
            {
                m_callbacks.OnException(e);
                return 1;
            }

            return ret;

        }
Esempio n. 4
0
        //Validates a list of font files...meant to be used by the Font Validator UI and the command line
        public int RunValidation( Validator v, string [] fontList )
        {
            int i;
            int ret = 0;
            // setup notification for validation events
            v.SetOnValidateEvent(new
                                 Validator.OnValidateEvent(OnValidateEvent));
            // enable us to receive validation info messages
            DIAction vid = new DIAction(ValidatorCallback);
            v.SetValInfoDelegate(vid);

            try
            {
                for (i = 0; i < fontList.Length; i++)
                {
                    // check to see if the user canceled validation
                    if (v.CancelFlag)
                    {
                        m_callbacks.OnCancel();
                        return ret;
                    }

                    ret |= ValidateFont(v, fontList[i], null, i, fontList.Length);
                }
                m_callbacks.OnReportsReady();
            }
            catch (Exception e)
            {
                m_callbacks.OnException(e);
                return 1;
            }

            return ret;

        }