From 81f7ba8a59bbf1483d98e7a7228c42cb823183ef Mon Sep 17 00:00:00 2001 From: Julien Chomarat Date: Tue, 12 Nov 2019 21:48:31 +0100 Subject: [PATCH] Color issues --- TimerRibbon.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TimerRibbon.cs b/TimerRibbon.cs index 331e62a..ce3d401 100644 --- a/TimerRibbon.cs +++ b/TimerRibbon.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System.Drawing; +using System.Linq; using Microsoft.Office.Core; using Microsoft.Office.Tools.Ribbon; using Microsoft.Office.Interop.PowerPoint; @@ -23,9 +24,9 @@ private void AddTimer_Click(object sender, RibbonControlEventArgs e) 2, 2, 120, 45); textBoxCounter.TextFrame.TextRange.Text = Constants.DefaultTimerValue; - //textBoxCounter.TextFrame.TextRange.Font.Size = 40; textBoxCounter.Tags.Add(Constants.TimerTag, Constants.TimerTagValue); - + textBoxCounter.TextFrame.TextRange.Font.Color.RGB = ColorTranslator.ToOle(Color.Black); + // Hide it textBoxCounter.Visible = MsoTriState.msoFalse; var textBoxLauncher = currentSlide.Shapes.AddTextbox( @@ -34,6 +35,7 @@ private void AddTimer_Click(object sender, RibbonControlEventArgs e) textBoxLauncher.TextFrame.TextRange.Text = Constants.DefaultTimerValue; textBoxLauncher.TextFrame.TextRange.Font.Size = 40; + textBoxLauncher.TextFrame.TextRange.Font.Color.RGB = ColorTranslator.ToOle(Color.Black); textBoxLauncher.Tags.Add(Constants.TimerLauncherTag, textBoxCounter.Id.ToString()); // Add a "bold" animation to triggers the countdown