public ProfileViewerWindowViewModel(string username, ProfileViewerWindow profileViewerWindow, IDevRantClient api)
        {
            this.username = username;
            this.window   = profileViewerWindow;
            this.api      = api;

            LoadSection(0);
        }
Beispiel #2
0
 /// <summary>
 /// Open profile in ProfileViewer
 /// </summary>
 /// <param name="username"></param>
 /// <param name="owner"></param>
 /// <param name="api"></param>
 public static void OpenProfile(string username, Window owner = null, bool openInBrowser = false)
 {
     if (!openInBrowser && AppManager.Instance.Settings.OpenInProfileViewer)
     {
         ProfileViewerWindow window = new ProfileViewerWindow(username, AppManager.Instance.API);
         window.Owner = owner;
         window.ShowDialog();
     }
     else
     {
         string url = Utilities.GetProfileUrl(username);
         Process.Start(url);
     }
 }