public void Receive(string[] s)
 {
     if (SingletonControllerM.m_Receive != null)
     {
         SingletonControllerM.m_Receive(s);
     }
 }
        public static bool IamFirst(SingletonControllerM.ReceiveDelegate r)
        {
            bool flag;

            if (!SingletonControllerM.IamFirst())
            {
                flag = false;
            }
            else
            {
                SingletonControllerM.Receiver = (SingletonControllerM.ReceiveDelegate)Delegate.Combine(SingletonControllerM.Receiver, r);
                flag = true;
            }
            return(flag);
        }
        public static bool IamFirst()
        {
            bool   flag;
            string codeBase = Assembly.GetExecutingAssembly().GetName(false).CodeBase;
            string str      = codeBase.Replace("\\", "_");

            SingletonControllerM.m_Mutex = new Mutex(false, str);
            if (!SingletonControllerM.m_Mutex.WaitOne(1, true))
            {
                SingletonControllerM.m_Mutex.Close();
                SingletonControllerM.m_Mutex = null;
                flag = false;
            }
            else
            {
                SingletonControllerM.CreateInstanceChannel();
                flag = true;
            }
            return(flag);
        }