private void RecordEventSegmentation_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            Segmentation segmentation = new Segmentation();
            segmentation.Add("country", "Ukraine");
            segmentation.Add("app_version", "1.2");

            Countly.RecordEvent("seconds", DateTime.Now.Second, segmentation);
        }
Exemplo n.º 2
0
        private void RecordEventSegmentation_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            Segmentation segmentation = new Segmentation();
            segmentation.Add("country", "Ukraine");
            segmentation.Add("app_version", "1.2");

            Countly.RecordEvent("seconds", DateTime.Now.Second + 1, segmentation);

            Countly.AddBreadCrumb("segmentation event");
        }
Exemplo n.º 3
0
        private CountlySDK.Segmentation CreateMenuOpenedSourceSegmentation(MenuOpenedSource?menuOpenedSource)
        {
            var segmentation = new CountlySDK.Segmentation();

            if (_menuOpenedSource is not null)
            {
                segmentation.Add("eventSource", _menuOpenedSource.ToString() + "Menu");
            }
            return(segmentation);
        }
Exemplo n.º 4
0
 private async void OnTrayIconClicked(object?sender, EventArgs e)
 {
     await this.Dispatcher.InvokeAsync(async() =>
     {
         if (this.App.BarManager.BarVisible)
         {
             this.App.BarManager.HideBar();
             //
             var segmentation = new CountlySDK.Segmentation();
             segmentation.Add("eventSource", "trayIconClick");
             await App.Current.Countly_RecordEventAsync("morphicBarHide", 1, segmentation);
         }
         else
         {
             this.App.BarManager.ShowBar();
             //
             var segmentation = new CountlySDK.Segmentation();
             segmentation.Add("eventSource", "trayIconClick");
             await App.Current.Countly_RecordEventAsync("morphicBarShow", 1, segmentation);
         }
     });
 }
Exemplo n.º 5
0
 /// <summary>
 /// Records a custom event with the specified values
 /// </summary>
 /// <param name="Key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="Count">Count to associate with the event, should be more than zero</param>
 /// <param name="Sum">Sum to associate with the event</param>
 /// <param name="Segmentation">Segmentation object to associate with the event, can be null</param>
 private static void RecordCountlyEvent(string Key, int Count, double?Sum, Segmentation Segmentation)
 {
     AddEvent(new CountlyEvent(Key, Count, Sum, Segmentation));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Records a custom event with the specified segmentation values, count and a sum
 /// </summary>
 /// <param name="Key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="Count">Count to associate with the event, should be more than zero</param>
 /// <param name="Sum">Sum to associate with the event</param>
 /// <param name="Segmentation">Segmentation object to associate with the event, can be null</param>
 public static void RecordEvent(string Key, int Count, double Sum, Segmentation Segmentation)
 {
     RecordCountlyEvent(Key, Count, Sum, Segmentation);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Records a custom event with the specified values
 /// </summary>
 /// <param name="Key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="Count">Count to associate with the event, should be more than zero</param>
 /// <param name="Sum">Sum to associate with the event</param>
 /// <param name="Segmentation">Segmentation object to associate with the event, can be null</param>
 /// <returns>True if event is uploaded successfully, False - queued for delayed upload</returns>
 private static Task <bool> RecordCountlyEvent(string Key, int Count, double?Sum, Segmentation Segmentation)
 {
     return(AddEvent(new CountlyEvent(Key, Count, Sum, Segmentation)));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Records a custom event with the specified segmentation values, count and a sum
 /// </summary>
 /// <param name="Key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="Count">Count to associate with the event, should be more than zero</param>
 /// <param name="Sum">Sum to associate with the event</param>
 /// <param name="Segmentation">Segmentation object to associate with the event, can be null</param>
 /// <returns>True if event is uploaded successfully, False - queued for delayed upload</returns>
 public static Task <bool> RecordEvent(string Key, int Count, double Sum, Segmentation Segmentation)
 {
     return(RecordCountlyEvent(Key, Count, Sum, Segmentation));
 }
 /// <summary>
 /// Records a custom event with the specified values
 /// </summary>
 /// <param name="Key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="Count">Count to associate with the event, should be more than zero</param>
 /// <param name="Sum">Sum to associate with the event</param>
 /// <param name="Segmentation">Segmentation object to associate with the event, can be null</param>
 /// <returns>True if event is uploaded successfully, otherwise - False</returns>
 private static Task<bool> RecordCountlyEvent(string Key, int Count, double? Sum, Segmentation Segmentation)
 {
     return AddEvent(new CountlyEvent(Key, Count, Sum, Segmentation));
 }
Exemplo n.º 10
0
 /// <summary>
 /// Records a custom event with the specified segmentation values, count and a sum
 /// </summary>
 /// <param name="Key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="Count">Count to associate with the event, should be more than zero</param>
 /// <param name="Sum">Sum to associate with the event</param>
 /// <param name="Segmentation">Segmentation object to associate with the event, can be null</param>
 /// <returns>True if event is uploaded successfully, otherwise - False</returns>
 public static Task<bool> RecordEvent(string Key, int Count, double Sum, Segmentation Segmentation)
 {
     return RecordCountlyEvent(Key, Count, Sum, Segmentation);
 }
Exemplo n.º 11
0
 /// <summary>
 /// Records a custom event with the specified values
 /// </summary>
 /// <param name="Key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="Count">Count to associate with the event, should be more than zero</param>
 /// <param name="Sum">Sum to associate with the event</param>
 /// <param name="Segmentation">Segmentation object to associate with the event, can be null</param>
 private static void RecordCountlyEvent(string Key, int Count, double? Sum, Segmentation Segmentation)
 {
     AddEvent(new CountlyEvent(Key, Count, Sum, Segmentation));
 }
Exemplo n.º 12
0
 /// <summary>
 /// Records a custom event with the specified segmentation values, count and a sum
 /// </summary>
 /// <param name="Key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="Count">Count to associate with the event, should be more than zero</param>
 /// <param name="Sum">Sum to associate with the event</param>
 /// <param name="Segmentation">Segmentation object to associate with the event, can be null</param>
 public static void RecordEvent(string Key, int Count, double Sum, Segmentation Segmentation)
 {
     RecordCountlyEvent(Key, Count, Sum, Segmentation);
 }
Exemplo n.º 13
0
 /// <summary>
 /// Records a custom event with the specified values
 /// </summary>
 /// <param name="key">Name of the custom event, required, must not be the empty string</param>
 /// <param name="count">Count to associate with the event, should be more than zero</param>
 /// <param name="sum">Sum to associate with the event</param>
 /// <param name="duration">Duration to associate with the event</param>
 /// <param name="segmentation">Segmentation object to associate with the event, can be null</param>
 /// <returns>True if event is uploaded successfully, False - queued for delayed upload</returns>
 public static void RecordEvent(string key, int count = 1, double?sum = null, double?duration = null, Segmentation segmentation = null)
 {
     AddEvent(new CountlyEvent(key, count, sum, duration, segmentation));
 }