//--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // l o a d D a t a C o m m o n                                        //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Retrieve stored FormSample common data.                            //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void loadDataCommon(ref Int32 indxPDL)
        {
            RegistryKey keyMain =
                Registry.CurrentUser.CreateSubKey(_mainKey);

            String key = _subKeyTools + "\\" + _subKeyToolsFormSample;

            using (RegistryKey subKey = keyMain.CreateSubKey(key))
            {
                if (Helper_RegKey.keyExists(subKey, _subKeyPCL5))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey, _subKeyPCL5, _subKeyPCL);
                }

                if (Helper_RegKey.keyExists(subKey, _subKeyPCL6))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey, _subKeyPCL6, _subKeyPCLXL);
                }

                indxPDL = (Int32)subKey.GetValue(_nameIndxPDL,
                                                 _indexZero);
            }
        }
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // l o a d D a t a C o m m o n                                        //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Retrieve stored PDLData common data.                               //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void loadDataCommon(ref Int32 indxInfoType,
                                          ref String reportFile)
        {
            RegistryKey keyMain =
                Registry.CurrentUser.CreateSubKey(_mainKey);

            String key = _subKeyTools + "\\" + _subKeyToolsPrintLang;

            String defWorkFolder = ToolCommonData.DefWorkFolder;

            using (RegistryKey subKey = keyMain.CreateSubKey(_subKeyTools))
            {
                if (Helper_RegKey.keyExists(subKey, _subKeyToolsPDLData))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey,
                                            _subKeyToolsPDLData,
                                            _subKeyToolsPrintLang);
                }
            }

            using (RegistryKey subKey = keyMain.CreateSubKey(key))
            {
                indxInfoType = (Int32)subKey.GetValue(_nameIndxInfoType,
                                                      _indexZero);

                reportFile = (String)subKey.GetValue(_nameReportFile,
                                                     defWorkFolder + "\\" +
                                                     _defaultFilename);
            }
        }
Exemplo n.º 3
0
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // l o a d D a t a C o m m o n                                        //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Retrieve stored common data.                                       //
        // Missing items are given default values.                            //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void loadDataCommon(ref String prnFilename)
        {
            RegistryKey keyMain =
                Registry.CurrentUser.CreateSubKey(_mainKey);

            String key = _subKeyTools + "\\" + _subKeyToolsMakeOverlay;

            String defWorkFolder = ToolCommonData.DefWorkFolder;

            using (RegistryKey subKey = keyMain.CreateSubKey(key))
            {
                if (Helper_RegKey.keyExists(subKey, _subKeyPCL5))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey, _subKeyPCL5, _subKeyPCL);
                }

                if (Helper_RegKey.keyExists(subKey, _subKeyPCL6))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey, _subKeyPCL6, _subKeyPCLXL);
                }

                prnFilename = (String)subKey.GetValue(_namePrnFilename,
                                                      defWorkFolder + "\\" +
                                                      _defaultPrnFilename);
            }
        }
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // l o a d D a t a C o m m o n                                        //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Retrieve stored Bitmap common data.                                //
        // Missing items are given default values.                            //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void loadDataCommon(ref Int32 indxPDL,
                                          ref String filename,
                                          ref Int32 destPosX,
                                          ref Int32 destPosY,
                                          ref Int32 destScaleX,
                                          ref Int32 destScaleY,
                                          ref Int32 indxRasterRes)
        {
            RegistryKey keyMain =
                Registry.CurrentUser.CreateSubKey(_mainKey);

            String key = _subKeyTools + "\\" + _subKeyToolsImageBitmap;

            String defWorkFolder = ToolCommonData.DefWorkFolder;

            using (RegistryKey subKey = keyMain.CreateSubKey(key))
            {
                if (Helper_RegKey.keyExists(subKey, _subKeyPCL5))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey, _subKeyPCL5, _subKeyPCL);
                }

                if (Helper_RegKey.keyExists(subKey, _subKeyPCL6))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey, _subKeyPCL6, _subKeyPCLXL);
                }

                indxPDL = (Int32)subKey.GetValue(_nameIndxPDL,
                                                 _indexZero);

                filename = (String)subKey.GetValue(_nameFilename,
                                                   defWorkFolder + "\\" +
                                                   _defaultFilename);

                destPosX = (Int32)subKey.GetValue(_nameCoordX,
                                                  _defaultCoord);

                destPosY = (Int32)subKey.GetValue(_nameCoordY,
                                                  _defaultCoord);

                destScaleX = (Int32)subKey.GetValue(_nameScaleX,
                                                    _defaultScale);

                destScaleY = (Int32)subKey.GetValue(_nameScaleY,
                                                    _defaultScale);

                indxRasterRes = (Int32)subKey.GetValue(_nameIndxRasterRes,
                                                       _indexZero);
            }
        }
Exemplo n.º 5
0
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // l o a d D a t a N e t P r i n t e r                                //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Retrieve stored Target network printer data.                       //
        // Missing items are given default values.                            //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void loadDataNetPrinter(ref String ipAddress,
                                              ref Int32 port,
                                              ref Int32 timeoutSend,
                                              ref Int32 timeoutReceive)
        {
            RegistryKey keyMain =
                Registry.CurrentUser.CreateSubKey(_mainKey);

            String key = _subKeyTarget + "\\" + _subKeyTargetNetPrinter;

            //----------------------------------------------------------------//

            using (RegistryKey subKey = keyMain.CreateSubKey(_subKeyTarget))
            {
                if (Helper_RegKey.keyExists(subKey, _subKeyTargetPrinter))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey,
                                            _subKeyTargetPrinter,
                                            _subKeyTargetNetPrinter);
                }
            }

            //----------------------------------------------------------------//

            using (RegistryKey subKey = keyMain.CreateSubKey(key))
            {
                ipAddress = (String)subKey.GetValue(_nameIPAddress,
                                                    _defaultIPAddress);

                port = (Int32)subKey.GetValue(_namePort,
                                              _defaultNetPort);

                timeoutSend = (Int32)subKey.GetValue(_nameTimeoutSend,
                                                     _defaultNetTimeoutSend);

                timeoutReceive = (Int32)subKey.GetValue(_nameTimeoutReceive,
                                                        _defaultNetTimeoutReceive);
            }
        }
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // l o a d D a t a C o m m o n                                        //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Retrieve stored FontSample common data.                            //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void loadDataCommon(ref Int32 indxPDL,
                                          ref Boolean flagLogVerbose)
        {
            RegistryKey keyMain =
                Registry.CurrentUser.CreateSubKey(_mainKey);

            String key = _subKeyTools + "\\" + _subKeyToolsSoftFontGen;

            Int32 tmpInt;

            using (RegistryKey subKey = keyMain.CreateSubKey(key))
            {
                if (Helper_RegKey.keyExists(subKey, _subKeyPCL5))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey, _subKeyPCL5, _subKeyPCL);
                }

                if (Helper_RegKey.keyExists(subKey, _subKeyPCL6))
                {
                    // update from v2_5_0_0
                    Helper_RegKey.renameKey(subKey, _subKeyPCL6, _subKeyPCLXL);
                }

                indxPDL = (Int32)subKey.GetValue(_nameIndxPDL,
                                                 _indexZero);

                tmpInt = (Int32)subKey.GetValue(_nameFlagLogVerbose,
                                                _flagTrue);

                if (tmpInt == _flagFalse)
                {
                    flagLogVerbose = false;
                }
                else
                {
                    flagLogVerbose = true;
                }
            }
        }