Beispiel #1
0
 void OnConfiguring(object sender, ConfigEventArgs e)
 {
     if (e.PluginConfig.Name == "Definition")
     {
         ChangePins();
     }
 }
Beispiel #2
0
 internal void OnConfiguring(ConfigEventArgs e)
 {
     if (Configuring != null)
     {
         Configuring(this, e);
     }
 }
        //Event handler for OnInitComleted event
        private async void SdkInstance_OnInitCompleted(object sender, ConfigEventArgs e)
        {
            var placementsInfo = "OnInitCompleted: " + e.Initialized;

            if (e.Initialized == true)
            {
                for (var i = 0; i < e.Placements.Length; i++)
                {
                    placementsInfo += "\n\tPlacement" + (i + 1) + ": " + e.Placements[i].ReferenceId;
                    if (e.Placements[i].IsAutoCached == true)
                    {
                        placementsInfo += " (Auto-Cached)";
                    }

                    if (e.Placements[i].IsIncentivized == true)
                    {
                        placementsInfo += " (Rewarded)";
                    }
                }
            }
            else
            {
                placementsInfo += "\n\t" + e.ErrorMessage;
            }
            System.Diagnostics.Debug.WriteLine(placementsInfo);
            await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, new DispatchedHandler(() => ChangeLoadButtonsState(e.Initialized)));

            // Banner ad
            await vungleBannerControl.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                this.vungleBannerControl.LoadAndPlayBannerAd("BANNER-6853705", VungleBannerSizes.Banner_320x50);
            });
        }
 void Instance_OnChanged(object sender, ConfigEventArgs e)
 {
     if (e.Data != ConfigProperties.Scale)
     {
         return;
     }
     StyleFactory.Scale = LaunchCountdownConfig.Instance.Info.Scale;
     StyleFactory.Reload();
     WindowStyle = StyleFactory.MainWindowStyle;
 }
Beispiel #5
0
 private void NotifyHelper_ConfigChanged(ConfigEventArgs config)
 {
     _repeatItems.Clear();
     foreach (var type in Enum.GetValues(typeof(RepeatType)))
     {
         if (Enum.TryParse($"Repeat{type.ToString()}", out Utils.Document.Label label))
         {
             _repeatItems.Add(new KeyValuePair <RepeatType, string>((RepeatType)type, DocumentHelper.Get(label)));
         }
     }
 }
        private void M_vungle_OnInitCompleted(object sender, ConfigEventArgs e)
        {
            List <String> placements = new List <string>();

            if (e.Placements != null)
            {
                foreach (var placement in e.Placements)
                {
                    placements.Add(placement.ReferenceId);
                }
            }
            VungleInitializedEvent?.Invoke(e.Initialized, placements, e.ErrorMessage);
        }
Beispiel #7
0
        private void Configuration_ConfigChanged(object sender, ConfigEventArgs e)
        {
            if (e.Config != ConfigEventArgs.Configs.LibraryPath)
            {
                return;
            }

            SongCollector.Stop();
            ArtistCollection.GetMainCollection().Clear();
            AlbumCollection.GetMainCollection().Clear();
            SongCollection.GetMainCollection().Clear();
            SongCollector.Start();
        }
 private void NotifyHelper_ConfigChanged(ConfigEventArgs e)
 {
     this.ProgressbarShow(() =>
     {
         _config = e.Config;
         Refresh();
         foreach (var item in _viewMap)
         {
             item.Value.View.Clear();
             _taskQueue.Enqueue(SaveFileLoad, item.Value);
         }
         settingFlyout.IsOpen = !settingFlyout.IsOpen;
         return(Task.CompletedTask);
     });
 }
Beispiel #9
0
        private void InMobiHandler_OnInitCompleted(object sender, ConfigEventArgs e)
        {
            // Ad request to the instance (plcA) is triggered by Vungle on preload

            var initString = $"InMobiHandler_OnInitCompleted, InMobi Handler Init: {e.Initialized}";

            if (e.Initialized == true)
            {
                for (var i = 0; i < e.Placements.Length; ++i)
                {
                    initString += $"\n\t PLC: {e.Placements[i].ReferenceId}" +
                                  $" isAutoCached: {e.Placements[i].IsAutoCached}";
                }
            }

            Debug.WriteLine(initString);
        }
Beispiel #10
0
        //Event handler for OnInitComleted event
        private async void SdkInstance_OnInitCompleted(object sender, ConfigEventArgs e)
        {
            var placementsInfo = "OnInitCompleted: " + e.Initialized;

            if (e.Initialized == true)
            {
                for (var i = 0; i < e.Placements.Length; i++)
                {
                    placementsInfo += "\n\tPlacement" + (i + 1) + ": " + e.Placements[i].ReferenceId;
                    if (e.Placements[i].IsAutoCached == true)
                    {
                        placementsInfo += " (Auto-Cached)";
                    }
                }
            }
            else
            {
                placementsInfo += "\n\t" + e.ErrorMessage;
            }
            System.Diagnostics.Debug.WriteLine(placementsInfo);
            await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, new DispatchedHandler(() => ChangeLoadButtonsState(e.Initialized)));
        }
Beispiel #11
0
        // OnInitCompleted
        //   e.Initialized - 如果初始化成功为 true,失败为 false
        //   e.ErrorMessage - 当 e.Initialized 为 false 时的失败原因
        private void SdkInstance_OnInitCompleted(object sender, ConfigEventArgs e)
        {
            var placementsInfo = "OnInitCompleted: " + e.Initialized;

            //初始化成功
            if (e.Initialized == true)
            {
                //打印广告位置列表
                for (var i = 0; i < e.Placements.Length; i++)
                {
                    placementsInfo += "\n\tPlacement" + (i + 1) + ": " + e.Placements[i].ReferenceId;
                    if (e.Placements[i].IsAutoCached == true)
                    {
                        placementsInfo += " (Auto-Cached)";
                    }
                }
            }
            //初始化失败
            else
            {
                placementsInfo += "\n\t" + e.ErrorMessage;
            }
        }
Beispiel #12
0
 public static void ConfigSvc_FinalSelection(object sender, ConfigEventArgs args)
 {
 }
Beispiel #13
0
 private void source_configRemoved(object sender, ConfigEventArgs e)
 {
     configRemovedCount++;
     eventConfig     = e.Config;
     eventCollection = (ConfigCollection)sender;
 }
 /// <summary>
 /// 配置更改事件
 /// </summary>
 /// <param name="args"></param>
 private void TestClientClientOnConfigChange(ConfigEventArgs args)
 {
     ConsoleHelper.TestClientWriteLine(args.Message);
 }