From 1da3fa560fcda70659a02193cedf0a7519cfc21d Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 5 Dec 2006 04:11:38 +0000 Subject: [PATCH] 2006-12-04 Chris Toshok * LinkLabel.cs: fix up compiler warnings. * TableLayoutSettings.cs: same. * TreeView.cs: same. * ToolBar.cs: same. * TabControl.cs: same. * RichTextBox.cs: same. * ListViewItem.cs: same. * PropertyGrid.cs: same. * DataGridViewRowPostPaintEventArgs.cs: corcompare fix. * ToolTip.cs same. * TextRenderer.cs: fix up compiler warnings. * Label.cs: same. * Form.cs: corcompare fixes. * PictureBox.cs: fix up compiler warnings. * ImageListStreamer.cs: same. * TrackBar.cs: corcompare fix. * Control.cs: fix up compiler warnings. * SplitterPanel.cs: same. * NumericTextBox.cs: same. * ImageList.cs: same. * StatusStrip.cs: same. * ProgressBar.cs: corcompare fix. * ToolStripButton.cs: fix up compiler warnings. * ToolStripStatusLabel.cs: same. * ToolStripSplitButton.cs: same. * ToolStripSeparator.cs: same. * ToolStripProgressBar.cs: same. * ToolStripDropDownMenu.cs: same * ToolStripDropDown.cs: same. * ToolStripDropDownButton.cs: same. * ToolStrip.cs: same. * ToolStripControlHost.cs: same. * ToolStripContentPanel.cs: same. * ToolStripDropDown.cs: same. * ToolStripContainer.cs: same. * ToolStripPanel.cs: same, and add "new" where we need it to work with the new ArrangedElementCollection. * ToolStripItemCollection.cs: add "new" where we need it to work with the new ArrangedElementCollection. svn path=/trunk/mcs/; revision=69012 --- .../System.Windows.Forms/ChangeLog | 78 +++++++++++++++++++ .../System.Windows.Forms/Control.cs | 18 +++-- .../DataGridViewRowPostPaintEventArgs.cs | 2 +- .../System.Windows.Forms/Form.cs | 17 +++- .../System.Windows.Forms/ImageList.cs | 42 ---------- .../System.Windows.Forms/ImageListStreamer.cs | 7 -- .../System.Windows.Forms/Label.cs | 2 +- .../System.Windows.Forms/LinkLabel.cs | 4 +- .../System.Windows.Forms/ListView.cs | 6 -- .../System.Windows.Forms/ListViewItem.cs | 12 --- .../System.Windows.Forms/MenuStrip.cs | 6 +- .../System.Windows.Forms/NumericTextBox.cs | 2 +- .../System.Windows.Forms/PictureBox.cs | 12 +-- .../System.Windows.Forms/ProgressBar.cs | 6 +- .../System.Windows.Forms/PropertyGrid.cs | 3 +- .../System.Windows.Forms/RichTextBox.cs | 19 +++-- .../System.Windows.Forms/SplitterPanel.cs | 6 +- .../System.Windows.Forms/StatusStrip.cs | 10 +-- .../System.Windows.Forms/TabControl.cs | 10 +-- .../System.Windows.Forms/TabPage.cs | 4 +- .../TableLayoutSettings.cs | 8 +- .../System.Windows.Forms/TextBoxBase.cs | 8 +- .../System.Windows.Forms/TextRenderer.cs | 8 +- .../System.Windows.Forms/ToolBar.cs | 2 +- .../System.Windows.Forms/ToolStrip.cs | 8 +- .../System.Windows.Forms/ToolStripButton.cs | 2 +- .../System.Windows.Forms/ToolStripComboBox.cs | 2 +- .../ToolStripContainer.cs | 26 +++---- .../ToolStripContentPanel.cs | 26 +++---- .../ToolStripControlHost.cs | 16 ++-- .../System.Windows.Forms/ToolStripDropDown.cs | 66 ++++++++-------- .../ToolStripDropDownButton.cs | 4 +- .../ToolStripDropDownMenu.cs | 4 +- .../ToolStripItemCollection.cs | 8 +- .../System.Windows.Forms/ToolStripPanel.cs | 26 +++---- .../ToolStripProgressBar.cs | 16 ++-- .../ToolStripSeparator.cs | 24 +++--- .../ToolStripSplitButton.cs | 4 +- .../ToolStripStatusLabel.cs | 4 +- .../System.Windows.Forms/ToolTip.cs | 6 +- .../System.Windows.Forms/TrackBar.cs | 2 +- .../System.Windows.Forms/TreeView.cs | 28 ------- 42 files changed, 283 insertions(+), 281 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 0c39cf1567a..c2c01ff8c83 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,81 @@ +2006-12-04 Chris Toshok + + * LinkLabel.cs: fix up compiler warnings. + + * TableLayoutSettings.cs: same. + + * TreeView.cs: same. + + * ToolBar.cs: same. + + * TabControl.cs: same. + + * RichTextBox.cs: same. + + * ListViewItem.cs: same. + + * PropertyGrid.cs: same. + + * DataGridViewRowPostPaintEventArgs.cs: corcompare fix. + + * ToolTip.cs same. + + * TextRenderer.cs: fix up compiler warnings. + + * Label.cs: same. + + * Form.cs: corcompare fixes. + + * PictureBox.cs: fix up compiler warnings. + + * ImageListStreamer.cs: same. + + * TrackBar.cs: corcompare fix. + + * Control.cs: fix up compiler warnings. + + * SplitterPanel.cs: same. + + * NumericTextBox.cs: same. + + * ImageList.cs: same. + + * StatusStrip.cs: same. + + * ProgressBar.cs: corcompare fix. + + * ToolStripButton.cs: fix up compiler warnings. + + * ToolStripStatusLabel.cs: same. + + * ToolStripSplitButton.cs: same. + + * ToolStripSeparator.cs: same. + + * ToolStripProgressBar.cs: same. + + * ToolStripDropDownMenu.cs: same + + * ToolStripDropDown.cs: same. + + * ToolStripDropDownButton.cs: same. + + * ToolStrip.cs: same. + + * ToolStripControlHost.cs: same. + + * ToolStripContentPanel.cs: same. + + * ToolStripDropDown.cs: same. + + * ToolStripContainer.cs: same. + + * ToolStripPanel.cs: same, and add "new" where we need it to work + with the new ArrangedElementCollection. + + * ToolStripItemCollection.cs: add "new" where we need it to work + with the new ArrangedElementCollection. + 2006-12-04 Andreia Gaita * TabControl.cs: Fix default tab selection to after TabControl diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs index b91eccb8b27..cdc79029cd0 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs @@ -125,14 +125,14 @@ namespace System.Windows.Forms private ControlBindingsCollection data_bindings; #if NET_2_0 - internal bool use_compatible_text_rendering; - static internal bool verify_thread_handle; - private Padding padding; - private Size maximum_size; - private Size minimum_size; - private Size preferred_size; - private Padding margin; - internal Layout.LayoutEngine layout_engine; + internal bool use_compatible_text_rendering; + static bool verify_thread_handle; + Padding padding; + Size maximum_size; + Size minimum_size; + Size preferred_size; + Padding margin; + Layout.LayoutEngine layout_engine; #endif #endregion // Local Variables @@ -2957,12 +2957,14 @@ namespace System.Windows.Forms PerformLayout(null, null); } +#if !NET_2_0 private void SetImplicitBounds (int x, int y, int width, int height) { Rectangle saved_bounds = explicit_bounds; SetBounds (x, y, width, height); explicit_bounds = saved_bounds; } +#endif [EditorBrowsable(EditorBrowsableState.Advanced)] public void PerformLayout(Control affectedControl, string affectedProperty) { diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewRowPostPaintEventArgs.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewRowPostPaintEventArgs.cs index 0229bfe8f05..5f7d4bc1552 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewRowPostPaintEventArgs.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewRowPostPaintEventArgs.cs @@ -31,7 +31,7 @@ using System.Drawing; namespace System.Windows.Forms { - public class DataGridViewRowPostPaintEventArgs : HandledEventArgs { + public class DataGridViewRowPostPaintEventArgs : EventArgs { private DataGridView dataGridView; private Graphics graphics; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs index 1cfed4eba31..75ce21698d9 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs @@ -253,7 +253,10 @@ namespace System.Windows.Forms { } } +#if NET_2_0 +#else [DefaultValue(true)] +#endif [MWFCategory("Layout")] public bool AutoScale { get { @@ -514,7 +517,11 @@ namespace System.Windows.Forms { [Localizable(true)] [RefreshProperties(RefreshProperties.Repaint)] [MWFCategory("Layout")] - public Size MaximumSize { + public +#if NET_2_0 + override +#endif + Size MaximumSize { get { return maximum_size; } @@ -685,11 +692,17 @@ namespace System.Windows.Forms { } } +#if !NET_2_0 [DefaultValue("{Width=0, Height=0}")] +#endif [Localizable(true)] [RefreshProperties(RefreshProperties.Repaint)] [MWFCategory("Layout")] - public Size MinimumSize { + public +#if NET_2_0 + override +#endif + Size MinimumSize { get { return minimum_size; } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs index 28444830174..32a0490c097 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs @@ -974,48 +974,6 @@ namespace System.Windows.Forms if (eh != null) eh (this, EventArgs.Empty); } - -#if NET_2_0 - // For use in Designers - private void ResetColorDepth() - { - this.ColorDepth = DefaultColorDepth; - } - - // For use in Designers - private void ResetImageSize() - { - this.ImageSize = DefaultImageSize; - } - - // For use in Designers - private void ResetTransparentColor() - { - this.TransparentColor = DefaultTransparentColor; - } - - // For use in Designers - private bool ShouldSerializeColorDepth() - { - // ColorDepth is serialized in ImageStream when non-empty. - // It is serialized even if it has its default value when empty. - return images.Empty; - } - - // For use in Designers - private bool ShouldSerializeImageSize() - { - // ImageSize is serialized in ImageStream when non-empty. - // It is serialized even if it has its default value when empty. - return images.Empty; - } - - // For use in Designers - private bool ShouldSerializeTransparentColor() - { - return this.TransparentColor != DefaultTransparentColor; - } -#endif #endregion // Private Instance Methods #region Public Instance Properties diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs index 37f666af8ac..4d6691a8a1f 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs @@ -48,13 +48,6 @@ namespace System.Windows.Forms { this.imageCollection = imageCollection; } - static int GetInt (Stream st) - { - byte [] bytes = new byte [4]; - st.Read (bytes, 0, 4); - return (bytes [0] + (bytes [1] << 8) + (bytes [2] << 16) + (bytes [3] << 24)); - } - private ImageListStreamer (SerializationInfo info, StreamingContext context) { byte [] data = (byte []) info.GetValue ("Data", typeof (byte [])); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs index d4fddad3a62..160944a7f21 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs @@ -174,7 +174,7 @@ namespace System.Windows.Forms [DefaultValue(false)] [Localizable(true)] [RefreshProperties(RefreshProperties.All)] - public virtual bool AutoSize { + public new virtual bool AutoSize { get { return autosize; } set { if (autosize == value) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs index ef342109fb6..26cdd6096b9 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs @@ -68,7 +68,6 @@ namespace System.Windows.Forms private LinkCollection link_collection; internal Link[] sorted_links; private bool link_visited; - private bool link_click; internal Piece[] pieces; internal Font link_font; private Cursor override_cursor; @@ -94,7 +93,6 @@ namespace System.Windows.Forms LinkArea = new LinkArea (0, -1); link_behavior = LinkBehavior.SystemDefault; link_visited = false; - link_click = false; pieces = null; link_font = null; focused_index = -1; @@ -992,7 +990,7 @@ namespace System.Windows.Forms } #if NET_2_0 - public bool UseCompatibleTextRendering { + public new bool UseCompatibleTextRendering { get { return use_compatible_text_rendering; } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs index 153ca98f6c9..067b804281f 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs @@ -1135,12 +1135,6 @@ namespace System.Windows.Forms CalculateScrollBars (); } - bool HaveModKeys { - get { - return (XplatUI.State.ModifierKeys & (Keys.Control | Keys.Shift)) != 0; - } - } - private bool KeySearchString (KeyEventArgs ke) { int current_tickcnt = Environment.TickCount; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs index 8c93ed66809..50d39467beb 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs @@ -453,18 +453,6 @@ namespace System.Windows.Forms } } - Rectangle CheckRect { - get { return this.checkbox_rect; } - } - - Rectangle IconRect { - get { return this.icon_rect; } - } - - Rectangle LabelRect { - get { return this.label_rect; } - } - internal Point Location { set { if (bounds.X == value.X && bounds.Y == value.Y) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs index eda56f64100..f9b821ed355 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs @@ -55,19 +55,19 @@ namespace System.Windows.Forms } [DefaultValue (ToolStripGripStyle.Hidden)] - public ToolStripGripStyle GripStyle { + public new ToolStripGripStyle GripStyle { get { return base.GripStyle; } set { base.GripStyle = value; } } [DefaultValue (false)] - public bool ShowItemToolTips { + public new bool ShowItemToolTips { get { return base.ShowItemToolTips; } set { base.ShowItemToolTips = value; } } [DefaultValue (true)] - public bool Stretch { + public new bool Stretch { get { return base.stretch; } set { base.stretch = value; } } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericTextBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericTextBox.cs index 20a96456817..c02aa648021 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericTextBox.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericTextBox.cs @@ -57,7 +57,7 @@ namespace System.Windows.Forms } } - protected void OnLostFocus (EventArgs args) + protected override void OnLostFocus (EventArgs args) { // Update to the last valid value string val = Value.ToString (); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PictureBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PictureBox.cs index 18e6ce80ca2..4abfa218d9e 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PictureBox.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PictureBox.cs @@ -44,7 +44,6 @@ namespace System.Windows.Forms { private Image image; private PictureBoxSizeMode size_mode; //private bool recalc; - private bool allow_drop; private Image initial_image; private int no_update; #endregion // Fields @@ -55,7 +54,6 @@ namespace System.Windows.Forms { public PictureBox () { //recalc = true; - allow_drop = false; #if NET_2_0 SetStyle (ControlStyles.OptimizedDoubleBuffer, true); #else @@ -197,14 +195,8 @@ namespace System.Windows.Forms { [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public override bool AllowDrop { - get { - return allow_drop; - } - set { - if (allow_drop != value) { - allow_drop = value; - } - } + get { return base.AllowDrop; } + set { base.AllowDrop = value; } } #endregion // Public Properties diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ProgressBar.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ProgressBar.cs index 1444eb3e55a..e993445b94f 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ProgressBar.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ProgressBar.cs @@ -34,7 +34,11 @@ using System.Drawing.Drawing2D; namespace System.Windows.Forms { [DefaultProperty ("Value")] - public sealed class ProgressBar : Control + public +#if !NET_2_0 + sealed +#endif + class ProgressBar : Control { #region Local Variables private int maximum; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs index 1597774f8fd..a95c5ae4c4c 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs @@ -73,7 +73,6 @@ namespace System.Windows.Forms { internal Panel help_panel; internal Label help_title_label; internal Label help_description_label; - private ContextMenu context_menu; private MenuItem reset_menuitem; private MenuItem description_menuitem; private object current_property_value; @@ -130,7 +129,7 @@ namespace System.Windows.Forms { alphabetic_toolbarbutton = new ToolBarButton(); separator_toolbarbutton = new ToolBarButton(); propertypages_toolbarbutton = new ToolBarButton(); - context_menu = new ContextMenu(); + ContextMenu context_menu = new ContextMenu(); toolbar_imagelist = new ImageList(); toolbar_imagelist.ColorDepth = ColorDepth.Depth32Bit; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs index 1c5cba7df19..17b5752ed87 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs @@ -1065,7 +1065,7 @@ namespace System.Windows.Forms { } protected virtual void OnSelectionChanged(EventArgs e) { - EventHandler eh = (EventHandler)(Events [SelectionChanged]); + EventHandler eh = (EventHandler)(Events [SelectionChangedEvent]); if (eh != null) eh (this, e); } @@ -1079,9 +1079,9 @@ namespace System.Windows.Forms { } protected virtual void OnVScroll(EventArgs e) { - if (VScroll != null) { - VScroll(this, e); - } + EventHandler eh = (EventHandler)(Events [VScrollEvent]); + if (eh != null) + eh (this, e); } protected override void WndProc(ref Message m) { @@ -1181,8 +1181,15 @@ namespace System.Windows.Forms { remove { base.QueryContinueDrag -= value; } } - public event EventHandler SelectionChanged; - public event EventHandler VScroll; + public event EventHandler SelectionChanged { + add { Events.AddHandler (SelectionChangedEvent, value); } + remove { Events.RemoveHandler (SelectionChangedEvent, value); } + } + + public event EventHandler VScroll { + add { Events.AddHandler (VScrollEvent, value); } + remove { Events.RemoveHandler (VScrollEvent, value); } + } #endregion // Events #region Private Methods diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitterPanel.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitterPanel.cs index 1c7546066fc..302b476e62d 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitterPanel.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitterPanel.cs @@ -39,11 +39,11 @@ namespace System.Windows.Forms [ClassInterfaceAttribute (ClassInterfaceType.AutoDispatch)] public sealed class SplitterPanel : Panel { - private SplitContainer owner; + //private SplitContainer owner; public SplitterPanel (SplitContainer owner) { - this.owner = owner; + //this.owner = owner; } #region Public Properties @@ -176,4 +176,4 @@ namespace System.Windows.Forms #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusStrip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusStrip.cs index 4502f5c5d3e..c366b937a1f 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusStrip.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusStrip.cs @@ -62,22 +62,22 @@ namespace System.Windows.Forms } } - public ToolStripGripStyle GripStyle { + public new ToolStripGripStyle GripStyle { get { return base.GripStyle; } set { base.GripStyle = value; } } - public ToolStripLayoutStyle LayoutStyle { + public new ToolStripLayoutStyle LayoutStyle { get { return this.layout_style; } set { this.layout_style = value; } } - public Padding Padding { + public new Padding Padding { get { return base.Padding; } set { base.Padding = value; } } - public bool ShowItemToolTips { + public new bool ShowItemToolTips { get { return base.ShowItemToolTips; } set { base.ShowItemToolTips = value; } } @@ -91,7 +91,7 @@ namespace System.Windows.Forms set { this.sizing_grip = value; } } - public bool Stretch { + public new bool Stretch { get { return this.stretch; } set { this.stretch = value; } } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs index 65114bb5d3f..adfd6c8c942 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs @@ -49,7 +49,6 @@ namespace System.Windows.Forms { private TabPageCollection tab_pages; private bool show_tool_tips; private TabSizeMode size_mode; - private Rectangle display_rect; private bool show_slider = false; private ButtonState right_slider_state; private ButtonState left_slider_state; @@ -181,7 +180,7 @@ namespace System.Windows.Forms { } [Localizable(true)] - public Point Padding { + public new Point Padding { get { return padding; } set { if (value.X < 0 || value.Y < 0) @@ -364,12 +363,6 @@ namespace System.Windows.Forms { get { return left_slider_state; } } - private Size DefaultItemSize { - get { - return ThemeEngine.Current.TabControlDefaultItemSize; - } - } - #endregion // Internal Properties #region Protected Instance Properties @@ -1079,7 +1072,6 @@ namespace System.Windows.Forms { public new class ControlCollection : System.Windows.Forms.Control.ControlCollection { private TabControl owner; - private ArrayList list = new ArrayList (); public ControlCollection (TabControl owner) : base (owner) { diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabPage.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabPage.cs index f0d9fd7e931..182c7e32f1c 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabPage.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabPage.cs @@ -281,11 +281,11 @@ namespace System.Windows.Forms { #region Class TabPageControlCollection public class TabPageControlCollection : ControlCollection { - private TabPage owner; + //private TabPage owner; public TabPageControlCollection (TabPage owner) : base (owner) { - this.owner = owner; + //this.owner = owner; } public override void Add (Control value) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs index cd48738c2bc..5fc51f6e93b 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs @@ -23,6 +23,7 @@ // // (C) 2004 Novell, Inc. // + #if NET_2_0 using System; using System.ComponentModel; @@ -31,8 +32,9 @@ using System.Windows.Forms.Layout; namespace System.Windows.Forms { - public class TableLayoutSettings : LayoutSettings { - TableLayoutPanel panel; + [Serializable] + public sealed class TableLayoutSettings : LayoutSettings { + //TableLayoutPanel panel; ColumnStyleCollection column_style; TableLayoutPanelGrowStyle grow_style; int column_count; @@ -43,7 +45,7 @@ namespace System.Windows.Forms { internal TableLayoutSettings (TableLayoutPanel panel) { - this.panel = panel; + //this.panel = panel; column_count = 0; row_count = 0; grow_style = TableLayoutPanelGrowStyle.AddRows; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs index 73da93ab0be..cf4f8578c4e 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs @@ -192,7 +192,13 @@ namespace System.Windows.Forms { [Localizable(true)] [RefreshProperties(RefreshProperties.Repaint)] [MWFCategory("Behavior")] - public virtual bool AutoSize { + public +#if NET_2_0 + override +#else + virtual +#endif + bool AutoSize { get { return auto_size; } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextRenderer.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextRenderer.cs index 45fd2f6423b..be572119ac0 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextRenderer.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextRenderer.cs @@ -266,14 +266,14 @@ namespace System.Windows.Forms [DllImport ("gdi32")] private extern static IntPtr SelectObject (IntPtr hDC, IntPtr hObject); - [DllImport ("gdi32")] - static extern int SetBkColor (IntPtr hdc, int crColor); + //[DllImport ("gdi32")] + //static extern int SetBkColor (IntPtr hdc, int crColor); [DllImport ("gdi32")] static extern int SetBkMode (IntPtr hdc, int iBkMode); - [DllImport ("gdi32")] - static extern bool GetTextExtentExPoint (IntPtr hdc, string lpszStr, int cchString, int nMaxExtent, IntPtr lpnFit, IntPtr alpDx, out VisualStyles.UXTheme.SIZE lpSize); + //[DllImport ("gdi32")] + //static extern bool GetTextExtentExPoint (IntPtr hdc, string lpszStr, int cchString, int nMaxExtent, IntPtr lpnFit, IntPtr alpDx, out VisualStyles.UXTheme.SIZE lpSize); [DllImport ("gdi32")] static extern bool GetTextExtentPoint32 (IntPtr hdc, string lpString, int cbString, out VisualStyles.UXTheme.SIZE lpSize); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs index 360a3508961..4f951462174 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs @@ -163,7 +163,7 @@ namespace System.Windows.Forms [DefaultValue (true)] [Localizable (true)] - public bool AutoSize { + public new bool AutoSize { get { return autosize; } set { if (value == autosize) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs index 63d5c8096e1..d1670ef285a 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs @@ -152,7 +152,7 @@ namespace System.Windows.Forms } [Browsable (false)] - public Color ForeColor { + public new Color ForeColor { get { return this.fore_color; } set { this.fore_color = value; } } @@ -278,7 +278,7 @@ namespace System.Windows.Forms } [DefaultValue (false)] - public bool TabStop { + public new bool TabStop { get { return base.TabStop; } set { base.TabStop = value; } } @@ -656,7 +656,7 @@ namespace System.Windows.Forms #region Public Events public event EventHandler AutoSizeChanged; [Browsable (false)] - public event EventHandler ForeColorChanged; + public new event EventHandler ForeColorChanged; public event ToolStripItemEventHandler ItemAdded; public event ToolStripItemClickedEventHandler ItemClicked; public event ToolStripItemEventHandler ItemRemoved; @@ -711,4 +711,4 @@ namespace System.Windows.Forms #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs index 35c08bad9cd..6aabc25f292 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs @@ -75,7 +75,7 @@ namespace System.Windows.Forms #region Public Properties [MonoTODO ("Need 2.0 ToolTip to implement tool tips.")] [DefaultValue (true)] - public bool AutoToolTip { + public new bool AutoToolTip { get { return base.AutoToolTip; } set { base.AutoToolTip = value; } } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripComboBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripComboBox.cs index 588772f7624..58673c9060a 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripComboBox.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripComboBox.cs @@ -254,7 +254,7 @@ namespace System.Windows.Forms #region Public Events [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler DoubleClick; + public new event EventHandler DoubleClick; public event EventHandler DropDown; public event EventHandler DropDownClosed; public event EventHandler DropDownStyleChanged; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripContainer.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripContainer.cs index e33226ae363..d8b860df95b 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripContainer.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripContainer.cs @@ -81,25 +81,25 @@ namespace System.Windows.Forms } [Browsable (false)] - public Size AutoScrollMargin { + public new Size AutoScrollMargin { get { return base.AutoScrollMargin; } set { base.AutoScrollMargin = value; } } [Browsable (false)] - public Size AutoScrollMinSize { + public new Size AutoScrollMinSize { get { return base.AutoScrollMinSize; } set { base.AutoScrollMinSize = value; } } [Browsable (false)] - public Color BackColor { + public new Color BackColor { get { return base.BackColor; } set { base.BackColor = value; } } [Browsable (false)] - public Image BackgroundImage { + public new Image BackgroundImage { get { return base.BackgroundImage; } set { base.BackgroundImage = value; } } @@ -116,7 +116,7 @@ namespace System.Windows.Forms } [Browsable (false)] - public bool CausesValidation { + public new bool CausesValidation { get { return base.CausesValidation; } set { base.CausesValidation = value; } } @@ -127,7 +127,7 @@ namespace System.Windows.Forms } [Browsable (false)] - public ControlCollection Controls { + public new ControlCollection Controls { get { return base.Controls; } } @@ -138,7 +138,7 @@ namespace System.Windows.Forms } [Browsable (false)] - public Color ForeColor { + public new Color ForeColor { get { return base.ForeColor; } set { base.ForeColor = value; } } @@ -197,20 +197,20 @@ namespace System.Windows.Forms #region Public Events [Browsable (false)] - public event EventHandler BackColorChanged; + public new event EventHandler BackColorChanged; [Browsable (false)] - public event EventHandler BackgroundImageChanged; + public new event EventHandler BackgroundImageChanged; [Browsable (false)] public event EventHandler BackgroundImageLayoutChanged; [Browsable (false)] - public event EventHandler CausesValidationChanged; + public new event EventHandler CausesValidationChanged; [Browsable (false)] public event EventHandler ContextMenuStripChanged; [Browsable (false)] - public event EventHandler CursorChanged; + public new event EventHandler CursorChanged; [Browsable (false)] - public event EventHandler ForeColorChanged; + public new event EventHandler ForeColorChanged; #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripContentPanel.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripContentPanel.cs index 93f7b4ee1c8..f2c163a6d52 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripContentPanel.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripContentPanel.cs @@ -63,13 +63,13 @@ namespace System.Windows.Forms } [Browsable (false)] - public Size AutoScrollMargin { + public new Size AutoScrollMargin { get { return base.AutoScrollMargin; } set { base.AutoScrollMargin = value; } } [Browsable (false)] - public Size AutoScrollMinSize { + public new Size AutoScrollMinSize { get { return base.AutoScrollMinSize; } set { base.AutoScrollMinSize = value; } } @@ -90,7 +90,7 @@ namespace System.Windows.Forms } [Browsable (false)] - public bool CausesValidation { + public new bool CausesValidation { get { return base.CausesValidation; } set { base.CausesValidation = value; } } @@ -102,7 +102,7 @@ namespace System.Windows.Forms } [Browsable (false)] - public Point Location { + public new Point Location { get { return base.Location; } set { base.Location = value; } } @@ -120,7 +120,7 @@ namespace System.Windows.Forms } [Browsable (false)] - public string Name { + public new string Name { get { return base.Name; } set { base.Name = value; } } @@ -156,13 +156,13 @@ namespace System.Windows.Forms } [Browsable (false)] - public int TabIndex { + public new int TabIndex { get { return base.TabIndex; } set { base.TabIndex = value; } } [Browsable (false)] - public bool TabStop { + public new bool TabStop { get { return base.TabStop; } set { base.TabStop = value; } } @@ -194,18 +194,18 @@ namespace System.Windows.Forms [Browsable (false)] public event EventHandler AutoSizeChanged; [Browsable (false)] - public event EventHandler CausesValidationChanged; + public new event EventHandler CausesValidationChanged; [Browsable (false)] - public event EventHandler DockChanged; + public new event EventHandler DockChanged; public event EventHandler Load; [Browsable (false)] - public event EventHandler LocationChanged; + public new event EventHandler LocationChanged; public event EventHandler RendererChanged; [Browsable (false)] - public event EventHandler TabIndexChanged; + public new event EventHandler TabIndexChanged; [Browsable (false)] - public event EventHandler TabStopChanged; + public new event EventHandler TabStopChanged; #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripControlHost.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripControlHost.cs index a83fc18f4ef..b44b3d86603 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripControlHost.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripControlHost.cs @@ -91,7 +91,7 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ToolStripItemDisplayStyle DisplayStyle { + public new ToolStripItemDisplayStyle DisplayStyle { get { return base.DisplayStyle; } set { base.DisplayStyle = value; } } @@ -99,7 +99,7 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] [DefaultValue (false)] - public bool DoubleClickEnabled { + public new bool DoubleClickEnabled { get { return this.double_click_enabled; } set { this.double_click_enabled = value; } } @@ -143,21 +143,21 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ContentAlignment ImageAlign { + public new ContentAlignment ImageAlign { get { return this.image_align; } set { this.image_align = value; } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ToolStripItemImageScaling ImageScaling { + public new ToolStripItemImageScaling ImageScaling { get { return this.image_scaling; } set { this.image_scaling = value; } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public Color ImageTransparentColor { + public new Color ImageTransparentColor { get { return this.image_transparent_color; } set { this.image_transparent_color = value; } } @@ -186,14 +186,14 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ContentAlignment TextAlign { + public new ContentAlignment TextAlign { get { return this.text_align; } set { this.text_align = value; } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public TextImageRelation TextImageRelation { + public new TextImageRelation TextImageRelation { get { return this.text_image_relation; } set { this.text_image_relation = value; } } @@ -352,7 +352,7 @@ namespace System.Windows.Forms #region Public Events [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler DisplayStyleChanged; + public new event EventHandler DisplayStyleChanged; public event EventHandler Enter; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Advanced)] diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs index 830dab53ed9..986c99623bd 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs @@ -99,7 +99,7 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ContextMenu ContextMenu { + public new ContextMenu ContextMenu { get { return null; } set { } } @@ -136,35 +136,35 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ToolStripGripDisplayStyle GripDisplayStyle { + public new ToolStripGripDisplayStyle GripDisplayStyle { get { return ToolStripGripDisplayStyle.Vertical; } set { } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public Padding GripMargin { + public new Padding GripMargin { get { return Padding.Empty; } set { } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public Rectangle GripRectangle { + public new Rectangle GripRectangle { get { return Rectangle.Empty; } set { } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ToolStripGripStyle GripStyle { + public new ToolStripGripStyle GripStyle { get { return base.GripStyle; } set { base.GripStyle = value; } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public Point Location { + public new Point Location { get { return base.Location; } set { base.Location = value; } } @@ -193,7 +193,7 @@ namespace System.Windows.Forms } } - public Region Region { + public new Region Region { get { return base.Region; } set { base.Region = value; } } @@ -206,14 +206,14 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public bool Stretch { + public new bool Stretch { get { return false; } set { } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public int TabIndex { + public new int TabIndex { get { return 0; } set { } } @@ -224,7 +224,7 @@ namespace System.Windows.Forms } [Localizable (true)] - public bool Visible { + public new bool Visible { get { return base.Visible; } set { base.Visible = value; } } @@ -305,7 +305,7 @@ namespace System.Windows.Forms this.OnClosed (new ToolStripDropDownClosedEventArgs (reason)); } - public void Show () + public new void Show () { CancelEventArgs e = new CancelEventArgs (); this.OnOpening (e); @@ -485,55 +485,55 @@ namespace System.Windows.Forms #endregion #region Public Events - public event EventHandler BackgroundImageChanged; + public new event EventHandler BackgroundImageChanged; public event EventHandler BackgroundImageLayoutChanged; - public event EventHandler BindingContextChanged; - public event UICuesEventHandler ChangeUICues; + public new event EventHandler BindingContextChanged; + public new event UICuesEventHandler ChangeUICues; public event ToolStripDropDownClosedEventHandler Closed; public event ToolStripDropDownClosingEventHandler Closing; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler ContextMenuChanged; + public new event EventHandler ContextMenuChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] public event EventHandler ContextMenuStripChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler DockChanged; - public event EventHandler Enter; - public event EventHandler FontChanged; - public event EventHandler ForeColorChanged; + public new event EventHandler DockChanged; + public new event EventHandler Enter; + public new event EventHandler FontChanged; + public new event EventHandler ForeColorChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event GiveFeedbackEventHandler GiveFeedback; - public event HelpEventHandler HelpRequested; - public event EventHandler ImeModeChanged; - public event KeyEventHandler KeyDown; - public event KeyPressEventHandler KeyPress; - public event KeyEventHandler KeyUp; - public event EventHandler Leave; + public new event GiveFeedbackEventHandler GiveFeedback; + public new event HelpEventHandler HelpRequested; + public new event EventHandler ImeModeChanged; + public new event KeyEventHandler KeyDown; + public new event KeyPressEventHandler KeyPress; + public new event KeyEventHandler KeyUp; + public new event EventHandler Leave; public event EventHandler Opened; public event CancelEventHandler Opening; public event EventHandler RegionChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] public event ScrollEventHandler Scroll; - public event EventHandler StyleChanged; + public new event EventHandler StyleChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler TabIndexChanged; + public new event EventHandler TabIndexChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler TabStopChanged; + public new event EventHandler TabStopChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler TextChanged; + public new event EventHandler TextChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler Validated; + public new event EventHandler Validated; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event CancelEventHandler Validating; + public new event CancelEventHandler Validating; #endregion #region Private Methods @@ -549,4 +549,4 @@ namespace System.Windows.Forms #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownButton.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownButton.cs index 66a7df9cc0e..c660a16dded 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownButton.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownButton.cs @@ -74,7 +74,7 @@ namespace System.Windows.Forms #endregion #region Public Properties - public bool AutoToolTip { + public new bool AutoToolTip { get { return base.AutoToolTip; } set { base.AutoToolTip = value; } } @@ -133,4 +133,4 @@ namespace System.Windows.Forms #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownMenu.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownMenu.cs index 4fb937adc7c..3be79820686 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownMenu.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownMenu.cs @@ -58,7 +58,7 @@ namespace System.Windows.Forms get { return base.LayoutEngine; } } - public ToolStripLayoutStyle LayoutStyle { + public new ToolStripLayoutStyle LayoutStyle { get { return this.layout_style; } set { this.layout_style = value; } } @@ -88,4 +88,4 @@ namespace System.Windows.Forms #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItemCollection.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItemCollection.cs index 1bab7de6c12..48d5c5328ca 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItemCollection.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItemCollection.cs @@ -54,7 +54,7 @@ namespace System.Windows.Forms #region Public Properties public override bool IsReadOnly { get { return base.IsReadOnly; } } - public virtual ToolStripItem this[int index] { get { return (ToolStripItem)base[index]; } } + public new virtual ToolStripItem this[int index] { get { return (ToolStripItem)base[index]; } } public virtual ToolStripItem this[string key] { get { @@ -141,7 +141,7 @@ namespace System.Windows.Forms this.owner.ResumeLayout (); } - public virtual void Clear () + public new virtual void Clear () { if (this.IsReadOnly) throw new NotSupportedException ("This collection is read-only"); @@ -221,7 +221,7 @@ namespace System.Windows.Forms owner.PerformLayout (); } - public void RemoveAt (int index) + public new void RemoveAt (int index) { if (this.IsReadOnly) throw new NotSupportedException ("This collection is read-only"); @@ -297,4 +297,4 @@ namespace System.Windows.Forms #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripPanel.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripPanel.cs index 3aa3fa47c80..6940f447f64 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripPanel.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripPanel.cs @@ -37,7 +37,7 @@ namespace System.Windows.Forms { [ComVisible (true)] [ClassInterface (ClassInterfaceType.AutoDispatch)] - public class ToolStripPanel : ContainerControl, IComponent, IDisposable + public class ToolStripPanel : ContainerControl, IComponent, IDisposable, IBindableComponent, IDropTarget { private bool done_first_layout; private bool locked; @@ -70,13 +70,13 @@ namespace System.Windows.Forms } [Browsable (false)] - public Size AutoScrollMargin { + public new Size AutoScrollMargin { get { return base.AutoScrollMargin; } set { base.AutoScrollMargin = value; } } [Browsable (false)] - public Size AutoScrollMinSize { + public new Size AutoScrollMinSize { get { return base.AutoScrollMinSize; } set { base.AutoScrollMinSize = value; } } @@ -146,13 +146,13 @@ namespace System.Windows.Forms } [Browsable (false)] - public int TabIndex { + public new int TabIndex { get { return base.TabIndex; } set { base.TabIndex = value; } } [Browsable (false)] - public bool TabStop { + public new bool TabStop { get { return base.TabStop; } set { base.TabStop = value; } } @@ -276,11 +276,11 @@ namespace System.Windows.Forms public event EventHandler AutoSizeChanged; public event EventHandler RendererChanged; [Browsable (false)] - public event EventHandler TabIndexChanged; + public new event EventHandler TabIndexChanged; [Browsable (false)] - public event EventHandler TabStopChanged; + public new event EventHandler TabStopChanged; [Browsable (false)] - public event EventHandler TextChanged; + public new event EventHandler TextChanged; #endregion #region Private Methods @@ -313,11 +313,11 @@ namespace System.Windows.Forms [ComVisible (false)] public class ToolStripPanelRowCollection : ArrangedElementCollection, IList, ICollection, IEnumerable { - private ToolStripPanel owner; + //private ToolStripPanel owner; public ToolStripPanelRowCollection (ToolStripPanel owner) : base () { - this.owner = owner; + //this.owner = owner; } public ToolStripPanelRowCollection (ToolStripPanel owner, ToolStripPanelRow[] value) : this (owner) @@ -327,7 +327,7 @@ namespace System.Windows.Forms this.Add (tspr); } - public virtual ToolStripPanelRow this [int index] { + public new virtual ToolStripPanelRow this [int index] { get { return (ToolStripPanelRow)base[index]; } } @@ -355,7 +355,7 @@ namespace System.Windows.Forms this.Add (tspr); } - public virtual void Clear () + public new virtual void Clear () { base.Clear (); } @@ -385,7 +385,7 @@ namespace System.Windows.Forms base.Remove (value); } - public void RemoveAt (int index) + public new void RemoveAt (int index) { base.RemoveAt (index); } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripProgressBar.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripProgressBar.cs index e2f45729269..4f9e9f8849e 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripProgressBar.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripProgressBar.cs @@ -122,28 +122,28 @@ namespace System.Windows.Forms #region Public Events [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event KeyEventHandler KeyDown; + public new event KeyEventHandler KeyDown; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event KeyPressEventHandler KeyPress; + public new event KeyPressEventHandler KeyPress; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event KeyEventHandler KeyUp; + public new event KeyEventHandler KeyUp; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler LocationChanged; + public new event EventHandler LocationChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler OwnerChanged; + public new event EventHandler OwnerChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler TextChanged; + public new event EventHandler TextChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler Validated; + public new event EventHandler Validated; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event CancelEventHandler Validating; + public new event CancelEventHandler Validating; #endregion } } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSeparator.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSeparator.cs index a04fc990d36..226ba50f37d 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSeparator.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSeparator.cs @@ -52,7 +52,7 @@ namespace System.Windows.Forms #region Public Properties [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public bool AutoToolTip { + public new bool AutoToolTip { get { return this.auto_tool_tip; } set { this.auto_tool_tip = value; } } @@ -61,14 +61,14 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ToolStripItemDisplayStyle DisplayStyle { + public new ToolStripItemDisplayStyle DisplayStyle { get { return this.display_style; } set { this.display_style = value; } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public bool DoubleClickEnabled { + public new bool DoubleClickEnabled { get { return this.double_click_enabled; } set { this.double_click_enabled = value; } } @@ -96,7 +96,7 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ContentAlignment ImageAlign { + public new ContentAlignment ImageAlign { get { return this.image_align; } set { if (!Enum.IsDefined (typeof (ContentAlignment), value)) @@ -108,7 +108,7 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public int ImageIndex { + public new int ImageIndex { get { return this.image_index; } set { if (value < -1) @@ -120,7 +120,7 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ToolStripItemImageScaling ImageScaling { + public new ToolStripItemImageScaling ImageScaling { get { return this.image_scaling; } set { this.image_scaling = value; } } @@ -134,7 +134,7 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public ContentAlignment TextAlign { + public new ContentAlignment TextAlign { get { return this.text_align; } set { if (!Enum.IsDefined (typeof (ContentAlignment), value)) @@ -146,14 +146,14 @@ namespace System.Windows.Forms [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public TextImageRelation TextImageRelation { + public new TextImageRelation TextImageRelation { get { return this.text_image_relation; } set { this.text_image_relation = value; } } [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public string ToolTipText { + public new string ToolTipText { get { return this.tool_tip_text; } set { this.tool_tip_text = value; } } @@ -211,15 +211,15 @@ namespace System.Windows.Forms #region Public Events [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler DisplayStyleChanged; + public new event EventHandler DisplayStyleChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler EnabledChanged; + public new event EventHandler EnabledChanged; [Browsable (false)] [EditorBrowsable (EditorBrowsableState.Never)] - public event EventHandler TextChanged; + public new event EventHandler TextChanged; #endregion } } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSplitButton.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSplitButton.cs index 49ae6d26bd9..aa82eb1deb3 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSplitButton.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSplitButton.cs @@ -81,7 +81,7 @@ namespace System.Windows.Forms #endregion #region Public Properties - public bool AutoToolTip + public new bool AutoToolTip { get { return base.AutoToolTip; } set { base.AutoToolTip = value; } @@ -259,4 +259,4 @@ namespace System.Windows.Forms #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripStatusLabel.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripStatusLabel.cs index 0ecf9e0b274..b3b410e6ad5 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripStatusLabel.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripStatusLabel.cs @@ -73,7 +73,7 @@ namespace System.Windows.Forms #endregion #region Public Properties - public ToolStripItemAlignment Alignment { + public new ToolStripItemAlignment Alignment { get { return base.Alignment; } set { base.Alignment = value; } } @@ -110,4 +110,4 @@ namespace System.Windows.Forms #endregion } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs index 11fb82bfa5e..21c6e126217 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs @@ -34,7 +34,11 @@ using System.Drawing; namespace System.Windows.Forms { [ProvideProperty ("ToolTip", typeof(System.Windows.Forms.Control))] [ToolboxItemFilter("System.Windows.Forms", ToolboxItemFilterType.Allow)] - public sealed class ToolTip : System.ComponentModel.Component, System.ComponentModel.IExtenderProvider { + public +#if !NET_2_0 + sealed +#endif + class ToolTip : System.ComponentModel.Component, System.ComponentModel.IExtenderProvider { #region Local variables internal bool is_active; internal int automatic_delay; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs index e5fe97b3ad0..4a3ed0df805 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs @@ -192,7 +192,7 @@ namespace System.Windows.Forms #region Public Properties [DefaultValue (true)] - public bool AutoSize { + public new bool AutoSize { get { return autosize; } set { autosize = value;} } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs index 917a8e49d7e..d89534ccbf8 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs @@ -1155,28 +1155,6 @@ namespace System.Windows.Forms { } } - private void DrawLinesToNext (TreeNode node, Graphics dc, Rectangle clip, Pen dash, int x, int y) - { - int middle = y + (ActualItemHeight / 2); - - if (node.NextNode != null) { - int top = (node.Nodes.Count > 0 && show_plus_minus ? middle + 4 : middle); - int ncap = (node.NextNode.Nodes.Count > 0 && show_plus_minus ? 4 : 8); - int bottom = Math.Min (node.NextNode.GetY () + ncap, clip.Bottom); - - dc.DrawLine (dash, x - indent + 9, top, x - indent + 9, bottom); - } - - if (node.IsExpanded && node.Nodes.Count > 0) { - int top = node.Bounds.Bottom; - int ncap = (node.Nodes [0].Nodes.Count > 0 && show_plus_minus ? 4 : 8); - int bottom = Math.Min (node.Nodes [0].GetY () + ncap, clip.Bottom); - int nx = node.Nodes [0].GetLinesX (); - - dc.DrawLine (dash, nx - indent + 9, top, nx - indent + 9, bottom); - } - } - private void DrawNodeImage (TreeNode node, Graphics dc, Rectangle clip, int x, int y) { // Rectangle r = new Rectangle (x, y + 2, ImageList.ImageSize.Width, ImageList.ImageSize.Height); @@ -1269,12 +1247,6 @@ namespace System.Windows.Forms { return (int) DeviceContext.MeasureString (node.Text, font, 0, string_format).Width + 3; } - private bool ShowSelection { - get { - return Focused || !hide_selection; - } - } - private void DrawSelectionAndFocus(TreeNode node, Graphics dc, Rectangle r) { if (Focused && focused_node == node) { -- 2.25.1