예제 #1
0
        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;
        }
예제 #2
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     SingleApplicationDetector.Close();
 }