예제 #1
0
        private void WriteAddressToDebug()
        {
            Trace.WriteLine("Sending email(s) to:");

            Trace.WriteLine("TO:");
            Trace.WriteLine(String.Format("  -- has {0} addresses", TOList.Count.ToString()));
            TOList.ForEach(x => Trace.WriteLine(string.Format("    -- {0} ", x.ToString())));

            Trace.WriteLine("CC:");
            Trace.WriteLine(String.Format("  -- has {0} addresses", CCList.Count.ToString()));
            CCList.ForEach(x => Trace.WriteLine(string.Format("    -- {0}", x.ToString())));

            Trace.WriteLine("Bcc:");
            Trace.WriteLine(String.Format("  -- has {0} addresses", BCList.Count.ToString()));
            BCList.ForEach(x => Trace.WriteLine(string.Format("    -- {0}", x.ToString())));

            Trace.WriteLine("... ... ...");
            Trace.WriteLine(message.ToString());
            Trace.WriteLine("... ... ...");
        }
예제 #2
0
        private void LoadIni()
        {
            //            // スペシャルパワーアニメ
            //            buf = GeneralLib.ReadIni("Option", "SpecialPowerAnimation");
            //            if (string.IsNullOrEmpty(buf))
            //            {
            //                buf = GeneralLib.ReadIni("Option", "MindEffect");
            //                if (!string.IsNullOrEmpty(buf))
            //                {
            //                    SystemConfig.SetItem("Option", "SpecialPowerAnimation", buf);
            //                }
            //            }

            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (Strings.LCase(buf) == "on")
            //                {
            //                    SpecialPowerAnimation = true;
            //                }
            //                else
            //                {
            //                    SpecialPowerAnimation = false;
            //                }
            //            }
            //            else if (SpecialPowerAnimation)
            //            {
            //                SystemConfig.SetItem("Option", "SpecialPowerAnimation", "On");
            //            }
            //            else
            //            {
            //                SystemConfig.SetItem("Option", "SpecialPowerAnimation", "Off");
            //            }

            //            // 戦闘アニメ
            //            buf = Strings.LCase(GeneralLib.ReadIni("Option", "BattleAnimation"));
            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (buf == "on")
            //                {
            //                    BattleAnimation = true;
            //                }
            //                else
            //                {
            //                    BattleAnimation = false;
            //                }
            //            }
            //            else if (BattleAnimation)
            //            {
            //                SystemConfig.SetItem("Option", "BattleAnimation", "On");
            //            }
            //            else
            //            {
            //                SystemConfig.SetItem("Option", "BattleAnimation", "Off");
            //            }

            //            // 拡大戦闘アニメ
            //            buf = Strings.LCase(GeneralLib.ReadIni("Option", "ExtendedAnimation"));
            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (buf == "on")
            //                {
            //                    ExtendedAnimation = true;
            //                }
            //                else
            //                {
            //                    ExtendedAnimation = false;
            //                }
            //            }
            //            else
            //            {
            //                ExtendedAnimation = true;
            //                SystemConfig.SetItem("Option", "ExtendedAnimation", "On");
            //            }

            //            // 武器準備アニメ
            //            buf = Strings.LCase(GeneralLib.ReadIni("Option", "WeaponAnimation"));
            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (buf == "on")
            //                {
            //                    WeaponAnimation = true;
            //                }
            //                else
            //                {
            //                    WeaponAnimation = false;
            //                }
            //            }
            //            else
            //            {
            //                WeaponAnimation = true;
            //                SystemConfig.SetItem("Option", "WeaponAnimation", "On");
            //            }

            //            // 移動アニメ
            //            buf = Strings.LCase(GeneralLib.ReadIni("Option", "MoveAnimation"));
            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (buf == "on")
            //                {
            //                    MoveAnimation = true;
            //                }
            //                else
            //                {
            //                    MoveAnimation = false;
            //                }
            //            }
            //            else
            //            {
            //                MoveAnimation = true;
            //                SystemConfig.SetItem("Option", "MoveAnimation", "On");
            //            }

            //            // メッセージ速度を設定
            //            buf = GeneralLib.ReadIni("Option", "MessageWait");
            //            if (Information.IsNumeric(buf))
            //            {
            //                GUI.MessageWait = Conversions.ToInteger(buf);
            //                if (GUI.MessageWait > 10000000)
            //                {
            //                    GUI.MessageWait = 10000000;
            //                }
            //            }
            //            else
            //            {
            //                GUI.MessageWait = 700;
            //                SystemConfig.SetItem("Option", "MessageWait", "700");
            //            }

            //            // マス目を表示するかどうか
            //            buf = GeneralLib.ReadIni("Option", "Square");
            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (Strings.LCase(buf) == "on")
            //                {
            //                    ShowSquareLine = true;
            //                }
            //                else
            //                {
            //                    ShowSquareLine = false;
            //                }
            //            }
            //            else
            //            {
            //                ShowSquareLine = false;
            //                SystemConfig.SetItem("Option", "Square", "Off");
            //            }

            //            // 敵ターンにBGMを変更するかどうか
            //            buf = GeneralLib.ReadIni("Option", "KeepEnemyBGM");
            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (Strings.LCase(buf) == "on")
            //                {
            //                    KeepEnemyBGM = true;
            //                }
            //                else
            //                {
            //                    KeepEnemyBGM = false;
            //                }
            //            }
            //            else
            //            {
            //                KeepEnemyBGM = false;
            //                SystemConfig.SetItem("Option", "KeepEnemyBGM", "Off");
            //            }

            //            // 音源のリセットデータの種類
            //            MidiResetType = GeneralLib.ReadIni("Option", "MidiReset");

            //            // 自動反撃モード
            //            buf = GeneralLib.ReadIni("Option", "AutoDefense");
            //            if (string.IsNullOrEmpty(buf))
            //            {
            //                buf = GeneralLib.ReadIni("Option", "AutoDeffence");
            //                if (!string.IsNullOrEmpty(buf))
            //                {
            //                    SystemConfig.SetItem("Option", "AutoDefense", buf);
            //                }
            //            }

            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (Strings.LCase(buf) == "on")
            //                {
            //                    SystemConfig.AutoDefense = true;
            //                }
            //                else
            //                {
            //                    SystemConfig.AutoDefense = false;
            //                }
            //            }
            //            else
            //            {
            //                SystemConfig.AutoDefense = false;
            //                SystemConfig.SetItem("Option", "AutoDefense", "Off");
            //            }

            //            // カーソル自動移動
            //            buf = GeneralLib.ReadIni("Option", "AutoMoveCursor");
            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (Strings.LCase(buf) == "on")
            //                {
            //                    AutoMoveCursor = true;
            //                }
            //                else
            //                {
            //                    AutoMoveCursor = false;
            //                }
            //            }
            //            else
            //            {
            //                AutoMoveCursor = true;
            //                SystemConfig.SetItem("Option", "AutoMoveCursor", "On");
            //            }

            // 各ウィンドウをロード (メインウィンドウは先にロード済み)
            GUI.LoadForms();

            //            // 画像バッファの枚数
            //            buf = GeneralLib.ReadIni("Option", "ImageBufferNum");
            //            if (Information.IsNumeric(buf))
            //            {
            //                ImageBufferSize = Conversions.Toint(buf);
            //                if (ImageBufferSize < 5)
            //                {
            //                    // 最低でも5枚のバッファを使う
            //                    ImageBufferSize = 5;
            //                }
            //            }
            //            else
            //            {
            //                // デフォルトは64枚
            //                ImageBufferSize = 64;
            //                SystemConfig.SetItem("Option", "ImageBufferNum", "64");
            //            }

            //            // 画像バッファを作成
            //            GUI.MakePicBuf();

            //            // 画像バッファの最大サイズ
            //            buf = GeneralLib.ReadIni("Option", "MaxImageBufferSize");
            //            if (Information.IsNumeric(buf))
            //            {
            //                MaxImageBufferByteSize = (Conversions.ToDouble(buf) * 1024d * 1024d);
            //                if (MaxImageBufferByteSize < 1 * 1024 * 1024)
            //                {
            //                    // 最低でも1MBのバッファを使う
            //                    MaxImageBufferByteSize = 1 * 1024 * 1024;
            //                }
            //            }
            //            else
            //            {
            //                // デフォルトは8MB
            //                MaxImageBufferByteSize = 8 * 1024 * 1024;
            //                SystemConfig.SetItem("Option", "MaxImageBufferSize", "8");
            //            }

            //            // 拡大画像を画像バッファに保存するか
            //            buf = GeneralLib.ReadIni("Option", "KeepStretchedImage");
            //            if (!string.IsNullOrEmpty(buf))
            //            {
            //                if (Strings.LCase(buf) == "on")
            //                {
            //                    KeepStretchedImage = true;
            //                }
            //                else
            //                {
            //                    KeepStretchedImage = false;
            //                }
            //            }
            //            // UPGRADE_WARNING: オブジェクト IsBitBltFasterThanStretchBlt() の既定プロパティを解決できませんでした。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' をクリックしてください。
            //            else if (Conversions.ToBoolean(IsBitBltFasterThanStretchBlt()))
            //            {
            //                KeepStretchedImage = true;
            //                SystemConfig.SetItem("Option", "KeepStretchedImage", "On");
            //            }
            //            else
            //            {
            //                KeepStretchedImage = false;
            //                SystemConfig.SetItem("Option", "KeepStretchedImage", "Off");
            //            }

            //            // 透過描画にUseTransparentBltを使用するか
            //            if (GeneralLib.GetWinVersion() >= 500)
            //            {
            //                buf = GeneralLib.ReadIni("Option", "UseTransparentBlt");
            //                if (!string.IsNullOrEmpty(buf))
            //                {
            //                    if (Strings.LCase(buf) == "on")
            //                    {
            //                        UseTransparentBlt = true;
            //                    }
            //                    else
            //                    {
            //                        UseTransparentBlt = false;
            //                    }
            //                }
            //                else
            //                {
            //                    UseTransparentBlt = true;
            //                    SystemConfig.SetItem("Option", "UseTransparentBlt", "On");
            //                }
            //            }


            //            // マウスボタンの利き腕設定
            //            if (GUI.GetSystemMetrics(GUI.SM_SWAPBUTTON) == 0)
            //            {
            //                // 右利き用
            //                GUI.RButtonID = 0x2;
            //                GUI.LButtonID = 0x1;
            //            }
            //            else
            //            {
            //                // 左利き用
            //                GUI.RButtonID = 0x1;
            //                GUI.LButtonID = 0x2;
            //            }

            //            GUI.ListItemComment = new string[1];

            //            // エリアスデータをロード
            //            bool localFileExists1() { string argfname = AppPath + @"Data\System\alias.txt"; var ret = FileSystem.FileExists(argfname); return ret; }

            //            if (FileSystem.FileExists(ScenarioPath + @"Data\System\alias.txt"))
            //            {
            //                ALDList.Load(ScenarioPath + @"Data\System\alias.txt");
            //            }
            //            else if (localFileExists1())
            //            {
            //                ALDList.Load(AppPath + @"Data\System\alias.txt");
            //            }

            // スペシャルパワーデータをロード
            var spFiles = new string[]
            {
                FileSystem.PathCombine(ScenarioPath, "Data", "System", "sp.txt"),
                FileSystem.PathCombine(ScenarioPath, "Data", "System", "mind.txt"),
                FileSystem.PathCombine(AppPath, "Data", "System", "sp.txt"),
                FileSystem.PathCombine(AppPath, "Data", "System", "mind.txt"),
            };

            foreach (var spFile in spFiles)
            {
                if (FileSystem.FileExists(spFile))
                {
                    SPDList.Load(spFile);
                    break;
                }
            }

            // 汎用アイテムデータをロード
            if (FileSystem.FileExists(ScenarioPath, @"Data\System\item.txt"))
            {
                IDList.Load(FileSystem.PathCombine(ScenarioPath, @"Data\System\item.txt"));
            }
            else if (FileSystem.FileExists(AppPath, @"Data\System\item.txt"))
            {
                IDList.Load(FileSystem.PathCombine(AppPath, @"Data\System\item.txt"));
            }
            // 地形データをロード
            string appTerrainPath = FileSystem.PathCombine(AppPath, "Data", "System", "terrain.txt");

            if (FileSystem.FileExists(appTerrainPath))
            {
                TDList.Load(appTerrainPath);
            }
            else
            {
                throw new TerminateException(@"地形データファイル「Data\System\terrain.txt」が見つかりません");
            }
            string scenarioTerrainPath = FileSystem.PathCombine(ScenarioPath, "Data", "System", "terrain.txt");

            if (FileSystem.FileExists(scenarioTerrainPath))
            {
                TDList.Load(scenarioTerrainPath);
            }

            // バトルコンフィグデータをロード
            var bcFiles = new string[]
            {
                FileSystem.PathCombine(ScenarioPath, "Data", "System", "battle.txt"),
                FileSystem.PathCombine(AppPath, "Data", "System", "battle.txt"),
            };

            foreach (var bcFile in bcFiles)
            {
                if (FileSystem.FileExists(bcFile))
                {
                    BCList.Load(bcFile);
                    break;
                }
            }
        }
예제 #3
0
 void IList.RemoveAt(int index)
 {
     BCList.RemoveAt(index);
 }
예제 #4
0
 void IList.Insert(int index, Object item)
 {
     BCList.Insert(index, item);
 }
예제 #5
0
 void IList.Remove(Object item)
 {
     BCList.Remove(item);
 }
예제 #6
0
 int IList.IndexOf(Object item)
 {
     return(BCList.IndexOf(item));
 }
예제 #7
0
 void ICollection.CopyTo(Array array, int index)
 {
     BCList.CopyTo(array, index);
 }
예제 #8
0
 bool IList.Contains(Object item)
 {
     return(BCList.Contains(item));
 }
예제 #9
0
 void IList.Clear()
 {
     BCList.Clear();
 }
예제 #10
0
 int IList.Add(Object item)
 {
     return(BCList.Add(item));
 }