public App() { if (SingleApplicationDetector.IsRunning()) { ExitApplication(); return; } System.Windows.Application.Current.Exit += Application_Exit; appFolderPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData); appFolderPath = Path.Combine(appFolderPath, LogFolderName); InitLogsWithNLog(); log = Rainbow.LogFactory.CreateLogger <App>(); log.LogInformation("=============================================================="); log.LogInformation("Application started: [{0}]", LogFolderName); log.LogInformation("Windows version:[{0}]", RuntimeInformation.OSDescription); // Create Rainbow Application rbApplication = new Rainbow.Application(appFolderPath); rbApplication.SetApplicationInfo(APP_ID, APP_SECRET_KEY); rbApplication.SetHostInfo(HOST_NAME); // We use WebRTC Feature rbApplication.Restrictions.UseWebRTC = true; }
private void Application_Exit(object sender, ExitEventArgs e) { SingleApplicationDetector.Close(); }