Example #1
0
        public void ShowCaretState(int line, int column, int selectedChars, bool isInInsertMode)
        {
            DispatchService.AssertGuiThread();
            string cursorText = selectedChars > 0 ? String.Format("{0,3} : {1,-3} - {2}", line, column, selectedChars) : String.Format("{0,3} : {1,-3}", line, column);

            if (cursorLabel.Text != cursorText)
            {
                cursorLabel.Text = cursorText;
            }

            string modeStatusText = isInInsertMode ? GettextCatalog.GetString("INS") : GettextCatalog.GetString("OVR");

            if (modeLabel.Text != modeStatusText)
            {
                modeLabel.Text = modeStatusText;
            }
        }
        public void ShowMessage(Image image, string message, bool isMarkup)
        {
            if (message == lastText)
            {
                return;
            }
            sourcePad = null;
            lastText  = message;
            DispatchService.AssertGuiThread();
            if (currentStatusImage != image)
            {
                if (currentStatusImage != null)
                {
                    messageBox.Remove(currentStatusImage);
                }
                currentStatusImage = image;
                if (image != null)
                {
                    image.SetPadding(0, 0);
                    messageBox.PackStart(image, false, false, 3);
                    messageBox.ReorderChild(image, 1);
                    image.Show();
                }
            }

            string txt = !String.IsNullOrEmpty(message) ? " " + message.Replace("\n", " ") : "";

            if (isMarkup)
            {
                statusLabel.Markup = txt;
            }
            else
            {
                statusLabel.Text = txt;
            }
        }
 public void Pulse()
 {
     DispatchService.AssertGuiThread();
     this.progressBar.Visible = true;
     this.progressBar.Pulse();
 }
 public void SetProgressFraction(double work)
 {
     DispatchService.AssertGuiThread();
     this.progressBar.Fraction = work;
 }
 public void ShowWarning(string warning)
 {
     DispatchService.AssertGuiThread();
     ShowMessage(new Gtk.Image(MonoDevelop.Ide.Gui.Stock.Warning, IconSize.Menu), warning);
 }