Author: jpobst
Date: 2007-07-13 09:48:47 -0400 (Fri, 13 Jul 2007)
New Revision: 81944
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs
Log:
2007-07-13 Jonathan Pobst <[EMAIL PROTECTED]>
* OSFeature.cs: Enable IsPresent.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-07-13 13:43:14 UTC (rev 81943)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-07-13 13:48:47 UTC (rev 81944)
@@ -1,3 +1,7 @@
+2007-07-13 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * OSFeature.cs: Enable IsPresent.
+
2007-07-13 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* Control.cs: Don't do anything in WmShowWindow if the control has been
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs
2007-07-13 13:43:14 UTC (rev 81943)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs
2007-07-13 13:48:47 UTC (rev 81944)
@@ -51,69 +51,68 @@
}
#if NET_2_0
- [MonoTODO ("Currently returns false for all values. Uncomment
code once 2.0 SystemInformation is done")]
public static bool IsPresent (SystemParameter enumVal)
{
- //object o;
+ object o;
+
+ switch (enumVal) {
+ case SystemParameter.DropShadow:
+ try {
+ o =
SystemInformation.IsDropShadowEnabled;
+ return true;
+ } catch (Exception) { return false; }
+ case SystemParameter.FlatMenu:
+ try {
+ o =
SystemInformation.IsFlatMenuEnabled;
+ return true;
+ } catch (Exception) { return false; }
+ case
SystemParameter.FontSmoothingContrastMetric:
+ try {
+ o =
SystemInformation.FontSmoothingContrast;
+ return true;
+ } catch (Exception) { return false; }
+ case SystemParameter.FontSmoothingTypeMetric:
+ try {
+ o =
SystemInformation.FontSmoothingType;
+ return true;
+ } catch (Exception) { return false; }
+ case SystemParameter.MenuFadeEnabled:
+ try {
+ o =
SystemInformation.IsMenuFadeEnabled;
+ return true;
+ } catch (Exception) { return false; }
+ case SystemParameter.SelectionFade:
+ try {
+ o =
SystemInformation.IsSelectionFadeEnabled;
+ return true;
+ } catch (Exception) { return false; }
+ case SystemParameter.ToolTipAnimationMetric:
+ try {
+ o =
SystemInformation.IsToolTipAnimationEnabled;
+ return true;
+ } catch (Exception) { return false; }
+ case SystemParameter.UIEffects:
+ try {
+ o =
SystemInformation.UIEffectsEnabled;
+ return true;
+ } catch (Exception) { return false; }
+ case SystemParameter.CaretWidthMetric:
+ try {
+ o =
SystemInformation.CaretWidth;
+ return true;
+ } catch (Exception) { return false; }
+ case
SystemParameter.VerticalFocusThicknessMetric:
+ try {
+ o =
SystemInformation.VerticalFocusThickness;
+ return true;
+ } catch (Exception) { return false; }
+ case
SystemParameter.HorizontalFocusThicknessMetric:
+ try {
+ o =
SystemInformation.HorizontalFocusThickness;
+ return true;
+ } catch (Exception) { return false; }
+ }
- //switch (enumVal) {
- //case SystemParameter.DropShadow:
- // try {
- // o =
SystemInformation.IsDropShadowEnabled;
- // return true;
- // } catch (Exception) { return false; }
- //case SystemParameter.FlatMenu:
- // try {
- // o =
SystemInformation.IsFlatMenuEnabled;
- // return true;
- // } catch (Exception) { return false; }
- //case
SystemParameter.FontSmoothingContrastMetric:
- // try {
- // o =
SystemInformation.FontSmoothingContrast;
- // return true;
- // } catch (Exception) { return false; }
- //case SystemParameter.FontSmoothingTypeMetric:
- // try {
- // o =
SystemInformation.FontSmoothingType;
- // return true;
- // } catch (Exception) { return false; }
- //case SystemParameter.MenuFadeEnabled:
- // try {
- // o =
SystemInformation.IsMenuFadeEnabled;
- // return true;
- // } catch (Exception) { return false; }
- //case SystemParameter.SelectionFade:
- // try {
- // o =
SystemInformation.IsSelectionFadeEnabled;
- // return true;
- // } catch (Exception) { return false; }
- //case SystemParameter.ToolTipAnimationMetric:
- // try {
- // o =
SystemInformation.IsToolTipAnimationEnabled;
- // return true;
- // } catch (Exception) { return false; }
- //case SystemParameter.UIEffects:
- // try {
- // o =
SystemInformation.UIEffectsEnabled;
- // return true;
- // } catch (Exception) { return false; }
- //case SystemParameter.CaretWidthMetric:
- // try {
- // o =
SystemInformation.CaretWidthMetric;
- // return true;
- // } catch (Exception) { return false; }
- //case
SystemParameter.VerticalFocusThicknessMetric:
- // try {
- // o =
SystemInformation.VerticalFocusThickness;
- // return true;
- // } catch (Exception) { return false; }
- //case
SystemParameter.HorizontalFocusThicknessMetric:
- // try {
- // o =
SystemInformation.HorizontalFocusThickness;
- // return true;
- // } catch (Exception) { return false; }
- //}
-
return false;
}
#endif
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches