public override int GetHashCode() { unchecked { var hashCode = Accelerators.Length.GetHashCode(); hashCode = (hashCode * 397) ^ (BackColor?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ForeColor?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Items.Length.GetHashCode(); hashCode = (hashCode * 397) ^ ListIndex.GetHashCode(); hashCode = (hashCode * 397) ^ MajorVersion.GetHashCode(); hashCode = (hashCode * 397) ^ MinorVersion.GetHashCode(); hashCode = (hashCode * 397) ^ (MouseIcon?.Length.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ MousePointer.GetHashCode(); hashCode = (hashCode * 397) ^ PropMask.GetHashCode(); hashCode = (hashCode * 397) ^ Remainder.Length.GetHashCode(); hashCode = (hashCode * 397) ^ Size.GetHashCode(); hashCode = (hashCode * 397) ^ TabData.GetHashCode(); hashCode = (hashCode * 397) ^ TabFixedHeight.GetHashCode(); hashCode = (hashCode * 397) ^ TabFixedWidth.GetHashCode(); hashCode = (hashCode * 397) ^ TabNames.Length.GetHashCode(); hashCode = (hashCode * 397) ^ TabOrientation.GetHashCode(); hashCode = (hashCode * 397) ^ TabsAllocated.GetHashCode(); hashCode = (hashCode * 397) ^ TabStyle.GetHashCode(); hashCode = (hashCode * 397) ^ Tags.Length.GetHashCode(); hashCode = (hashCode * 397) ^ TextProps.GetHashCode(); hashCode = (hashCode * 397) ^ TipStrings.Length.GetHashCode(); hashCode = (hashCode * 397) ^ VariousPropertyBits.GetHashCode(); return(hashCode); } }
public void TabStyleCopyFrom() { tlog.Debug(tag, $"TabStyleCopyFrom START"); var testingTarget = new MyTabStyle(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <TabStyle>(testingTarget, "Should return TabStyle instance."); TabStyle style = new TabStyle() { Size = new Size(10, 20), }; try { testingTarget.CopyFrom(style); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } tlog.Debug(tag, $"TabStyleCopyFrom END (OK)"); }
private void DrawTab(int i, Graphics gr, bool selected, bool mouseover) { if (TabStyle == null) { throw new ArgumentNullException("Custom style not attached"); } Color tabc1 = (Enabled) ? ((selected) ? TabSelectedColor : ((mouseover) ? TabMouseOverColor : TabNotSelectedColor)) : TabNotSelectedColor.Multiply(TabDisabledScaling); Color tabc2 = (FlatStyle == FlatStyle.Popup) ? tabc1.Multiply(TabColorScaling) : tabc1; Color taboutline = (selected) ? TabControlBorderColor : TabNotSelectedBorderColor; Image tabimage = null; TabStyle.DrawTab(gr, GetTabRect(i), i, selected, tabc1, tabc2, taboutline, Alignment); if (this.ImageList != null && this.TabPages[i].ImageIndex >= 0 && this.TabPages[i].ImageIndex < this.ImageList.Images.Count) { tabimage = this.ImageList.Images[this.TabPages[i].ImageIndex]; } Color tabtextc = (Enabled) ? ((selected) ? TextSelectedColor : TextNotSelectedColor) : TextNotSelectedColor.Multiply(TabDisabledScaling); TabStyle.DrawText(gr, GetTabRect(i), i, selected, tabtextc, this.TabPages[i].Text, Font, tabimage); gr.SmoothingMode = SmoothingMode.Default; }
/// <summary> /// Initialize a new instance of the NavigatorBar class. /// </summary> /// <param name="navigator">Reference to owning navigator instance.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public NavigatorBar(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); // Remember back reference _navigator = navigator; // Store the provided paint notification delegate NeedPaint = needPaint; // Default values _barAnimation = true; _barFirstItemInset = 0; _barLastItemInset = 0; _barOrientation = VisualOrientation.Top; _barMinimumHeight = _defaultBarMinimumHeight; _barMultiline = BarMultiline.Singleline; _checkButtonStyle = ButtonStyle.Standalone; _tabStyle = TabStyle.HighProfile; _tabBorderStyle = TabBorderStyle.RoundedOutsizeMedium; _itemAlignment = RelativePositionAlign.Near; _itemMinimumSize = _defaultItemMinimumSize; _itemMaximumSize = _defaultItemMaximumSize; _itemOrientation = ButtonOrientation.Auto; _itemSizing = BarItemSizing.SameHeight; _barMapImage = MapKryptonPageImage.Small; _barMapText = MapKryptonPageText.TextTitle; _barMapExtraText = MapKryptonPageText.None; }
/// <summary> /// Initializes a new instance of the <see cref="ClipboardWriter"/> class. /// </summary> /// <param name="builder">The builder<see cref="StringBuilder"/></param> /// <param name="tabStyle">The tabStyle<see cref="TabStyle"/></param> /// <param name="useClipboard">The useClipboard<see cref="bool"/></param> public ClipboardWriter(StringBuilder builder, TabStyle tabStyle = TabStyle.QuadrupleSpace, bool useClipboard = false) : this( new StringWriter(builder), tabStyle, useClipboard) { _builder = builder; UseClipboard = useClipboard; }
public void TabStyleConstructor() { tlog.Debug(tag, $"TabStyleConstructor START"); var testingTarget = new TabStyle(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <TabStyle>(testingTarget, "Should return TabStyle instance."); tlog.Debug(tag, $"TabStyleConstructor END (OK)"); }
private void tabStyles_CheckedChanged(object sender, EventArgs e) { // Cast to correct type RadioButton rb = (RadioButton)sender; if (rb.Checked) { TabStyle enumVal = (TabStyle)Enum.Parse(typeof(TabStyle), rb.Tag.ToString()); kryptonNavigator.Bar.TabStyle = enumVal; } }
public void TabStyleConstructorWithTabStyle() { tlog.Debug(tag, $"TabStyleConstructorWithTabStyle START"); TabStyle style = new TabStyle(); var testingTarget = new TabStyle(style); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <TabStyle>(testingTarget, "Should return TabStyle instance."); tlog.Debug(tag, $"ScrollBarStyleConstructorWithScrollBarStyle END (OK)"); }
public void TabStyleItemPadding() { tlog.Debug(tag, $"TabStyleItemPadding START"); var testingTarget = new TabStyle(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <TabStyle>(testingTarget, "Should return TabStyle instance."); testingTarget.ItemPadding = new Extents(4, 4, 4, 4); tlog.Debug(tag, "ItemPadding : " + testingTarget.ItemPadding); tlog.Debug(tag, $"TabStyleItemPadding END (OK)"); }
public void TabStyleItemSpace() { tlog.Debug(tag, $"TabStyleItemSpace START"); var testingTarget = new TabStyle(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <TabStyle>(testingTarget, "Should return TabStyle instance."); testingTarget.ItemSpace = 5; tlog.Debug(tag, "ItemSpace : " + testingTarget.ItemSpace); tlog.Debug(tag, $"TabStyleItemSpace END (OK)"); }
internal static TabStyleProvider CreateProvider(MgTabControl tabControl, TabStyle tabStyle) { TabStyleProvider provider; // Depending on the display style of the tabControl generate an appropriate provider. switch (tabStyle) { //case TabStyle.None: // provider = new TabStyleNoneProvider(tabControl); // break; case TabStyle.Default: provider = new TabStyleDefaultProvider(tabControl); break; //case TabStyle.Angled: // provider = new TabStyleAngledProvider(tabControl); // break; //case TabStyle.Rounded: // provider = new TabStyleRoundedProvider(tabControl); // break; //case TabStyle.VisualStudio: // provider = new TabStyleVisualStudioProvider(tabControl); // break; //case TabStyle.Chrome: // provider = new TabStyleChromeProvider(tabControl); // break; //case TabStyle.IE8: // provider = new TabStyleIE8Provider(tabControl); // break; //case TabStyle.VS2010: // provider = new TabStyleVS2010Provider(tabControl); // break; default: provider = new TabStyleDefaultProvider(tabControl); Debug.Assert(false, "Invalid tab style."); break; } return(provider); }
public void TabStyleUseTextNaturalSize() { tlog.Debug(tag, $"TabStyleUseTextNaturalSize START"); var testingTarget = new TabStyle(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <TabStyle>(testingTarget, "Should return TabStyle instance."); testingTarget.UseTextNaturalSize = true; tlog.Debug(tag, "UseTextNaturalSize : " + testingTarget.UseTextNaturalSize); testingTarget.UseTextNaturalSize = false; tlog.Debug(tag, "UseTextNaturalSize : " + testingTarget.UseTextNaturalSize); tlog.Debug(tag, $"TabStyleUseTextNaturalSize END (OK)"); }
public void TabContructorWithTabStyle() { tlog.Debug(tag, $"TabContructorWithTabStyle START"); TabStyle style = new TabStyle() { Size = new Size(100, 200), }; var testingTarget = new Tab(style); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <Tab>(testingTarget, "Should return Tab instance."); testingTarget.Dispose(); tlog.Debug(tag, $"TabContructorWithTabStyle END (OK)"); }
private void DrawTab(Graphics gr, Rectangle area, string text, Image img, bool selected, bool mouseover) { if (TabStyle == null) { throw new ArgumentNullException("Custom style not attached"); } Color tabc1 = (Enabled) ? (mouseover ? TabMouseOverColor : (selected ? TabSelectedColor : TabNotSelectedColor)) : TabNotSelectedColor.Multiply(BackDisabledScaling); Color tabc2 = tabc1.Multiply(TabColorScaling); Color taboutline = TabControlBorderColor; TabStyle.DrawTab(gr, area, selected, tabc1, tabc2, taboutline, TabStyleCustom.TabAlignment.Top); Color tabtextc = (Enabled) ? ((selected) ? ForeColor : TextNotSelectedColor) : TextNotSelectedColor.Multiply(ForeDisabledScaling); TabStyle.DrawText(gr, area, selected, tabtextc, text, Font, img); }
/// <summary> /// Update the remap target to match the tab style. /// </summary> /// <param name="style">Tab style to match.</param> public void SetRemapTarget(TabStyle style) { switch (style) { case TabStyle.HighProfile: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabHighProfile; break; case TabStyle.StandardProfile: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabStandardProfile; break; case TabStyle.LowProfile: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabLowProfile; break; case TabStyle.OneNote: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabOneNote; break; case TabStyle.Dock: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabDock; break; case TabStyle.DockAutoHidden: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabDockAutoHidden; break; case TabStyle.Custom1: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabCustom1; break; case TabStyle.Custom2: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabCustom2; break; case TabStyle.Custom3: RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.TabCustom3; break; default: Debug.Assert(false); break; } }
public void TabStyleUnderLine() { tlog.Debug(tag, $"TabStyleUnderLine START"); var testingTarget = new TabStyle(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <TabStyle>(testingTarget, "Should return TabStyle instance."); ViewStyle underline = new ViewStyle() { Size = new Size(2, 18), }; testingTarget.UnderLine = underline; tlog.Debug(tag, "UnderLine : " + testingTarget.UnderLine); tlog.Debug(tag, $"TabStyleUnderLine END (OK)"); }
public void TabStyleText() { tlog.Debug(tag, $"TabStyleText START"); var testingTarget = new TabStyle(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <TabStyle>(testingTarget, "Should return TabStyle instance."); TextLabelStyle text = new TextLabelStyle() { Size = new Size(2, 18), PointSize = 15.0f }; testingTarget.Text = text; tlog.Debug(tag, "Text : " + testingTarget.Text); tlog.Debug(tag, $"TabStyleText END (OK)"); }
// TODO: Add third argument? public void CreateTab(TabStyle style, string name, string text) { tabs.TabPages.Add(name, text); int curIdx = tabs.TabPages.IndexOfKey(name); switch (style) { case TabStyle.RDB: // Generate controls for tab and set events tabs.TabPages[curIdx].Controls.Add(new rdbTab() { Name = string.Format("tab_{0}_controls", curIdx), Dock = DockStyle.Fill }); // Set encodings for this tab getRDBControls(name).SetEncodings(Encodings.Names); // Load structure names for this tab getRDBControls(name).SetStructuresNames(StructureManager.GetNames()); // Set events getRDBControls(name).SetStructureListChangedEvent(structureList_SelectedIndexChanged); getRDBControls(name).SetStructureListBtnClickEvent(loadStructBtn_Click); getRDBControls(name).SetGridCellValueNeededEvent(Grid.Grid_CellValueNeeded); getRDBControls(name).SetGridCellValuePushedEvent(Grid.Grid_CellPushed); getRDBControls(name).SetEncodingListChangedEvent(encoding_SelectedIndexChanged); getRDBControls(name).SetSearchDataBtnClickEvent(searchDataBtn_Click); // Add IO engine instance for this tab rdbCores.Add(new Core(RDBControls.EncodingValue)); // Register events from this core rdbCores[curIdx].ProgressMaxChanged += GUI_ProgressMaxChanged; rdbCores[curIdx].ProgressValueChanged += GUI_ProgressValueChanged; break; } }
/// <summary> /// Update the palette styles using a tab style. /// </summary> /// <param name="tabStyle">New tab style.</param> public void SetStyles(TabStyle tabStyle) { switch (tabStyle) { case TabStyle.HighProfile: SetStyles(PaletteBackStyle.TabHighProfile, PaletteBorderStyle.TabHighProfile, PaletteContentStyle.TabHighProfile); break; case TabStyle.StandardProfile: SetStyles(PaletteBackStyle.TabStandardProfile, PaletteBorderStyle.TabStandardProfile, PaletteContentStyle.TabStandardProfile); break; case TabStyle.LowProfile: SetStyles(PaletteBackStyle.TabLowProfile, PaletteBorderStyle.TabLowProfile, PaletteContentStyle.TabLowProfile); break; case TabStyle.OneNote: SetStyles(PaletteBackStyle.TabOneNote, PaletteBorderStyle.TabOneNote, PaletteContentStyle.TabOneNote); break; case TabStyle.Dock: SetStyles(PaletteBackStyle.TabDock, PaletteBorderStyle.TabDock, PaletteContentStyle.TabDock); break; case TabStyle.DockAutoHidden: SetStyles(PaletteBackStyle.TabDockAutoHidden, PaletteBorderStyle.TabDockAutoHidden, PaletteContentStyle.TabDockAutoHidden); break; case TabStyle.Custom1: SetStyles(PaletteBackStyle.TabCustom1, PaletteBorderStyle.TabCustom1, PaletteContentStyle.TabCustom1); break; case TabStyle.Custom2: SetStyles(PaletteBackStyle.TabCustom2, PaletteBorderStyle.TabCustom2, PaletteContentStyle.TabCustom2); break; case TabStyle.Custom3: SetStyles(PaletteBackStyle.TabCustom3, PaletteBorderStyle.TabCustom3, PaletteContentStyle.TabCustom3); break; default: // Should never happen! Debug.Assert(false); break; } }
private void CreateTabView() { // Init parent of TabView parentView[1] = new View(); parentView[1].Size = new Size(1920, 200); parentView[1].Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Horizontal, LinearAlignment = LinearLayout.Alignment.Center, CellPadding = new Size2D(100, 0) }; root.Add(parentView[1]); ///////////////////////////////////////////////Create by Property////////////////////////////////////////////////////////// tab = new Tab(); tab.Size = new Size(700, 108); tab.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.5f); tab.Underline.Size = new Size(1, 3); tab.Underline.BackgroundColor = color[0]; tab.PointSize = 25; tab.TextColorSelector = new ColorSelector { Normal = Color.Black, Selected = color[0], }; tab.ItemChangedEvent += TabItemChangedEvent; parentView[1].Add(tab); for (int i = 0; i < 3; i++) { Tab.TabItemData item = new Tab.TabItemData(); item.Text = "Tab " + i; if (i == 1) { item.Text = "Long Tab " + i; } tab.AddItem(item); } tab.SelectedItemIndex = 0; ///////////////////////////////////////////////Create by Style////////////////////////////////////////////////////////// TabStyle st = new TabStyle { //IsNatureTextWidth = false, ItemPadding = new Extents(56, 56, 1, 0), UnderLine = new ViewStyle { Size = new Size(1, 3), PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft, PivotPoint = Tizen.NUI.PivotPoint.BottomLeft, BackgroundColor = new Selector <Color> { All = color[0] }, }, Text = new TextLabelStyle { PointSize = new Selector <float?> { All = 25 }, TextColor = new Selector <Color> { Normal = Color.Black, Selected = color[0], }, }, }; tab2 = new Tab(st); tab2.Size = new Size(500, 108); tab2.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.5f); tab2.ItemChangedEvent += Tab2ItemChangedEvent; parentView[1].Add(tab2); for (int i = 0; i < 3; i++) { Tab.TabItemData item = new Tab.TabItemData(); item.Text = "Tab " + i; tab2.AddItem(item); } tab2.SelectedItemIndex = 0; }
public void Activate() { Window window = Window.Instance; root = new View() { Size2D = new Size2D(1920, 1080), }; window.Add(root); ///////////////////////////////////////////////Create by Property////////////////////////////////////////////////////////// createText[0] = new TextLabel(); createText[0].Text = "Create Tab just by properties"; createText[0].Size2D = new Size2D(450, 100); createText[0].Position2D = new Position2D(200, 100); createText[0].MultiLine = true; root.Add(createText[0]); tab = new Tab(); tab.Size2D = new Size2D(700, 108); tab.Position2D = new Position2D(100, 300); tab.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.5f); //tab.IsNatureTextWidth = true; //tab.ItemGap = 40; //tab.LeftSpace = 56; //tab.RightSpace = 56; //tab.TopSpace = 1; //tab.BottomSpace = 0; tab.Style.UnderLine.Size = new Size(1, 3); tab.Style.UnderLine.BackgroundColor = color[0]; tab.Style.Text.PointSize = 25; tab.Style.Text.TextColor = new Selector <Color> { Normal = Color.Black, Selected = color[0], }; tab.ItemChangedEvent += TabItemChangedEvent; root.Add(tab); for (int i = 0; i < 3; i++) { Tab.TabItemData item = new Tab.TabItemData(); item.Text = "Tab " + i; if (i == 1) { item.Text = "Long Tab " + i; } tab.AddItem(item); } tab.SelectedItemIndex = 0; ///////////////////////////////////////////////Create by Attributes////////////////////////////////////////////////////////// createText[1] = new TextLabel(); createText[1].Text = "Create Tab just by Attributes"; createText[1].Size2D = new Size2D(450, 100); createText[1].Position2D = new Position2D(1000, 100); createText[1].MultiLine = true; root.Add(createText[1]); TabStyle attrs = new TabStyle { //IsNatureTextWidth = false, ItemPadding = new Extents(56, 56, 1, 0), UnderLine = new ViewStyle { Size = new Size(1, 3), PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft, PivotPoint = Tizen.NUI.PivotPoint.BottomLeft, BackgroundColor = new Selector <Color> { All = color[0] }, }, Text = new TextLabelStyle { PointSize = new Selector <float?> { All = 25 }, TextColor = new Selector <Color> { Normal = Color.Black, Selected = color[0], }, }, }; tab2 = new Tab(attrs); tab2.Size2D = new Size2D(500, 108); tab2.Position2D = new Position2D(900, 300); tab2.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.5f); tab2.ItemChangedEvent += Tab2ItemChangedEvent; root.Add(tab2); for (int i = 0; i < 3; i++) { Tab.TabItemData item = new Tab.TabItemData(); item.Text = "Tab " + i; tab2.AddItem(item); } tab2.SelectedItemIndex = 0; button = new Button(); button.Style.BackgroundImage = CommonResource.GetTVResourcePath() + "component/c_buttonbasic/c_basic_button_white_bg_normal_9patch.png"; button.Style.BackgroundImageBorder = new Rectangle(4, 4, 5, 5); button.Size2D = new Size2D(280, 80); button.Position2D = new Position2D(400, 700); button.Style.Text.Text = mode[index]; button.ClickEvent += ButtonClickEvent; root.Add(button); button2 = new Button(); button2.Style.BackgroundImage = CommonResource.GetTVResourcePath() + "component/c_buttonbasic/c_basic_button_white_bg_normal_9patch.png"; button2.Style.BackgroundImageBorder = new Rectangle(4, 4, 5, 5); button2.Size2D = new Size2D(580, 80); button2.Position2D = new Position2D(250, 500); button2.Style.Text.Text = "LayoutDirection is left to right"; button2.ClickEvent += ButtonClickEvent2; root.Add(button2); }
public void Style(TabStyle style) { background.color = style.tabColor; text.color = style.fontColor; }
/// <summary> /// Creates a new TabConfiguration instance. /// </summary> public TabConfiguration() { _tabStyle = TabStyle.Spaces; _spacesPerTab = 4; }
/// <summary> /// Initializes a new instance of the <see cref="ClipboardWriter"/> class. /// </summary> /// <param name="writer">The writer<see cref="TextWriter"/></param> /// <param name="tabStyle">The tabStyle<see cref="TabStyle"/></param> /// <param name="useClipboard">The useClipboard<see cref="bool"/></param> public ClipboardWriter(TextWriter writer, TabStyle tabStyle = TabStyle.QuadrupleSpace, bool useClipboard = true) : base(writer, ConvertToSpaces(tabStyle)) { UseClipboard = useClipboard; }
/// <summary> /// Initializes a new instance of the <see cref="ClipboardWriter"/> class. /// </summary> /// <param name="tabStyle">The tabStyle<see cref="TabStyle"/></param> /// <param name="useClipboard">The useClipboard<see cref="bool"/></param> public ClipboardWriter(TabStyle tabStyle = TabStyle.QuadrupleSpace, bool useClipboard = true) : this(new StringWriter(), tabStyle, useClipboard) { }
protected override void Render(HtmlTextWriter output) { int index = 0; int visiblePageCount = 0; int capWidth = ((UddiBrowser.IsDownlevel && !UddiBrowser.IsNetscape6) ? 1 : 4); output.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "0"); output.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0"); output.AddAttribute(HtmlTextWriterAttribute.Border, "0"); if (!UddiBrowser.IsDownlevel || UddiBrowser.IsNetscape6) { output.AddAttribute(HtmlTextWriterAttribute.Width, "100%"); } Style.AddAttributesToRender(output); output.RenderBeginTag(HtmlTextWriterTag.Table); output.RenderBeginTag(HtmlTextWriterTag.Colgroup); foreach (TabPage page in Controls) { if (page.ShouldDisplay) { output.Write("<col width='" + capWidth + "'>"); output.Write("<col>"); output.Write("<col width='" + capWidth + "'>"); } } if (!UddiBrowser.IsDownlevel || UddiBrowser.IsNetscape6) { output.Write("<col width='0*'>"); } output.RenderEndTag(); output.RenderBeginTag(HtmlTextWriterTag.Tr); foreach (TabPage page in Controls) { if (page.ShouldDisplay) { // // Create the begin tab cell. // if (index == SelectedIndex) { TabBeginSelectedStyle.AddAttributesToRender(output); } else { TabBeginStyle.AddAttributesToRender(output); } output.AddAttribute("width", capWidth.ToString()); output.RenderBeginTag(HtmlTextWriterTag.Td); output.Write("<img src='" + ((UddiPage)Page).Root + "/images/trans_pixel.gif' width='" + capWidth + "'>"); output.RenderEndTag(); // // Create the link and text for the tab. // if (index == SelectedIndex) { TabSelectedStyle.AddAttributesToRender(output); } else { TabStyle.AddAttributesToRender(output); } if (!UddiBrowser.IsDownlevel || UddiBrowser.IsNetscape6) { output.AddAttribute("width", "100"); } output.AddAttribute("align", "center"); output.RenderBeginTag(HtmlTextWriterTag.Td); output.AddAttribute(HtmlTextWriterAttribute.Href, "javascript:" + Page.GetPostBackEventReference(this, Convert.ToString(index))); output.Write("<nobr> "); output.RenderBeginTag(HtmlTextWriterTag.A); output.Write(Localization.GetString(page.Name)); output.RenderEndTag(); output.Write(" </nobr>"); output.RenderEndTag(); // // Create the closing tab cell. // if (index == SelectedIndex) { TabEndSelectedStyle.AddAttributesToRender(output); } else { TabEndStyle.AddAttributesToRender(output); } output.AddAttribute("width", capWidth.ToString()); output.RenderBeginTag(HtmlTextWriterTag.Td); output.Write("<img src='" + ((UddiPage)Page).Root + "/images/trans_pixel.gif' width='" + capWidth + "'>"); output.RenderEndTag(); visiblePageCount++; } index++; } // // Render the leftover space at the end of the tabs // if (!UddiBrowser.IsDownlevel || UddiBrowser.IsNetscape6) { TabGapStyle.AddAttributesToRender(output); output.AddAttribute("width", "100%"); output.RenderBeginTag(HtmlTextWriterTag.Td); output.Write("<img src='" + ((UddiPage)Page).Root + "/images/trans_pixel.gif' width='1'>"); output.RenderEndTag(); } // // Add the completed tab row to the table. // output.RenderEndTag(); // // Test to see if we can fix the table spacing problems in IE6 // Task: Split the table in to tables // output.RenderEndTag(); output.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "10"); output.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0"); output.AddAttribute(HtmlTextWriterAttribute.Width, "100%"); if (UddiBrowser.IsDownlevel && !UddiBrowser.IsNetscape6) { output.AddAttribute(HtmlTextWriterAttribute.Border, "1"); output.AddAttribute(HtmlTextWriterAttribute.Bordercolor, "#639ace"); } output.AddAttribute(HtmlTextWriterAttribute.Bgcolor, "#f0f8ff"); TabBodyStyle.AddAttributesToRender(output); output.RenderBeginTag(HtmlTextWriterTag.Table); output.RenderBeginTag(HtmlTextWriterTag.Tr); output.AddAttribute("valign", "top"); output.RenderBeginTag(HtmlTextWriterTag.Td); if (((UddiPage)Page).EditMode && tabSwitch) { output.AddAttribute("color", "red"); output.RenderBeginTag(HtmlTextWriterTag.Font); output.Write(Localization.GetString("ERROR_FINISH_EDIT")); output.RenderEndTag(); output.Write("<br><br>"); } this.Controls[SelectedIndex].RenderControl(output); output.RenderEndTag(); output.RenderEndTag(); output.RenderEndTag(); output.Write("<br>"); /* * // * // Create the tab page content * // * //if( UddiBrowser.IsDownlevel ) * //{ * output.RenderEndTag(); * * output.AddAttribute( HtmlTextWriterAttribute.Cellpadding, "10" ); * output.AddAttribute( HtmlTextWriterAttribute.Cellspacing, "0" ); * output.AddAttribute( HtmlTextWriterAttribute.Width, "100%" ); * output.AddAttribute( HtmlTextWriterAttribute.Border, "1" ); * output.AddAttribute( HtmlTextWriterAttribute.Bordercolor, "#639ace" ); * output.AddAttribute( HtmlTextWriterAttribute.Bgcolor, "#f0f8ff" ); * output.RenderBeginTag( HtmlTextWriterTag.Table ); * * output.RenderBeginTag( HtmlTextWriterTag.Tr ); * output.RenderBeginTag( HtmlTextWriterTag.Td ); * * if( ((UddiPage)Page).EditMode && tabSwitch ) * { * output.AddAttribute( "color", "red" ); * output.RenderBeginTag( HtmlTextWriterTag.Font ); * output.Write( Localization.GetString( "ERROR_FINISH_EDIT" ) ); * output.RenderEndTag(); * output.Write( "<br><br>" ); * } * * this.Controls[ SelectedIndex ].RenderControl( output ); * * output.RenderEndTag(); * output.RenderEndTag(); * output.RenderEndTag(); * output.Write( "<br>" ); * } * else * { * * output.RenderBeginTag( HtmlTextWriterTag.Tr ); * * TabPageStyle.AddAttributesToRender( output ); * output.AddAttribute( HtmlTextWriterAttribute.Valign, "top" ); * output.AddAttribute( HtmlTextWriterAttribute.Colspan, Convert.ToString( visiblePageCount * 3 + 1 ) ); * output.RenderBeginTag( HtmlTextWriterTag.Td ); * * if( ((UddiPage)Page).EditMode && tabSwitch ) * { * output.AddAttribute( "color", "red" ); * output.RenderBeginTag( HtmlTextWriterTag.Font ); * output.Write( Localization.GetString( "ERROR_FINISH_EDIT" ) ); * output.RenderEndTag(); * output.Write( "<br><br>" ); * } * * this.Controls[ SelectedIndex ].RenderControl( output ); * * output.RenderEndTag(); * output.RenderEndTag(); * output.RenderEndTag(); * } */ }