コード例 #1
0
 private void Awake()
 {
     Instance   = this;
     notifier   = new Notify.Notifier();
     m_QueueMsg = new ConcurrentQueue <PtMessagePackage>();
     Service.Get <LoginService>();
 }
コード例 #2
0
 private GameServerNetwork()
 {
     _Ins     = this;
     notifier = new Notify.Notifier();
     Service.Get <LoginService>();
     m_QueueMsg = new ConcurrentQueue <Message>();
 }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     notifier = new Notify.Notifier(this);
     INS      = this;
     m_BtnAddClickSim.onClick.AddListener(OnClickAddClient);
     m_BtnAddEntity.onClick.AddListener(OnClickAddEntity);
     m_BtnAddBoxEntity.onClick.AddListener(OnClickBoxEntity);
     m_BtnReady.onClick.AddListener(OnClickReady);
     m_BtnStopSimulation.onClick.AddListener(OnClickStopSim);
     m_BtnPlayReplay.onClick.AddListener(OnClickPlayReplay);
 }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     Notifier = new Notify.Notifier(this);
 }
コード例 #5
0
        // DIALOG NOTE - With faded background!!!
        #region DIALOG NOTE CREATION
        public static DialogResult ShowDialog(string desc, Type type          = Type.INFO, string tit = "Notifier",
                                              BackDialogStyle backDialogStyle = BackDialogStyle.FadedScreen,
                                              Form obscureMe = null)
        {
            if (backDialogStyle == BackDialogStyle.FadedApplication && obscureMe == null)
            {
                backDialogStyle = BackDialogStyle.FadedScreen;
            }

            Form back = new Form();

            back.FormBorderStyle = FormBorderStyle.None;
            back.BackColor       = Color.FromArgb(0, 0, 0);
            back.Opacity         = 0.6;
            int border = 200;

            // Instantiate the Notifier form
            Notifier not = new Notifier(desc, type, tit, true);

            not.backDialogStyle = backDialogStyle;
            bool orgTopMostSettings = false;

            // To draw it on primary screen
            switch (not.backDialogStyle)
            {
            case BackDialogStyle.FadedScreen:
                back.Location = new System.Drawing.Point(-border, -border);
                back.Size     = new Size(Screen.PrimaryScreen.WorkingArea.Width + border,
                                         Screen.PrimaryScreen.WorkingArea.Height + border);
                back.Show();
                back.TopMost = true;
                break;

            case BackDialogStyle.FadedApplication:
                not.myCallerApp    = obscureMe;
                orgTopMostSettings = obscureMe.TopMost;
                obscureMe.TopMost  = true;
                Point locationOnForm = obscureMe.PointToScreen(Point.Empty);
                back.Size          = obscureMe.Size;
                back.Location      = obscureMe.Location;
                back.StartPosition = FormStartPosition.Manual;
                back.Show();
                back.TopMost = true;
                break;

            default:
                /*back.Location = new System.Drawing.Point(-2, -2);
                 * back.Size = new Size(1,1);
                 * back.Show();*/
                break;
            }
            // Add to our collection of Notifiers, cause "OpenForms"
            // is currently buggy
            Notifiers.Add(not);

            not.ShowDialog();

            back.Close();
            if (obscureMe != null)
            {
                obscureMe.TopMost = orgTopMostSettings;
            }

            return(DialogResult.OK);
        }