Exemplo n.º 1
0
        private bool fnc_GetUrlExclusionList()
        {
            bool   blRes;
            int    intCnt;
            string strExcUrl;

            try
            {
                lst_url_exclustion.Items.Clear();
                intCnt = 0;
                for (intCnt = 0; intCnt < CON_EXT_URL_CNT; intCnt++)
                {
                    strExcUrl = SaveImageCommon.GetIniValue("UrlExclusion", "Key" + (intCnt + 1).ToString("00"), SaveImageCommon.CON_SAVEIMAGE_INI);
                    if (strExcUrl != null && strExcUrl.Trim() != "")
                    {
                        lst_url_exclustion.Items.Add(strExcUrl.Trim());
                    }
                }

                blRes = true;
            }
            catch (Exception ex)
            {
                blRes = false;
                CommonLogger.WriteLine(ex.Message);
            }
            return(blRes);
        }
Exemplo n.º 2
0
        private bool fnc_GetImageVerticalScorllSize()
        {
            bool   blRes;
            string strSize;
            int    intSize;

            try
            {
                // INIファイルから縦スクロールサイズ取得
                strSize = SaveImageCommon.GetIniValue("Option", "VerticalScorllSize", SaveImageCommon.CON_SAVEIMAGE_INI);
                //
                if (int.TryParse(strSize, out intSize) == true)
                {
                    this.pImageVerticalScorllSize = intSize;
                }
                else
                {
                    this.pImageVerticalScorllSize = 0;
                    fnc_SetImageVerticalScorllSize();
                }
                txt_SetVerticalScrollSize.Text = this.pImageVerticalScorllSize.ToString();

                blRes = true;
            }
            catch (Exception ex)
            {
                this.pImageVerticalScorllSize = 0;
                fnc_SetImageVerticalScorllSize();
                blRes = false;
                CommonLogger.WriteLine(ex.Message);
            }
            return(blRes);
        }
Exemplo n.º 3
0
        private bool fnc_GetUrlExclusionList()
        {
            bool   blRes;
            int    intCnt;
            string strUrl;

            try
            {
                this.pUrlExclusionList = new string[CON_COB_URL_CNT];
                intCnt = 0;
                for (intCnt = 0; intCnt < CON_COB_URL_CNT; intCnt++)
                {
                    strUrl = SaveImageCommon.GetIniValue("UrlExclusion", "Key" + (intCnt + 1).ToString("00"), SaveImageCommon.CON_SAVEIMAGE_INI);
                    this.pUrlExclusionList[intCnt] = strUrl;
                }

                blRes = true;
            }
            catch (Exception ex)
            {
                blRes = false;
                CommonLogger.WriteLine(ex.Message);
            }
            return(blRes);
        }
Exemplo n.º 4
0
        private bool fnc_GetUrlList()
        {
            bool   blRes;
            int    intCnt;
            string strUrl;

            try
            {
                intCnt = 0;
                for (intCnt = 0; intCnt < CON_COB_URL_CNT; intCnt++)
                {
                    strUrl = SaveImageCommon.GetIniValue("UrlList", "List" + (intCnt + 1).ToString("00"), SaveImageCommon.CON_SAVEIMAGE_INI);
                    if (strUrl.Trim() != "")
                    {
                        cob_url.Items.Add(strUrl);
                    }
                }

                blRes = true;
            }
            catch (Exception ex)
            {
                blRes = false;
                CommonLogger.WriteLine(ex.Message);
            }
            return(blRes);
        }
Exemplo n.º 5
0
        private bool fnc_GetFormSize()
        {
            bool   blRes;
            string strTemp;
            int    intTop;
            int    intLeft;
            int    intWidth;
            int    intHight;

            try
            {
                intTop   = 0;
                intLeft  = 0;
                intWidth = 0;
                intHight = 0;

                strTemp  = SaveImageCommon.GetIniValue("FormSize", "Top", SaveImageCommon.CON_SAVEIMAGE_INI);
                intTop   = int.Parse(strTemp);
                strTemp  = SaveImageCommon.GetIniValue("FormSize", "Left", SaveImageCommon.CON_SAVEIMAGE_INI);
                intLeft  = int.Parse(strTemp);
                strTemp  = SaveImageCommon.GetIniValue("FormSize", "Width", SaveImageCommon.CON_SAVEIMAGE_INI);
                intWidth = int.Parse(strTemp);
                strTemp  = SaveImageCommon.GetIniValue("FormSize", "Hight", SaveImageCommon.CON_SAVEIMAGE_INI);
                intHight = int.Parse(strTemp);

                if (intTop >= 0 && intLeft >= 0 && intWidth >= 0 && intHight >= 0)
                {
                    this.Top    = intTop;
                    this.Left   = intLeft;
                    this.Width  = intWidth;
                    this.Height = intHight;
                }

                blRes = true;
            }
            catch (Exception ex)
            {
                intTop   = 0;
                intLeft  = 0;
                intWidth = 0;
                intHight = 0;
                blRes    = false;
                CommonLogger.WriteLine(ex.Message);
            }
            return(blRes);
        }
Exemplo n.º 6
0
        private bool fnc_SetImageExtenseCombox()
        {
            bool   blRes;
            string strImageType;

            try
            {
                this.pImageType = "";
                // INIファイルから画像拡張子取得
                strImageType = SaveImageCommon.GetIniValue("Option", "FileExtense", SaveImageCommon.CON_SAVEIMAGE_INI);
                strImageType = strImageType.ToUpper();

                tsb_ImageFile_ExtList.Items.Clear();
                foreach (string strExt in CON_EXTENSE)
                {
                    // 画像拡張子値設定
                    tsb_ImageFile_ExtList.Items.Add(strExt);
                    // デフォルト(ユーザ指定)取得
                    if (this.pImageType == "" && strImageType == strExt)
                    {
                        this.pImageType = strExt;
                    }
                }
                if (this.pImageType == "")
                {
                    this.pImageType = SaveImageCommon.CON_EXTENSE_JPG;
                }

                // 画像拡張子デフォルト(ユーザ指定)値設定
                tsb_ImageFile_ExtList.Text = this.pImageType;

                blRes = true;
            }
            catch (Exception ex)
            {
                // this.pImageType = CON_EXTENSE_PNG; // TODO
                this.pImageType = SaveImageCommon.CON_EXTENSE_JPG;
                blRes           = false;
                CommonLogger.WriteLine(ex.Message);
            }
            return(blRes);
        }