Skip to content

Commit 715d8a1

Browse files
committed
Re-arrange project tree, inital CE support for references
1 parent f442210 commit 715d8a1

35 files changed

+519
-240
lines changed

RetailCoder.VBE/AddRemoveReferences/AddRemoveReferencesViewModel.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

RetailCoder.VBE/AddRemoveReferences/RegisteredLibraryFinderService.cs

Lines changed: 0 additions & 177 deletions
This file was deleted.

RetailCoder.VBE/AddRemoveReferences/RegisteredLibraryInfo.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

RetailCoder.VBE/Resources/lock.png

-1.5 KB
Binary file not shown.

RetailCoder.VBE/Resources/pin.png

-581 Bytes
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Rubberduck.AddRemoveReferences
8+
{
9+
public interface IReferenceInfo
10+
{
11+
Guid Guid { get; }
12+
string Name { get; }
13+
string FullPath { get; }
14+
int Major { get; }
15+
int Minor { get; }
16+
}
17+
}

RetailCoder.VBE/AddRemoveReferences/ReferenceModel.cs renamed to Rubberduck.Core/AddRemoveReferences/ReferenceModel.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Runtime.InteropServices.ComTypes;
23
using Rubberduck.VBEditor.SafeComWrappers;
34
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
45

@@ -10,7 +11,7 @@ public ReferenceModel(IVBProject project, int priority)
1011
{
1112
Name = project.Name;
1213
Priority = priority;
13-
Guid = string.Empty;
14+
Guid = Guid.Empty;
1415
Description = project.Description;
1516
Version = default(Version);
1617
FullPath = project.FileName;
@@ -23,20 +24,20 @@ public ReferenceModel(RegisteredLibraryInfo info)
2324
Name = info.Name;
2425
Guid = info.Guid;
2526
Description = info.Description;
26-
Version = info.Version;
27+
Major = info.Major;
28+
Minor = info.Minor;
2729
FullPath = info.FullPath;
2830
IsBuiltIn = false;
2931
Type = ReferenceKind.TypeLibrary;
3032
Flags = info.Flags;
31-
SubKey = info.SubKey;
3233
}
3334

3435
public ReferenceModel(IReference reference, int priority)
3536
{
3637
IsSelected = true;
3738
Priority = priority;
3839
Name = reference.Name;
39-
Guid = reference.Guid;
40+
Guid = new Guid(reference.Guid);
4041
Description = reference.Description;
4142
Version = new Version(reference.Major, reference.Minor);
4243
FullPath = reference.FullPath;
@@ -50,16 +51,20 @@ public ReferenceModel(IReference reference, int priority)
5051
public int Priority { get; set; }
5152

5253
public string Name { get; }
53-
public string Guid { get; }
54+
public Guid Guid { get; }
5455
public string Description { get; }
5556
public Version Version { get; }
5657
public string FullPath { get; }
5758
public bool IsBuiltIn { get; }
5859
public bool IsBroken { get; }
59-
public int Flags { get; }
60-
public int SubKey { get; }
60+
public LIBFLAGS Flags { get; }
6161
public ReferenceKind Type { get; }
6262

63+
private string FullPath32 { get; }
64+
private string FullPath64 { get; }
65+
public int Major { get; set; }
66+
public int Minor { get; set; }
67+
6368
public ReferenceStatus Status => IsBuiltIn
6469
? ReferenceStatus.BuiltIn
6570
: IsBroken

0 commit comments

Comments
 (0)