Пример #1
0
 public NewJumpTaskWindowViewModel()
 {
     Icons = new NamedIcon[] {
         new NamedIcon()
         {
             Caption = "Moon",
             Icon    = ImageSourceHelper.GetImageSource(AssemblyHelper.GetResourceUri(typeof(NewJumpTaskWindowViewModel).Assembly, "Images/Moon.png"))
         },
         new NamedIcon()
         {
             Caption = "Sun",
             Icon    = ImageSourceHelper.GetImageSource(AssemblyHelper.GetResourceUri(typeof(NewJumpTaskWindowViewModel).Assembly, "Images/Sun.png"))
         }
     };
     CustomCategory = "";
     Title          = "Title";
     Description    = "";
     MessageText    = "Message";
     Icon           = Icons.ElementAt(0);
 }
Пример #2
0
 public TaskbarServicesViewModel()
 {
     OverlayIcons = new NamedIcon[] {
         new NamedIcon()
         {
             Caption = "Moon",
             Icon    = ImageSourceHelper.GetImageSource(AssemblyHelper.GetResourceUri(typeof(TaskbarServices).Assembly, "Images/Moon.png"))
         },
         new NamedIcon()
         {
             Caption = "Sun",
             Icon    = ImageSourceHelper.GetImageSource(AssemblyHelper.GetResourceUri(typeof(TaskbarServices).Assembly, "Images/Sun.png"))
         }
     };
     ProgressStatesNames = Enum.GetNames(typeof(TaskbarItemProgressState));
     ButtonProperties    = new ObservableCollection <bool> {
         true, true, true, false, true
     };
     ButtonProperties.CollectionChanged += ButtonPropertyChanged;
 }
Пример #3
0
 protected virtual void OnThumbButtonsCreateChanged()
 {
     if (ThumbButtonsCreate)
     {
         TaskbarButtonService.ThumbButtonInfos.Add(new TaskbarThumbButtonInfo {
             Description = "Zoom out",
             ImageSource = ImageSourceHelper.GetImageSource(AssemblyHelper.GetResourceUri(typeof(TaskbarServices).Assembly, "/Images/TaskbarScreenshots/ZoomOut_32x32.png")),
             Action      = () => DecreaseThumbnailClipMarginMultipliyer()
         });
         TaskbarButtonService.ThumbButtonInfos.Add(new TaskbarThumbButtonInfo {
             Description = "Zoom in",
             ImageSource = ImageSourceHelper.GetImageSource(AssemblyHelper.GetResourceUri(typeof(TaskbarServices).Assembly, "/Images/TaskbarScreenshots/ZoomIn_32x32.png")),
             Action      = () => IncreaseThumbnailClipMarginMultipliyer()
         });
         SetButtonsProperties();
     }
     else
     {
         TaskbarButtonService.ThumbButtonInfos.Clear();
     }
 }
Пример #4
0
 public void SetIcon(string icon)
 {
     //一定要把image文件加入到工程中
     Icon = ImageSourceHelper.GetImageSource(AssemblyHelper.GetResourceUri(typeof(ModuleMenu).Assembly, string.Format("Images/{0}", icon)));
 }