GooglePlayServices.CommandLineDialog.CreateCommandLineDialog C# (CSharp) Method

CreateCommandLineDialog() public static method

Create a dialog box which can display command line output.
public static CreateCommandLineDialog ( string title ) : CommandLineDialog
title string
return CommandLineDialog
        public static CommandLineDialog CreateCommandLineDialog(string title)
        {
            CommandLineDialog window = (CommandLineDialog)EditorWindow.GetWindow(
                typeof(CommandLineDialog), true, title);
            window.Initialize();
            return window;
        }

Usage Example

Example #1
0
        /// <summary>
        /// Open a install / license window and execute a command.
        /// </summary>
        /// <param name="toolPath">Tool to run.</param>
        /// <param name="toolArguments">Arguments to pass to the tool.</param>
        /// <param name="retrievingLicenses">Whether the command is retrieving licenses.</param>
        /// <param name="licenseResponder">Responds to license questions.</param>
        /// <param name="packages">List of package versions to install / upgrade.</param>
        /// <param name="complete">Called when installation is complete.</param>
        private static void DisplayInstallLicenseDialog(
            string toolPath, string toolArguments, bool retrievingLicenses,
            LicenseResponder licenseResponder,
            IEnumerable <AndroidSdkPackageNameVersion> packages,
            Action <CommandLine.Result> complete)
        {
            var summary = retrievingLicenses ?
                          "Attempting Android SDK package installation..." : DIALOG_TITLE + "...";
            var window = CommandLineDialog.CreateCommandLineDialog(DIALOG_TITLE);

            window.summaryText        = summary;
            window.modal              = false;
            window.bodyText           = String.Format("{0} {1}\n\n", toolPath, toolArguments);
            window.progressTitle      = window.summaryText;
            window.autoScrollToBottom = true;
            CommandLine.IOHandler ioHandler = null;
            if (licenseResponder != null)
            {
                ioHandler = licenseResponder.AggregateLine;
            }
            PlayServicesResolver.Log(String.Format("{0} {1}", toolPath, toolArguments),
                                     level: LogLevel.Verbose);
            window.RunAsync(
                toolPath, toolArguments,
                (CommandLine.Result result) => {
                window.Close();
                LogInstallLicenseResult(toolPath, toolArguments, retrievingLicenses, packages,
                                        result);
                complete(result);
            },
                ioHandler: ioHandler,
                maxProgressLines: retrievingLicenses ? 250 : 500);
            window.Show();
        }
All Usage Examples Of GooglePlayServices.CommandLineDialog::CreateCommandLineDialog