Skip to content

Commit

Permalink
Find Resources Folder issue #165
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbaileynar committed Sep 8, 2021
1 parent 83b7c55 commit 2eb9e9c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions RaveAddIn/AddInCommands/btnFindResourcesFolder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.IO;
using System.Windows.Forms;

namespace RaveAddIn.AddInCommands
{
public class btnFindResourcesFolder : ESRI.ArcGIS.Desktop.AddIns.Button
{
protected override void OnClick()
{
string app_data = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
if (Directory.Exists(app_data))
{
string rave_data = Path.Combine(app_data, Properties.Resources.AppDataFolder);
if (Directory.Exists(rave_data))
System.Diagnostics.Process.Start(rave_data);
else
System.Diagnostics.Process.Start(app_data);
}
else
MessageBox.Show("The system APPData folder does not exist.", "AppData Folder Missing", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
Binary file modified RaveAddIn/Config.Designer.cs
Binary file not shown.
4 changes: 3 additions & 1 deletion RaveAddIn/Config.esriaddinx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<!-- Help Menu-->
<Button id="RAVE_AddIn_OptionsButton" class="RaveAddIn.AddInCommands.btnOptions" message="configure the RAVE software." caption="RAVE Options" tip="Configure the RAVE AddIn" category="RAVE" image="Images\Options.png" />
<Button id="RAVE_AddIn_UpdateResourcesButton" class="RaveAddIn.AddInCommands.btnUpdateResources" message="Update Resources." caption="Update Resources" tip="Update RAVE business logic and symbology resources" category="RAVE" image="Images\Refresh.png" />
<Button id="RAVE_AddIn_FindResourcesFolderButton" class="RaveAddIn.AddInCommands.btnFindResourcesFolder" message="Find Resources Folder." caption="Find Resources Folder" tip="Open the RAVE resources folder in Windows Explorer" category="RAVE" image="Images\BrowseFolder.png" />
<Button id="RAVE_AddIn_AboutButton" class="RaveAddIn.AddInCommands.btnAbout" message="Provides information about the version, authors and funding for the RAVE software." caption="About RAVE" tip="Information About the RAVE AddIn" category="RAVE" image="Images\RAVEAddIn.png" />
<Button id="RAVE_AddIn_WebSite" class="RaveAddIn.AddInCommands.btnWebSite" message="Open the RAVE Software Web Site" caption="RAVE Web Site" category="RAVE" image="Images\Help.png" />
</Commands>
Expand Down Expand Up @@ -46,7 +47,8 @@
<Items>
<Button refID="RAVE_AddIn_OptionsButton" />
<Button refID="RAVE_AddIn_UpdateResourcesButton" separator="true" />
<Button refID="RAVE_AddIn_WebSite" />
<Button refID="RAVE_AddIn_FindResourcesFolderButton" />
<Button refID="RAVE_AddIn_WebSite" separator="true" />
<Button refID="RAVE_AddIn_AboutButton" separator="true"/>
</Items>
</Menu>
Expand Down
1 change: 1 addition & 0 deletions RaveAddIn/RaveAddIn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AddInCommands\btnAbout.cs" />
<Compile Include="AddInCommands\btnFindResourcesFolder.cs" />
<Compile Include="AddInCommands\btnOpenProject.cs" />
<Compile Include="AddInCommands\btnOptions.cs" />
<Compile Include="AddInCommands\btnProjectExplorer.cs" />
Expand Down

0 comments on commit 2eb9e9c

Please sign in to comment.