コード例 #1
0
        public static IEnumerable <Option> GetOptions(UpdatableProgram program)
        {
            yield return(new Option("Enter Package Manager", () => program.NavigateTo <PackageManager>()));

            yield return(new Option("Enter Package Creator", () => program.NavigateTo <PackageCreator>()));

            //yield return new Option("Execute Tests in Console", () => TestsInConsole(program));
            yield return(new Option("Exit Application", SafeExit));
        }
コード例 #2
0
ファイル: PackageCreator.cs プロジェクト: uta-org/ZWSetup
        public static IEnumerable <Option> GetOptions(UpdatableProgram program)
        {
            int i = 0;

            foreach (var pkg in PackageController.PackageList)
            {
                int iCopy = i;
                yield return(new Option(pkg.Name, () => { PackageController.SelectedPackage = iCopy; program.NavigateTo <PackageOperator>(); }));

                ++i;
            }

            yield return(new Option("New Package", () => program.NavigateTo <PackageAdd>()));

            yield return(new Option("Remove Package", () => program.GetPage <PackageRemove>().WithSubmenu(PackageController.PackageList).NavigateTo <PackageRemove>()));

            if (string.IsNullOrEmpty(SetupController.TesterPath))
            {
                yield return(new Option("Locate Tester Path", () => LocateTesterPath(program)));
            }
        }