} // func FindOrCreateEnvironment public PpsEnvironment AuthentificateEnvironment(PpsEnvironment environment) { if (environment == null) { return(null); } if (environment.IsAuthentificated) // is authentificated { return(environment); } else { switch (environment.Await(environment.LoginAsync(this))) // try to authentificate the environment { case PpsLoginResult.Sucess: return(environment); case PpsLoginResult.Restart: Application.Quit(); return(null); default: return(null); } } } // func AuthentificateEnvironment
} // event ListInfo_PropertyChanged private async Task InitEnvironmentAsync() { await environment.LoginAsync(this); UpdateUri(); } // proc InitEnvironmentAsync