MiscViewModel.cs 1.3 KB

1234567891011121314151617181920212223242526
  1. using PixiEditor.Helpers;
  2. using PixiEditor.Models.Commands.Attributes;
  3. using PixiEditor.Models.Commands.Attributes.Commands;
  4. using PixiEditor.Views.Dialogs;
  5. namespace PixiEditor.ViewModels.SubViewModels.Main;
  6. [Command.Group("PixiEditor.Links", "Misc")]
  7. internal class MiscViewModel : SubViewModel<ViewModelMain>
  8. {
  9. public MiscViewModel(ViewModelMain owner)
  10. : base(owner)
  11. {
  12. }
  13. [Command.Internal("PixiEditor.Links.OpenHyperlink")]
  14. [Command.Basic("PixiEditor.Links.OpenDocumentation", "https://pixieditor.net/docs/introduction", "Documentation", "Open Documentation", IconPath = "Globe.png")]
  15. [Command.Basic("PixiEditor.Links.OpenWebsite", "https://pixieditor.net", "Website", "Open Website", IconPath = "Globe.png")]
  16. [Command.Basic("PixiEditor.Links.OpenRepository", "https://github.com/PixiEditor/PixiEditor", "Repository", "Open Repository", IconPath = "Globe.png")]
  17. [Command.Basic("PixiEditor.Links.OpenLicense", "https://github.com/PixiEditor/PixiEditor/blob/master/LICENSE", "License", "Open License", IconPath = "Globe.png")]
  18. [Command.Basic("PixiEditor.Links.OpenOtherLicenses", "https://pixieditor.net/docs/Third-party-licenses", "Third Party Licenses", "Open Third Party Licenses", IconPath = "Globe.png")]
  19. public static void OpenHyperlink(string url)
  20. {
  21. ProcessHelpers.ShellExecute(url);
  22. }
  23. }