Skip to content

Commit

Permalink
Fix hyperlinks in Revit 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
vnoves committed Aug 6, 2024
1 parent 9b151e1 commit 77bcb50
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 41 deletions.
8 changes: 6 additions & 2 deletions Common_glTF_Exporter/Common_glTF_Exporter.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Export\GltfJson.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Export\MeshOpt.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Model\GlbComponents.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Model\Links.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Model\LoadContext.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Model\Payload.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Model\RevitGridParametersObject.cs" />
Expand All @@ -52,6 +53,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Transform\ModelScale.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\Analytics.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\DirectoryUtils.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\Hyperlink.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\IsDocumentRFA.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\MaterialUtils.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\GeometryUtils.cs" />
Expand All @@ -62,7 +64,9 @@
<Compile Include="$(MSBuildThisFileDirectory)Version\LatestVersion.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Version\RunLocalFile.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Version\VersionValidate.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Windows\AboutUsWindow.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Windows\AboutUsWindow.xaml.cs">
<DependentUpon>AboutUsWindow.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Windows\FeedbackWindow.xaml.cs">
<DependentUpon>FeedbackWindow.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -138,8 +142,8 @@
</ItemGroup>
<ItemGroup>
<Page Include="$(MSBuildThisFileDirectory)Windows\AboutUsWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Windows\FeedbackWindow.xaml">
<SubType>Designer</SubType>
Expand Down
13 changes: 13 additions & 0 deletions Common_glTF_Exporter/Model/Links.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
using static System.Net.WebRequestMethods;

namespace Common_glTF_Exporter
{
public class Links
{
public static string contactLink = "https://e-verse.com/contact/";
public static string everseWebsite = "https://e-verse.com";
}
}
22 changes: 22 additions & 0 deletions Common_glTF_Exporter/Utils/Hyperlink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace Common_glTF_Exporter.Utils
{
public static class Hyperlink
{
public static void Run(string url)
{
try
{
Process.Start(new ProcessStartInfo(url) { UseShellExecute = true });
}
catch (Exception ex)
{
Console.WriteLine($"An error occurred: {ex.Message}");
}
}
}
}
3 changes: 2 additions & 1 deletion Common_glTF_Exporter/Version/RunLocalFile.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.IO;
using Common_glTF_Exporter.Utils;

namespace Common_glTF_Exporter.Version
{
Expand All @@ -8,7 +9,7 @@ public static void Action(string pathFile)
{
if (File.Exists(pathFile))
{
System.Diagnostics.Process.Start(pathFile);
Hyperlink.Run(pathFile);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Common_glTF_Exporter;
using Common_glTF_Exporter.Utils;
using Common_glTF_Exporter.ViewModel;

Expand All @@ -17,22 +18,6 @@ public AboutUsWindow()
this.DataContext = this;
}


public static AboutUsWindow Create()
{
var progressBar = new AboutUsWindow();
progressBar.Show();
return progressBar;
}

private void CloseWindow(object sender, RoutedEventArgs e)
{
if (ProgressBarWindow.MainView != null && ProgressBarWindow.MainView.IsActive)
{
ProgressBarWindow.MainView.Close();
}
}

private void Border_MouseDown(object sender, MouseButtonEventArgs e)
{
this.DragMove();
Expand All @@ -45,11 +30,11 @@ private void CancelProcess_Click(object sender, RoutedEventArgs e)

private void Title_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com/contact/");
Hyperlink.Run(Links.contactLink);
}
private void everse_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com/");
Hyperlink.Run(Links.everseWebsite);
}
}
}
5 changes: 3 additions & 2 deletions Common_glTF_Exporter/Windows/FeedbackWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Windows.Input;
using Common_glTF_Exporter.Utils;
using Common_glTF_Exporter.ViewModel;
using Common_glTF_Exporter;

/// <summary>
/// Feedback Window.
Expand Down Expand Up @@ -45,11 +46,11 @@ private void CancelProcess_Click(object sender, RoutedEventArgs e)

private void Title_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com/contact/");
Hyperlink.Run(Links.contactLink);
}
private void Leia_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com/leia/");
Hyperlink.Run("https://e-verse.com/leia/");
}
}
}
5 changes: 3 additions & 2 deletions Common_glTF_Exporter/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Windows.Input;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Common_glTF_Exporter;
using Common_glTF_Exporter.Utils;
using Common_glTF_Exporter.ViewModel;
using Common_glTF_Exporter.Windows.MainWindow;
Expand Down Expand Up @@ -115,12 +116,12 @@ private void Close_Click(object sender, RoutedEventArgs e)

private void Title_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com/");
Hyperlink.Run(Links.everseWebsite);
}

private void Leia_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://apps.autodesk.com/RVT/es/Detail/Index?id=492952120634946986&appLang=en&os=Win64");
Hyperlink.Run("https://apps.autodesk.com/RVT/es/Detail/Index?id=492952120634946986&appLang=en&os=Win64");
}

private void TrueFalseToggles(object sender, RoutedEventArgs e)
Expand Down
14 changes: 2 additions & 12 deletions Common_glTF_Exporter/Windows/MessageWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
namespace Revit_glTF_Exporter
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
using System.Windows.Input;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Common_glTF_Exporter;
using Common_glTF_Exporter.Utils;
using Common_glTF_Exporter.ViewModel;
using Common_glTF_Exporter.Windows.MainWindow;
using View = Autodesk.Revit.DB.View;

/// <summary>
/// Interaction logic for Settings.xaml.
Expand Down Expand Up @@ -50,7 +40,7 @@ private void Close_Click(object sender, RoutedEventArgs e)

private void Title_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com/");
Hyperlink.Run(Links.everseWebsite);
}
}
}
2 changes: 1 addition & 1 deletion Common_glTF_Exporter/Windows/ProgressBarWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private void CancelProcess_Click(object sender, RoutedEventArgs e)

private void Leia_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com/leia/");
Hyperlink.Run("https://e-verse.com/leia/");
}
}
}
6 changes: 4 additions & 2 deletions Common_glTF_Exporter/Windows/Resources.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace Revit_glTF_Exporter
{
using System.Windows;
using Common_glTF_Exporter;
using Common_glTF_Exporter.Utils;

/// <summary>
/// Resources.
Expand All @@ -9,12 +11,12 @@ public partial class Resources : ResourceDictionary
{
private void EngworksLink(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com/");
Hyperlink.Run(Links.everseWebsite);
}

private void AddInLink(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.com");
Hyperlink.Run("https://e-verse.com");
}
}
}
2 changes: 1 addition & 1 deletion Common_glTF_Exporter/Windows/VersionWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private void Close_Click(object sender, RoutedEventArgs e)

private void Version_Link(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://e-verse.notion.site/Leia-version-4-4-724-0c53931c9cc04ea3ae143af10bfbbc8a");
Hyperlink.Run("https://e-verse.notion.site/Leia-version-4-4-724-0c53931c9cc04ea3ae143af10bfbbc8a");
}

private void UpdatesNotes_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
Expand Down

0 comments on commit 77bcb50

Please sign in to comment.