예제 #1
0
 internal void FromTabColor(TabColor clr)
 {
     SetAllNull();
     if (clr.Auto != null)
     {
         Auto = clr.Auto.Value;
     }
     if (clr.Indexed != null)
     {
         Indexed = clr.Indexed.Value;
     }
     if (clr.Rgb != null)
     {
         Rgb = clr.Rgb.Value;
     }
     if (clr.Theme != null)
     {
         Theme = clr.Theme.Value;
     }
     if (clr.Tint != null)
     {
         Tint = clr.Tint.Value;
     }
     SetDisplayColor();
 }
예제 #2
0
 internal void UpdateBackground()
 {
     PageColor.Update(new Rectangle(-2, -2, Width + 1, Height + 1), Owner.Alignment);
     TabColor.Update(Owner.BoundsNormalTab, Owner.Alignment);
     TabActiveColor.Update(Owner.BoundsSelectTab, Owner.Alignment);
     Invalidate();
 }
예제 #3
0
 private void ExportOptions(XmlWriter writer)
 {
     writer.WriteStartElement("", "WorksheetOptions", "urn:schemas-microsoft-com:office:excel");
     PrintOptions.Export(writer);
     writer.WriteElementString("Selected", "");
     if (TabColor != -1)
     {
         writer.WriteElementString("TabColor", TabColor.ToString(CultureInfo.InvariantCulture));
     }
     if (FreezeLeftColumns > 0 || FreezeTopRows > 0)
     {
         writer.WriteElementString("FreezePanes", "");
         writer.WriteElementString("FrozenNoSplit", "");
         if (FreezeTopRows > 0)
         {
             writer.WriteElementString("SplitHorizontal", FreezeTopRows.ToString(CultureInfo.InvariantCulture));
             writer.WriteElementString("TopRowBottomPane", FreezeTopRows.ToString(CultureInfo.InvariantCulture));
         }
         if (FreezeLeftColumns > 0)
         {
             writer.WriteElementString("SplitVertical", FreezeLeftColumns.ToString(CultureInfo.InvariantCulture));
             writer.WriteElementString("LeftColumnRightPane", FreezeLeftColumns.ToString(CultureInfo.InvariantCulture));
         }
         WritePanes(writer);
     }
     writer.WriteEndElement();
 }
예제 #4
0
        internal TabColor ToTabColor()
        {
            var clr = new TabColor();

            if (Auto != null)
            {
                clr.Auto = Auto.Value;
            }
            if (Indexed != null)
            {
                clr.Indexed = Indexed.Value;
            }
            if (Rgb != null)
            {
                clr.Rgb = new HexBinaryValue(Rgb);
            }
            if (Theme != null)
            {
                clr.Theme = Theme.Value;
            }
            if ((Tint != null) && (Tint.Value != 0.0))
            {
                clr.Tint = Tint.Value;
            }

            return(clr);
        }
예제 #5
0
        internal TabColor ToTabColor()
        {
            TabColor clr = new TabColor();

            if (this.Auto != null)
            {
                clr.Auto = this.Auto.Value;
            }
            if (this.Indexed != null)
            {
                clr.Indexed = this.Indexed.Value;
            }
            if (this.Rgb != null)
            {
                clr.Rgb = new HexBinaryValue(this.Rgb);
            }
            if (this.Theme != null)
            {
                clr.Theme = this.Theme.Value;
            }
            if (this.Tint != null && this.Tint.Value != 0.0)
            {
                clr.Tint = this.Tint.Value;
            }

            return(clr);
        }
예제 #6
0
        /// <summary>
        /// Create theme resource dictionary for adding WPF Theme System
        /// </summary>
        /// <returns>configured resource dictionary</returns>
        public ResourceDictionary CreateResourceDictionary()
        {
            var dict = new ResourceDictionary();

            // Font resource
            GlobalFont.ConfigureResourceDictionary(dict, "Font");
            BaseColor.ConfigureResourceDictionary(dict, "BaseColor");
            GlobalKeyColor.ConfigureResourceDictionary(dict, "GlobalKey");
            TitleBarColor.ConfigureResourceDictionary(dict, "TitleBar");
            BackstageColor.ConfigureResourceDictionary(dict, "Backstage");
            AccountSelectionFlipColor.ConfigureResourceDictionary(dict, "AccountSelectionFlip");
            SearchFlipColor.ConfigureResourceDictionary(dict, "SearchFlip");
            UserFlipColor.ConfigureResourceDictionary(dict, "UserFlip");
            TabColor.ConfigureResourceDictionary(dict, "Tab");
            TweetDefaultColor.ConfigureResourceDictionary(dict, "TweetDefault");
            TweetMyselfColor.ConfigureResourceDictionary(dict, "TweetMyself");
            TweetMentionColor.ConfigureResourceDictionary(dict, "TweetMention");
            TweetRetweetColor.ConfigureResourceDictionary(dict, "TweetRetweet");
            TweetDirectMessageColor.ConfigureResourceDictionary(dict, "TweetMessage");

            return(dict);
        }
 private static TabColor GetTabColor(XLColor xlColor)
 {
     var color = new TabColor();
     if (xlColor.ColorType == XLColorType.Color)
         color.Rgb = xlColor.Color.ToHex();
     else if (xlColor.ColorType == XLColorType.Indexed)
         color.Indexed = (UInt32)xlColor.Indexed;
     else
     {
         color.Theme = (UInt32)xlColor.ThemeColor;
         if (xlColor.ThemeTint != 1)
             color.Tint = xlColor.ThemeTint;
     }
     return color;
 }
예제 #8
0
        internal TabColor ToTabColor()
        {
            TabColor clr = new TabColor();
            if (this.Auto != null) clr.Auto = this.Auto.Value;
            if (this.Indexed != null) clr.Indexed = this.Indexed.Value;
            if (this.Rgb != null) clr.Rgb = new HexBinaryValue(this.Rgb);
            if (this.Theme != null) clr.Theme = this.Theme.Value;
            if (this.Tint != null && this.Tint.Value != 0.0) clr.Tint = this.Tint.Value;

            return clr;
        }
예제 #9
0
 internal void FromTabColor(TabColor clr)
 {
     this.SetAllNull();
     if (clr.Auto != null) this.Auto = clr.Auto.Value;
     if (clr.Indexed != null) this.Indexed = clr.Indexed.Value;
     if (clr.Rgb != null) this.Rgb = clr.Rgb.Value;
     if (clr.Theme != null) this.Theme = clr.Theme.Value;
     if (clr.Tint != null) this.Tint = clr.Tint.Value;
     this.SetDisplayColor();
 }