Example #1
0
            public bool SetElementState(IntPtr elementWdwPtr, ElementDisplayState state)
            {
                try
                {
                    NativeMethod.ElWdw_SetElementState.ExecuteOnMainThread(
                        elementWdwPtr,
                        (int)state);

                    return(true);
                }
                catch (Exception ex)
                {
                    LogTo.Error(ex, "Native method call threw an exception.");
                    return(false);
                }
            }
Example #2
0
 public bool SetElementState(ElementDisplayState state)
 {
     try
     {
         return(Core.Natives.ElWind.SetElementState(ElementWdwPtr.Read <IntPtr>(), state));
     }
     catch (Win32Exception ex)
     {
         LogTo.Warning(ex, "Failed to read ElementWdwPtr");
         return(false);
     }
     catch (Exception ex)
     {
         LogTo.Error(ex, "SM internal method call threw an exception.");
         return(false);
     }
 }