Exemple #1
0
        public static void HandleModifyAddEntityWindow(AddEntityWindow window)
        {
            var viewModel = new AdditionalEntitiesControlViewModel();

            var control = new AdditionalEntitiesControls();

            control.DataContext = viewModel;
            window.AddToStackPanel(control);
        }
Exemple #2
0
        public static void HandleModifyAddEntityWindow(AddEntityWindow window)
        {
            // See if any screens have tile maps
            var allScreens = GlueState.Self.CurrentGlueProject.Screens;

            bool IsRfsTiledMap(ReferencedFileSave rfs)
            {
                return(rfs.GetAssetTypeInfo() == AssetTypeInfoAdder.Self.TmxAssetTypeInfo);
            }

            var doesProjectContainAnyTmxFiles = allScreens.Any(item => item.ReferencedFiles.Any(IsRfsTiledMap));

            if (doesProjectContainAnyTmxFiles)
            {
                var viewModel = new AdditionalEntitiesControlViewModel();

                var control = new AdditionalEntitiesControls();
                control.DataContext = viewModel;
                window.AddToStackPanel(control);
            }
        }