Example #1
0
        static public void MessageBox(string title, string msg, Action action = null, bool richText = false)
        {
            GameObject go  = new GameObject("HFTDialog");
            HFTDialog  dlg = go.AddComponent <HFTDialog>();

            dlg.Init(title, msg, action, richText);
        }
        public void DoWork()
        {
            try
            {
                log_.Info("DNS DoWork -start- port:" + port_);
                dnsServer_ = new HFTDnsServer(ipv4Address_, ipv6Address_);
                dnsServer_.Listen(port_);
                log_.Info("DNS DoWork -end-");
            }
            catch (System.Exception ex)
            {
                string msg =
                    "Could not start DNS Server on port:" + port_ + "\n" +
                    "Did you run from the command line with sudo?\n\n" + ex.ToString();

                if (!HFTGlobalEventEmitter.GetInstance().QueueEvent(HFTGlobalEventType.Error, msg))
                {
                    // No one handled it. Let's do it ourselves.
                    eventProcessor_.QueueEvent(() => {
                        HFTDialog.MessageBox("ERROR", msg);
                    });
                }
            }
        }