Parcourir la source

remove unused vars

svn path=/trunk/mcs/; revision=38302
Jordi Mas i Hernandez il y a 21 ans
Parent
commit
ace52ead67

+ 5 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,8 @@
+2005-01-04  Jordi Mas i Hernandez <[email protected]>
+
+	* ComboBox.cs, TabPage.cs, MenuAPI.cs, ThemeWin32Classic.cs,
+	TrackBar.cs, MonthCalendar.cs: remove unused vars
+
 2005-01-03  Jackson Harper  <[email protected]>
 
 	* ThemeWin32Classic.cs:

+ 0 - 2
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs

@@ -758,8 +758,6 @@ namespace System.Windows.Forms
 
 			public void AddRange (object[] items)
 			{
-				int cnt = Count;
-
 				foreach (object mi in items)
 					AddItem (mi);
 			}

+ 0 - 3
mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs

@@ -607,7 +607,6 @@ namespace System.Windows.Forms
 				HideSubPopups (hMenu);
 
 			if (tracker.hCurrentMenu != hMenu) {
-				MENU current_menu = GetMenuFromID (hMenu);
 				menu.Wnd.Capture = true;
 				tracker.hCurrentMenu = hMenu;
 			}
@@ -1087,7 +1086,6 @@ namespace System.Windows.Forms
     		{
     			/* Click outside the client area*/
 			MenuAPI.MENUITEM item = MenuAPI.FindItemByCoords (hMenu, new Point (e.X, e.Y));
-			MenuAPI.MENU menu = MenuAPI.GetMenuFromID (hMenu);
 
 			if (item != null) {
 				item.item.PerformClick ();
@@ -1099,7 +1097,6 @@ namespace System.Windows.Forms
 		private void OnMouseMovePUW (object sender, MouseEventArgs e)
 		{	
 			MenuAPI.MENUITEM item = MenuAPI.FindItemByCoords (hMenu, new Point (e.X, e.Y));
-			MenuAPI.MENU menu = MenuAPI.GetMenuFromID (hMenu);
 			
 			if (item != null) {				
 				MenuAPI.SelectItem (hMenu, item, true, tracker);

+ 1 - 5
mcs/class/Managed.Windows.Forms/System.Windows.Forms/MonthCalendar.cs

@@ -143,8 +143,7 @@ namespace System.Windows.Forms {
 			button_x_offset = 5;
 			button_size = new Size (22, 17);
 			// default settings based on 8.25 pt San Serif Font
-			// Not sure of algroithm used to establish this
-			Size title_size = new Size(24*7, 46);		// 7 cells, not including WeekNumber column
+			// Not sure of algorithm used to establish this
 			date_cell_size = new Size (24, 16);		// default size at san-serif 8.25
 			divider_line_offset = 4;
 			calendar_spacing = new Size (4, 5);		// horiz and vert spacing between months in a calendar grid
@@ -1190,7 +1189,6 @@ namespace System.Windows.Forms {
 			DayOfWeek first_day = GetDayOfWeek (first_day_of_week);
 			// find the first day of the year
 			DayOfWeek first_day_of_year = new DateTime (date.Year, 1, 1).DayOfWeek;
-			DayOfWeek day_of_week = date.DayOfWeek;
 			// adjust for the starting day of the week
 			int offset = first_day_of_year - first_day;
 			int week = ((date.DayOfYear + offset) / 7) + 1;
@@ -1497,7 +1495,6 @@ namespace System.Windows.Forms {
 				first_select_start_date = SelectionStart;
 				is_shift_pressed = e.Shift;
 			}
-			bool changed = true;		
 			switch (e.KeyCode) {
 				case Keys.Home:
 					// set the date to the start of the month
@@ -1588,7 +1585,6 @@ namespace System.Windows.Forms {
 					this.OnDateSelected (new DateRangeEventArgs (SelectionStart, SelectionEnd));
 					break;
 				default:
-					changed = false;
 					break;
 			}
 			e.Handled = true;

+ 0 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabPage.cs

@@ -177,7 +177,6 @@ namespace System.Windows.Forms {
 		protected override void SetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified) 
 		{
 			if (Owner != null && Owner.IsHandleCreated) {
-				Rectangle display = Owner.DisplayRectangle;
 				base.SetBoundsCore (Owner.DisplayRectangle.X, Owner.DisplayRectangle.Y,
 							Owner.DisplayRectangle.Width, Owner.DisplayRectangle.Height,
 							BoundsSpecified.All);

+ 0 - 3
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs

@@ -1641,8 +1641,6 @@ namespace System.Windows.Forms
 		#region ProgressBar
 		public override void DrawProgressBar (Graphics dc, Rectangle clip_rectangle, ProgressBar progress_bar) {
 			Rectangle	client_area		= progress_bar.client_area;
-			Rectangle	paint_area		= progress_bar.paint_area;
-			int		steps			= (progress_bar.Maximum - progress_bar.Minimum) / progress_bar.step;
 			int		space_betweenblocks	= 2;
 			int		x;
 			int		block_width;
@@ -2133,7 +2131,6 @@ namespace System.Windows.Forms
 			int left = area.Left;
 			if (panel.Icon != null) {
 				left += 2;
-				int size = area.Height - border_size;
 				dc.DrawIcon (panel.Icon, left, area.Top);
 				left += panel.Icon.Width;
 			}

+ 10 - 12
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs

@@ -458,15 +458,17 @@ namespace System.Windows.Forms
 
 		private void UpdatePos (int newPos, bool update_trumbpos)
 		{
-			int old = position;
-
-			if (newPos < minimum)
+			if (newPos < minimum){
 				Value = minimum;
-			else
-				if (newPos > maximum)
-				Value = maximum;
-			else
-				Value = newPos;    			
+			}
+			else {
+				if (newPos > maximum) {
+					Value = maximum;
+				}
+				else {
+					Value = newPos;
+				}
+			}
 		}
 		
 		private void LargeIncrement ()
@@ -499,8 +501,6 @@ namespace System.Windows.Forms
     		
 		private void Draw ()
 		{					
-			float ticks = (Maximum - Minimum) / tickFrequency; /* N of ticks draw*/                        
-	
 			ThemeEngine.Current.DrawTrackBar(DeviceContext, this.ClientRectangle, this);
 		}		
 
@@ -577,8 +577,6 @@ namespace System.Windows.Forms
     		{    			
     			if (!Enabled) return;
     		
-    			Point pnt = new Point (e.X, e.Y);
-
     			/* Moving the thumb */
     			if (thumb_pressed) {