Example #1
0
        public IDisposable Add(InfoBarItem item)
        {
            VsAppShell.Current.AssertIsOnMainThread();

            var infoBarModel = new InfoBarModel(item.Text,
                                                item.LinkButtons.Select(kvp => new InfoBarHyperlink(kvp.Key, kvp.Value)),
                                                KnownMonikers.StatusInformation,
                                                item.ShowCloseButton);
            var infoBar = _factoryLazy.Value.CreateInfoBar(infoBarModel);

            return(new InfoBarEvents(infoBar, _infoBarHost));
        }
        public void Prompt(string message, DotNetCoreVersion requiredDotNetCoreVersion)
        {
            var items = new InfoBarItem [] {
                new InfoBarItem(GettextCatalog.GetString("Download .NET Core"), InfoBarItemKind.Button, DownloadButtonClicked, true)
            };

            downloadUrl = requiredDotNetCoreVersion != null?DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl(requiredDotNetCoreVersion) : DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl();

            IdeApp.Workbench.ShowInfoBar(false, new InfoBarOptions(message)
            {
                Items = items
            });
        }
Example #3
0
        public InfoBarBuilderControl(InfoBarItem item)
        {
            infoLabel = new StbTextBox(0xFF, 10, 80)
            {
                X = 5, Y = 0, Width = 130, Height = 26
            };
            infoLabel.SetText(item.label);

            string[] dataVars = InfoBarManager.GetVars();
            varStat = new Combobox(200, 0, 170, dataVars, (int)item.var);

            uint color = 0xFF7F7F7F;

            if (item.hue != 0xFFFF)
            {
                color = HuesLoader.Instance.GetPolygoneColor(12, item.hue);
            }

            labelColor = new ClickableColorBox(150, 0, 13, 14, item.hue, color);

            NiceButton deleteButton = new NiceButton(390, 0, 60, 25, ButtonAction.Activate, ResGumps.Delete)
            {
                ButtonParameter = 999
            };

            deleteButton.MouseUp += (sender, e) =>
            {
                Dispose();
                ((DataBox)Parent)?.ReArrangeChildren();
            };

            Add
            (
                new ResizePic(0x0BB8)
            {
                X = infoLabel.X - 5, Y = 0, Width = infoLabel.Width + 10, Height = infoLabel.Height
            }
            );

            Add(infoLabel);
            Add(varStat);
            Add(labelColor);
            Add(deleteButton);

            Width  = infoLabel.Width + 10;
            Height = infoLabel.Height;
        }
Example #4
0
        public void Prompt()
        {
            var items = new InfoBarItem [] {
                new InfoBarItem(GettextCatalog.GetString("Download .NET Core"), InfoBarItemKind.Button, DownloadButtonClicked, true)
            };

            if (IsUnsupportedVersion || IsNetStandard || RequiredDotNetCoreVersion == null)             //for .net standard we'll show generic message
            {
                Message = DotNetCoreSdk.GetNotSupportedVersionMessage();
            }
            else
            {
                Message     = DotNetCoreSdk.GetNotSupportedVersionMessage(RequiredDotNetCoreVersion.OriginalString);
                downloadUrl = DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl(RequiredDotNetCoreVersion);
            }

            IdeApp.Workbench.ShowInfoBar(false, new InfoBarOptions(Message)
            {
                Items = items
            });
        }
        public InfoBarBuilderControl(InfoBarItem item)
        {
            infoLabel = new TextBox(0xFF, 10, 80, 80)
            {
                X = 5, Y = 0, Width = 130, Height = 30, Text = item.label
            };

            string[] dataVars = InfoBarManager.GetVars(Settings.GlobalSettings.ShardType);
            varStat = new Combobox(200, 0, 170, dataVars, (int)item.var);

            uint color = 0xFF7F7F7F;

            if (item.hue != 0xFFFF)
            {
                color = UOFileManager.Hues.GetPolygoneColor(12, item.hue);
            }

            labelColor = new ClickableColorBox(150, 0, 13, 14, item.hue, color);

            NiceButton deleteButton = new NiceButton(390, 0, 60, 25, ButtonAction.Activate, "Delete")
            {
                ButtonParameter = 999
            };

            deleteButton.MouseUp += (sender, e) =>
            {
                Dispose();
            };

            Add(new ResizePic(0x0BB8)
            {
                X = infoLabel.X - 5, Y = 0, Width = infoLabel.Width + 10, Height = infoLabel.Height - 6
            });
            Add(infoLabel);
            Add(varStat);
            Add(labelColor);
            Add(deleteButton);
        }
Example #6
0
 public IDisposable Add(InfoBarItem item) => Disposable.Empty;