예제 #1
0
        internal static void Run(
            bool isGluonMode,
            ProgressControlsForViews progressControls)
        {
            ((IProgressControls)progressControls).ShowProgress(string.Empty);

            IThreadWaiter waiter = ThreadWaiter.GetWaiter();

            waiter.Execute(
                /*threadOperationDelegate*/ delegate
            {
                Process plasticProcess = LaunchTool.OpenConfigurationForMode(isGluonMode);

                if (plasticProcess != null)
                {
                    plasticProcess.WaitForExit();
                }
            },
                /*afterOperationDelegate*/ delegate
            {
                ((IProgressControls)progressControls).HideProgress();

                if (waiter.Exception == null)
                {
                    return;
                }

                ((IProgressControls)progressControls).ShowError(
                    waiter.Exception.Message);
            });
        }
예제 #2
0
        static void DoNoConfigAvailableArea(bool isGluonMode)
        {
            string labelText =
                "No configuration found. Plastic SCM plugin is disabled. " +
                "Please configure it by clicking here.";

            string buttonText = isGluonMode ?
                                "Launch Gluon" : "Launch Plastic";

            DrawActionHelpBox.For(
                Images.GetWarnDialogIcon(),
                labelText, buttonText, delegate
            {
                LaunchTool.OpenConfigurationForMode(isGluonMode);
            });
        }