Exemplo n.º 1
0
        public void Dispatch(ApplicationStatus status)
        {
            switch (status)
            {
            case ApplicationStatus.Banned:
            {
                HostedWindows.ForEach((element) => element.Banned());

                break;
            }

            case ApplicationStatus.Blocked:
            {
                HostedWindows.ForEach((element) => element.Blocked());

                break;
            }

            case ApplicationStatus.Connected:
            {
                HostedWindows.ForEach((element) => element.Connected());

                break;
            }

            case ApplicationStatus.Disconnected:
            {
                HostedWindows.ForEach((element) => element.Disconnect());

                break;
            }

            case ApplicationStatus.Loading:
            {
                HostedWindows.ForEach((element) => element.Loading());

                break;
            }

            case ApplicationStatus.Normal:
            {
                HostedWindows.ForEach((element) => element.Normal());

                break;
            }

            default:
            {
                ArgumentException ex = new ArgumentException($"Incorrect appstatus '{status.ToString()}' for changing.");
                ex.ToLog(Components.LogLevel.Error);

                throw ex;
            }
            }
        }
Exemplo n.º 2
0
 public void AppendLanguages()
 {
     HostedWindows.ForEach((element) => element.AppendLocale(LanguageMgr.Instance));
 }