コード例 #1
0
 public void UnsubscribeEvents()
 {
     if (this.mRemoteObject != null)
     {
         this.mRemoteObject.Warning -= OnWarning;
         this.mRemoteObject.Terminated -= OnTerminated;
     }
 }
コード例 #2
0
        protected virtual void Warning(string message, params object[] args)
        {
            WarningDelegate handler = OnWarning;

            if (handler != null)
            {
                handler(message, args);
            }
        }
コード例 #3
0
        public void GetRemoteObject()
        {
            this.mRemoteObject =
                (IProgramMonitorRemoting)Activator.GetObject(typeof(IProgramMonitorRemoting),
                "ipc://ProgramMonitor.RemotingServer/ProgramMonitorRemoting");

            this.mRemoteObject.Warning += OnWarning;
            this.mRemoteObject.Terminated += OnTerminated;
        }
コード例 #4
0
 private void btnSetup_Click(object sender, EventArgs e)
 {
     if (this.radioBtnEnable.Checked == true)
     {
         registryKey.SetValue("Start", (int)Permission.Allow);
         if (USBDisable != null)
         {
             USBDisable.Abort();
         }
     }
     else if (this.radioBtnDisable.Checked == true)
     {
         registryKey.SetValue("Start", (int)Permission.Deny);
         WarningMsg = new WarningDelegate(WarningView);
         if (this.checkBoxReal.Checked == true)
         {
             USBDisable = new Thread(USBReg);
             USBDisable.Start();
         }
     }
 }