示例#1
0
		public static void Init(ReportingSettings settings, string domain, string googleAnalyticsAccountCode)
		{
#if DEBUG
			Init(settings,domain,googleAnalyticsAccountCode, true);
#else
			Init(settings,domain,googleAnalyticsAccountCode, false);
#endif
		}
示例#2
0
        public static void Init(ReportingSettings settings, string domain, string googleAnalyticsAccountCode)
        {
#if DEBUG
            Init(settings, domain, googleAnalyticsAccountCode, true);
#else
            Init(settings, domain, googleAnalyticsAccountCode, false);
#endif
        }
示例#3
0
		/// <summary>
		///
		/// </summary>
		/// <example>
		/// UsageReporter.Init(Settings.Default.Reporting, "myproduct.org", "UA-11111111-2",
		///#if DEBUG
		///                true
		///#else
		///                false
		///#endif
		///                );
		/// </example>
		/// <param name="settings"></param>
		/// <param name="domain"></param>
		/// <param name="googleAnalyticsAccountCode"></param>
		/// <param name="reportAsDeveloper">Normally this is true for DEBUG builds. It is separated out here because sometimes a developer
		/// uses a Release build of Palaso.dll, but would still want his/her activities logged as a developer.</param>
		public static void Init(ReportingSettings settings, string domain, string googleAnalyticsAccountCode, bool reportAsDeveloper)
		{
			s_singleton = new UsageReporter();
			s_singleton._settings = settings;
			s_singleton._realPreviousVersion = settings.PreviousVersion;
			s_singleton._settings.Launches++;
			s_singleton.BeginGoogleAnalytics(domain, googleAnalyticsAccountCode, reportAsDeveloper);
			settings.PreviousVersion = ErrorReport.VersionNumberString;
			settings.PreviousLaunchDate = DateTime.Now.Date;
			s_singleton._mostRecentArea = "Initializing"; // Seems more useful to put in something in case an error occurs before app gets this set.
		}
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <example>
 /// UsageReporter.Init(Settings.Default.Reporting, "myproduct.org", "UA-11111111-2",
 ///#if DEBUG
 ///                true
 ///#else
 ///                false
 ///#endif
 ///                );
 /// </example>
 /// <param name="settings"></param>
 /// <param name="domain"></param>
 /// <param name="googleAnalyticsAccountCode"></param>
 /// <param name="reportAsDeveloper">Normally this is true for DEBUG builds. It is separated out here because sometimes a developer
 /// uses a Release build of Palaso.dll, but would still want his/her activities logged as a developer.</param>
 public static void Init(ReportingSettings settings, string domain, string googleAnalyticsAccountCode, bool reportAsDeveloper)
 {
     s_singleton                      = new UsageReporter();
     s_singleton._settings            = settings;
     s_singleton._realPreviousVersion = settings.PreviousVersion;
     s_singleton._settings.Launches++;
     s_singleton.BeginGoogleAnalytics(domain, googleAnalyticsAccountCode, reportAsDeveloper);
     settings.PreviousVersion    = ErrorReport.VersionNumberString;
     settings.PreviousLaunchDate = DateTime.Now.Date;
     s_singleton._mostRecentArea = "Initializing";             // Seems more useful to put in something in case an error occurs before app gets this set.
 }