/** ========================================
         *  EditorIniオブジェクト作成
         *  ======================================== */

        public static EditorIniData GenerateData0()
        {
            return(new EditorIniData
            {
                StartFlag = 0,
                LastLoadFile = "MapData/Map000.mps",
                MainWindowPosition = (0, 0),
                MainWindowSize = (651, 322),
                MapChipWindowPosition = (0, 0),
                MapEventWindowPosition = (273, 230),
                MapEventWindowSize = (840, 410),
                MapEventInputWindowPosition = (0, 0),
                CommonEventWindowPosition = (0, 0),
                CommonEventWindowSize = (800, 640),
                CommonEventInputWindowPosition = (0, 0),
                UserDbWindowPosition = (27, 54),
                ChangeableDbWindowPosition = (27, 54),
                SystemDbWindowPosition = (27, 54),
                DatabaseValueNumberDrawType = DatabaseValueNumberDrawType.FromCode("0"),
                EditTimeDrawType = EditTimeDrawType.On,
                EditTime = 14,
                NotEditTime = 0,
                IsShowDebugWindow = true,
                LayerTransparent = LaterTransparentType.FromCode("2"),
                EventLayerOpacity = EventLayerOpacityType.FromCode("1"),
                CommandColorType = CommandColorType.FromCode("0"),
                IsDrawBackgroundImage = true,
                NotCopyExtList = new ExtensionList(new Extension[]
                {
                    ".psd", ".sai", ".svg", ".xls", ".db", ".tmp",
                    ".bak", ".db", "dummy_file"
                }),
                CommandViewType = 0,
                BackupType = ProjectBackupType.FromCode("3"),
                ShortCutKeyList = new EventCommandShortCutKeyList(new[]
                {
                    EventCommandShortCutKey.One, EventCommandShortCutKey.Two, EventCommandShortCutKey.Three,
                    EventCommandShortCutKey.Four, EventCommandShortCutKey.Five, EventCommandShortCutKey.Six,
                    EventCommandShortCutKey.Seven, EventCommandShortCutKey.Eight, EventCommandShortCutKey.Nine,
                    EventCommandShortCutKey.A, EventCommandShortCutKey.B, EventCommandShortCutKey.C,
                    EventCommandShortCutKey.D, EventCommandShortCutKey.E, EventCommandShortCutKey.F,
                    EventCommandShortCutKey.G, EventCommandShortCutKey.H, EventCommandShortCutKey.I,
                    EventCommandShortCutKey.J, EventCommandShortCutKey.One, EventCommandShortCutKey.One,
                    EventCommandShortCutKey.One, EventCommandShortCutKey.One, EventCommandShortCutKey.One,
                    EventCommandShortCutKey.One, EventCommandShortCutKey.One, EventCommandShortCutKey.One,
                    EventCommandShortCutKey.One, EventCommandShortCutKey.One, EventCommandShortCutKey.One,
                }),
                CommandPositionList = new ShortCutPositionList(new ShortCutPosition[]
                {
                    1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1,
                    17, 18, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
                }),
                IsUseExpertCommand = false,
            });
Пример #2
0
        public static void EventLayerOpacityTest(EventLayerOpacityType type, bool isError)
        {
            var instance            = new EditorIniData();
            var changedPropertyList = new List <string>();

            instance.PropertyChanged += (sender, args) => { changedPropertyList.Add(args.PropertyName); };

            var errorOccured = false;

            try
            {
                instance.EventLayerOpacity = type;
            }
            catch (Exception ex)
            {
                logger.Exception(ex);
                errorOccured = true;
            }

            // エラーフラグが一致すること
            Assert.AreEqual(errorOccured, isError);

            if (!errorOccured)
            {
                var setValue = instance.EventLayerOpacity;

                // セットした値と取得した値が一致すること
                Assert.IsTrue(setValue.Equals(type));
            }

            // 意図したとおりプロパティ変更通知が発火していること
            if (errorOccured)
            {
                Assert.AreEqual(changedPropertyList.Count, 0);
            }
            else
            {
                Assert.AreEqual(changedPropertyList.Count, 1);
                Assert.IsTrue(changedPropertyList[0].Equals(nameof(EditorIniData.EventLayerOpacity)));
            }
        }