Exemple #1
0
        /// <summary>
        /// Xmlに保存
        /// </summary>
        public void saveToXmlFile()
        {
            // 出力ディレクトリ
            string outputDir = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName;

            // 保存
            string outputFullPath = outputDir + "\\AppSetting.xml";

            try
            {
                SettingSerializer.SaveSettings <AppSetting>(outputFullPath, this);
            }
            catch { }
        }
Exemple #2
0
        /* ---------------------------------------------------- */
        //     IO
        /* ---------------------------------------------------- */
        public void SaveProfileToXmlFile()
        {
            // 出力ディレクトリ
            string outputDir = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + "\\Profile";

            if (!Directory.Exists(outputDir))
            {
                Directory.CreateDirectory(outputDir);
            }

            // 保存
            string outputFullPath = outputDir + "\\" + this.RelativePath;

            try
            {
                SettingSerializer.SaveSettings <Profile>(outputFullPath, this.Profile);
            }
            catch { }
        }