StoreChangedNetworkSettings() 공개 정적인 메소드

public static StoreChangedNetworkSettings ( ) : void
리턴 void
예제 #1
0
        void ServiceThreadHandler()
        {
            try {
                Debug.Print("ServiceThreadHandler");
                needsShutdown.Reset();

                NetInfo.StoreChangedNetworkSettings();

                WmiBase.Reset();
                Debug.Print("WMI Check");
                if (WmiBase.Check())
                {
                    starting = true;
                    WmiCapableServiceThreadHandler();
                    starting = false;
                    running  = true;
                }
                else
                {
                    running = false;
                    WaitHandle[] waitHandles = new WaitHandle[]
                    {
                        (new WmiIncapableThread()).Incapable,
                        needsShutdown
                    };

                    Debug.Print("Waiting for WMI capability to begin");
                    try
                    {
                        EventLog.WriteEntry(Branding.Instance.getString("BRANDING_errNoWMI"));
                    }
                    catch { };

                    int activehandle = WaitHandle.WaitAny(waitHandles);
                    Debug.Print("Received event");

                    if (activehandle == 0)
                    {
                        try
                        {
                            EventLog.WriteEntry(Branding.Instance.getString("BRANDING_errNoWMI"));
                        }
                        catch { };
                        starting = true;
                        WmiCapableServiceThreadHandler();
                        starting = false;
                        running  = true;
                    }
                }
            }
            catch (Exception e) {
                HandleException("Main Service Thread", e);
            }
        }
예제 #2
0
 void onAddrChange(Object sender, EventArgs e)
 {
     try
     {
         updateNetworkInfo();
         NetInfo.StoreChangedNetworkSettings();
         WmiBase.Singleton.Kick();
     }
     catch (System.Management.ManagementException x) {
         if (x.ErrorCode != ManagementStatus.AccessDenied)
         {
             exceptionhandler.HandleException("Network Information", x);
         }
     }
     catch (Exception ex)
     {
         exceptionhandler.HandleException("Network Information", ex);
     }
 }
예제 #3
0
 public bool Refresh(bool force)
 {
     updateNetworkInfo();
     NetInfo.StoreChangedNetworkSettings();
     return(true);
 }