Esempio n. 1
0
        public CSharpVsixProject()
        {
            SourceRootPath = @"[project.SharpmakeCsPath]\codebase\[project.Name]";
            RootPath       = @"[project.SharpmakeCsPath]\projects\[project.Name]";

            ProjectTypeGuids = CSharpProjectType.Vsix;

            Name          = "CSharpVsix";
            RootNamespace = "CSharpVsix";

            VsctCompileFiles.Add(@"[project.SourceRootPath]\HelloWorldCommandPackage.vsct");
            VSIXProjectVersion = 3;

            ResourcesPath = @"[project.SourceRootPath]\Resources";

            IncludeResxAsResources = false;

            AdditionalContent.Add(@"[project.SourceRootPath]\Resources\\HelloWorldCommandPackage.ico");
            AdditionalContent.Add(@"[project.SourceRootPath]\Resources\\HelloWorldCommand.png");

            AdditionalEmbeddedResource.Add(@"[project.SourceRootPath]\VSPackage.resx");

            AdditionalNone.Add(@"[project.SourceRootPath]\source.extension.vsixmanifest");
            AdditionalNone.Add(@"[project.SourceRootPath]\Key.snk");

            AssemblyName = "CSharpVsix";

            AddTargets(Common.GetDefaultTargets());
        }
Esempio n. 2
0
        public override string Solve(string input, bool part2)
        {
            //if (part2) return "Part 2 is unavailable";
            camera.ReadMemory(input);
            camera.OnOutput += Camera_OnOutput;

            camera.InputRequested += Camera_InputRequested;
            if (part2)
            {
                camera.Memory[0] = 2;
                if (AdditionalContent != null)
                {
                    foreach (char inp in AdditionalContent.Replace("\r", ""))
                    {
                        camera.AddInput(inp);
                    }
                }
            }
            camera.Run();
            Console.SetCursorPosition(0, bottom + 1);
            if (part2)
            {
                return("DUST: " + result);
            }
            return("");
        }
Esempio n. 3
0
        public override string Solve(string input, bool part2)
        {
            isPart2 = part2;
            if (isPart2)
            {
                string[] moves = new string[0];
                if (AdditionalContent == null)
                {
                    AdditionalContent = "";
                }
                moves = AdditionalContent.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < moves.Length; i++)
                {
                    if (i == 0)
                    {
                        knownGood = int.Parse(moves[i]);
                    }
                    else
                    {
                        inputSequence.Add(int.Parse(moves[i]));
                    }
                }
                input = input.Remove(0, 1).Insert(0, "2");
                computer.InputRequested += ControllerRead;
            }

            computer.ReadMemory(input);
            computer.OnOutput += GameRenderer;
            computer.Run();
            Console.CursorTop++;
            if (isPart2)
            {
                Console.CursorTop += 20;
                Console.CursorLeft = 0;
                AdditionalContent  = (inputSequence.Count - 1).ToString() + ';';
                foreach (long move in inputSequence)
                {
                    AdditionalContent += move.ToString() + ';';
                }

                return("GAME OVER\r\nFinal Score: " + score.ToString());
            }
            else
            {
                return("Tiles drawn: " + drawCount.ToString());
            }
        }
        public CSharpVsixProject()
        {
            SourceRootPath = @"[project.SharpmakeCsPath]\codebase\[project.Name]";
            RootPath       = @"[project.SharpmakeCsPath]\projects\[project.Name]";

            ProjectTypeGuids = CSharpProjectType.Vsix;

            Name          = "CSharpVsix";
            RootNamespace = "CSharpVsix";

            VsctCompileFiles.Add(@"[project.SourceRootPath]\HelloWorldCommandPackage.vsct");

            ResourcesPath = @"[project.SourceRootPath]\Resources";

            IncludeResxAsResources = false;

            AdditionalContent.Add(@"[project.SourceRootPath]\Resources\\HelloWorldCommandPackage.ico");
            AdditionalContent.Add(@"[project.SourceRootPath]\Resources\\HelloWorldCommand.png");

            AdditionalEmbeddedResource.Add(@"[project.SourceRootPath]\VSPackage.resx");

            AdditionalNone.Add(@"[project.SourceRootPath]\source.extension.vsixmanifest");
            AdditionalNone.Add(@"[project.SourceRootPath]\Key.snk");
            AdditionalNone.Add(@"[project.SourceRootPath]\packages.config");

            AddTargets(
                new Target(
                    Platform.anycpu,
                    DevEnv.vs2015,
                    Optimization.Debug | Optimization.Release,
                    OutputType.Dll,
                    Blob.NoBlob,
                    BuildSystem.MSBuild,
                    DotNetFramework.v4_5
                    )
                );

            // This Path will be used to get all SourceFiles in this Folder and all subFolders

            AssemblyName = "CSharpVsix";
        }
Esempio n. 5
0
 public void AddContent(AdditionalContent content)
 {
     Content = content;
     Content.Bind(this);
 }