Пример #1
0
 private void HandleNewFile(ReferencedFileSave newFile)
 {
     if (BuildLogic.GetIfNeedsMonoGameFilesBuilt(GlueState.CurrentMainProject))
     {
         BuildLogic.Self.UpdateFileMembershipAndBuildReferencedFile(GlueState.CurrentMainProject, newFile, viewModel.UseContentPipelineOnPngs);
     }
     foreach (var project in GlueState.SyncedProjects)
     {
         if (BuildLogic.GetIfNeedsMonoGameFilesBuilt(project))
         {
             BuildLogic.Self.UpdateFileMembershipAndBuildReferencedFile(project, newFile, viewModel.UseContentPipelineOnPngs);
         }
     }
 }
Пример #2
0
        private void HandleFileRemoved(IElement container, ReferencedFileSave file)
        {
            // Delete the file just in case a new file with the same name is added later. If so, we don't
            // want old XNBs to sit around and cause the incremental built to not build the newly-added file.
            BuildLogic.TryRemoveXnbReferences(GlueState.CurrentMainProject, file, save: false);
            BuildLogic.TryDeleteBuiltXnbFor(GlueState.CurrentMainProject, file, viewModel.UseContentPipelineOnPngs);

            foreach (var syncedProject in GlueState.SyncedProjects)
            {
                BuildLogic.TryRemoveXnbReferences(syncedProject, file, save: false);
                BuildLogic.TryDeleteBuiltXnbFor(syncedProject, file, viewModel.UseContentPipelineOnPngs);
            }

            TaskManager.Self.AddSync(Container.Get <IGlueCommands>().ProjectCommands.SaveProjects, "Save projects after removing XNBs");
        }
Пример #3
0
 private void HandleTreeViewRightClick(TreeNode rightClickedTreeNode, ContextMenuStrip menuToModify)
 {
     if (rightClickedTreeNode.IsReferencedFile())
     {
         var rfs = rightClickedTreeNode.Tag as ReferencedFileSave;
         var forcePngsToPipeline = controller.Settings.UseContentPipelineOnAllPngs;
         if (BuildLogic.IsBuiltByContentPipeline(rfs, forcePngsToPipeline))
         {
             menuToModify.Items.Add("Rebuild Content Pipeline File").Click += (not, used) =>
             {
                 var fullFileName = GlueCommands.Self.GetAbsoluteFileName(rfs);
                 BuildLogic.Self.TryAddXnbReferencesAndBuild(fullFileName, GlueState.CurrentMainProject, false, rebuild: true);
             };
         }
     }
 }