public void loadAllSkinFile(string skinPath)
        {
            try
            {
                //ossListの初期化
                ossList = new List<ObjSkinSetting>();

                //スキンフォルダ内のフォルダ一覧を取得する
                string[] dirs = Directory.GetDirectories(skinPath);

                //スキンファイルの存在確認とオブジェクトリストの生成
                foreach (string dir in dirs)
                {
                    string skinSettingpath = dir + "\\skin.xml";
                    //ファイルの存在チェック
                    if (LpsPathControllerCus.checkFileExist(skinSettingpath))
                    {
                        //ファイルが存在したら読み込み
                        ossList.Add(new ObjSkinSetting(skinSettingpath));
                    }
                }
            }
            catch (Exception err)
            {
                LpsLogControllerCus lc = new LpsLogControllerCus();
                LpsLogControllerCus.writingLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, err.ToString());
            }
        }
        public ObjSkinSetting(string skinSettingPath)
        {
            try
            {
                //ログの宣言
                lc = new LpsLogControllerCus();

                //設定の取得
                setting = new SharedPreferences(skinSettingPath);

                //読み込み
                getPreferenceData();

            }
            catch (System.Exception err)
            {
                //設定ファイルの読み込みエラーの旨、異常位置を知らせるウインドウを出すべき
                LpsLogControllerCus.writingLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, LpsPathControllerCus.getSettingFilePath() + "が存在しないため作成します" + Environment.NewLine + err);
            }
        }
        public ObjSkinSetting(string charName, int width, int height, string textFont, string textColor, string linkColor, string titleColor, string themaColor, string themaColorSub)
        {
            try
            {
                //ログの宣言
                lc = new LpsLogControllerCus();

                //設定
                this.charName = charName;
                this.textFont = textFont;
                this.textColor = textColor;
                this.linkColor = linkColor;
                this.titleColor = titleColor;
                this.themaColor = themaColor;
                this.themaColorSub = themaColorSub;

            }
            catch (System.Exception err)
            {
                //設定ファイルの読み込みエラーの旨、異常位置を知らせるウインドウを出すべき
                LpsLogControllerCus.writingLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, LpsPathControllerCus.getSettingFilePath() + "が存在しないため作成します" + Environment.NewLine + err);
            }
        }
        public static void deleteOldTempFile(string tempDirPath, DateTime dt)
        {
            //ファイルリスト
            List<string> tempFileList = new List<string>();
            //テンプファイルリストを取得
            getFileList(tempDirPath, "*", ref tempFileList);

            try
            {
                //作成時刻と照らし合わせ、基準以上であれば削除する
                foreach (string path in tempFileList)
                {
                    System.Windows.Forms.Application.DoEvents();
                    FileInfo fi = new System.IO.FileInfo(path);

                    //ファイルの作成日が基準以前であれば削除する
                    if (fi.CreationTime < dt)
                    {
                        fi.Delete();
                    }
                }
            }
            catch
            {
                LpsLogControllerCus lc = new LpsLogControllerCus();
                LpsLogControllerCus.writingLog("LiplisFileController", MethodBase.GetCurrentMethod().Name, "一部ファイルの削除に失敗しました。");
            }
        }
 public string getDbDirPath()
 {
     lc = new LpsLogControllerCus();
     try
     {
         //checkDir(getAppPath() + "\\db");
         //return getAppPath() + "\\db\\";
         checkDir(chacheFilePath + "\\db");
         return chacheFilePath + "\\db";
     }
     catch (System.Exception err)
     {
         LpsLogControllerCus.writingLog("LiplisFileController", MethodBase.GetCurrentMethod().Name, err.ToString());
         return "";
     }
 }
 public static string getXmlPath()
 {
     LpsLogControllerCus lc = new LpsLogControllerCus();
     try
     {
         checkDir(getAppPath() + "\\xml");
         return getAppPath() + "\\xml\\";
     }
     catch (System.Exception err)
     {
         LpsLogControllerCus.writingLog("LiplisFileController", MethodBase.GetCurrentMethod().Name, err.ToString());
         return "";
     }
 }
 public static string getWindowPath(string loadSkin)
 {
     LpsLogControllerCus lc = new LpsLogControllerCus();
     try
     {
         checkDir(getAppPath() + "\\skin");
         return getAppPath() + "\\skin\\" + loadSkin + "\\window\\";
     }
     catch (System.Exception err)
     {
         LpsLogControllerCus.writingLog("LiplisFileController", MethodBase.GetCurrentMethod().Name, err.ToString());
         return "";
     }
 }
 public LpsPathControllerCus(string cacheFilePath)
 {
     lc = new LpsLogControllerCus();
 }
 public static bool delteFile(string filePath)
 {
     if (checkFileExist(filePath))
     {
         try
         {
             FileInfo fi = new System.IO.FileInfo(filePath);
             fi.Delete();
         }
         catch
         {
             LpsLogControllerCus lc = new LpsLogControllerCus();
             LpsLogControllerCus.writingLog("LiplisFileController", MethodBase.GetCurrentMethod().Name, "ファイルの削除に失敗しました。");
         }
         return true;
     }
     else
     {
         return false;
     }
 }
        public ObjSkinSetting loadTargetSkin(string charName)
        {
            try
            {
                //ossの初期化
                ObjSkinSetting result = null;

                //すべてのスキンファイルの読み込み
                loadAllSkinFile();

                foreach (ObjSkinSetting oss in ossList)
                {
                    //検索
                    if (charName.Equals(oss.charName))
                    {
                        result = oss;
                        break;
                    }
                }

                //検索して、ossがnullのままであれば、見つからなかったので、リソース値をセット
                if (result != null)
                {
                    return result;
                }
                else
                {
                    return loadResorceSkin();
                }
            }
            catch (Exception err)
            {
                LpsLogControllerCus lc = new LpsLogControllerCus();
                LpsLogControllerCus.writingLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, err.ToString());
                return loadResorceSkin();
            }
        }