protected override void SetUpCore()
 {
     base.SetUpCore();
     ApplicationJumpListServiceTestsImageSourceHelper.RegisterPackScheme();
     NativeResourceManager.CompanyNameOverride = "DevExpress Tests Long Path Test Long Path Test Long Path Test Long Path Test";
     NativeResourceManager.ProductNameOverride = "DevExpress.Xpf.Core Tests Long Path Test Long Path Test Long Path Test";
     NativeResourceManager.VersionOverride     = AssemblyInfo.Version;
     nativeJumpList             = new TestNativeJumpList();
     applicationJumpListService = applicationJumpListServiceInstance = CreateTestService(nativeJumpList, out jumpActionsManager);
 }
예제 #2
0
 public void Dispose()
 {
     TaskbarButtonService.Description    = null;
     TaskbarButtonService.OverlayIcon    = null;
     TaskbarButtonService.ProgressState  = TaskbarItemProgressState.None;
     ButtonProperties.CollectionChanged -= ButtonPropertyChanged;
     ButtonProperties = null;
     TaskbarButtonService.ThumbButtonInfos.Clear();
     TaskbarButtonService.ThumbnailClipMarginCallback = null;
     TaskbarButtonService.ThumbnailClipMargin         = new Thickness();
     ApplicationJumpListService.Items.Clear();
     ApplicationJumpListService.Apply();
 }
예제 #3
0
        void AddTask(NewJumpTaskWindowViewModel task)
        {
            string customCategory = string.IsNullOrEmpty(task.CustomCategory) ? null : task.CustomCategory;

            ApplicationJumpListService.Items.AddOrReplace(customCategory, task.Title, task.Icon.Icon, task.Description,
                                                          () => MessageBoxService.Show(task.MessageText));
            IEnumerable <RejectedApplicationJumpItem> rejectedItems = ApplicationJumpListService.Apply();

            foreach (var rejectedItem in rejectedItems)
            {
                var rejectedTask = (ApplicationJumpTaskInfo)rejectedItem.JumpItem;
                MessageBoxService.Show(string.Format("Error: {0}", rejectedItem.Reason), rejectedTask.Title, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }