Пример #1
0
 protected void showDetail(Instance i)
 {
     Process.Start(new ProcessStartInfo()
     {
         FileName        = VRChat.GetInstanceLink(i),
         UseShellExecute = true,
     });
 }
Пример #2
0
    public static void SaveInstanceToShortcut(Instance i, string filepath, bool httpLink = false)
    {
        var     t        = Type.GetTypeFromCLSID(new Guid("72C24DD5-D70A-438B-8A42-98424B88AFB8"));
        dynamic shell    = Activator.CreateInstance(t);
        var     shortcut = shell.CreateShortcut(filepath);

        shortcut.IconLocation = Application.ExecutablePath + ",0";

        if (!httpLink)
        {
            shortcut.TargetPath = VRChat.GetLaunchInstanceLink(i);
        }
        else
        {
            shortcut.TargetPath = VRChat.GetInstanceLink(i);
        }

        shortcut.Save();
        Marshal.FinalReleaseComObject(shortcut);
        Marshal.FinalReleaseComObject(shell);
    }
Пример #3
0
 protected void copyInstanceLinkToClipboard(Instance i)
 {
     Clipboard.SetText(VRChat.GetInstanceLink(i));
 }