├── .gitignore
├── README.md
├── UaBrowser.png
├── UaBrowser
├── BouncyCastle.Crypto.dll
├── Data
│ ├── TextBlockHelper.cs
│ ├── TypeToStringConverter.cs
│ └── ValueConverter.cs
├── GuidList.cs
├── Key.snk
├── LICENSE.txt
├── Microsoft.Extensions.Configuration.Abstractions.dll
├── Microsoft.Extensions.Configuration.Binder.dll
├── Microsoft.Extensions.Configuration.dll
├── Microsoft.Extensions.DependencyInjection.Abstractions.dll
├── Microsoft.Extensions.Logging.Abstractions.dll
├── Microsoft.Extensions.Logging.dll
├── Microsoft.Extensions.Options.ConfigurationExtensions.dll
├── Microsoft.Extensions.Options.dll
├── Microsoft.Extensions.Primitives.dll
├── Microsoft.IO.RecyclableMemoryStream.dll
├── OptionsDialogPage.cs
├── OptionsDialogPageControl.xaml
├── OptionsDialogPageControl.xaml.cs
├── PkgCmdIDList.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Resources
│ ├── Images.png
│ ├── Thumbs.db
│ └── robot.png
├── System.Reactive.Core.dll
├── System.Reactive.Interfaces.dll
├── System.Reactive.Linq.dll
├── System.Reactive.PlatformServices.dll
├── System.Reactive.Windows.Threading.dll
├── System.Runtime.CompilerServices.Unsafe.dll
├── System.Threading.Tasks.Dataflow.dll
├── System.ValueTuple.dll
├── UaBrowser.vsct
├── UaBrowserControl.xaml
├── UaBrowserControl.xaml.cs
├── UaBrowserPackage.cs
├── UaBrowserWindowPane.cs
├── VSPackage.resx
├── ViewModels
│ ├── DataTypeDescriptionViewModel.cs
│ ├── DelegateCommand.cs
│ ├── EventDescriptionViewModel.cs
│ ├── MethodDescriptionViewModel.cs
│ ├── Parameter.cs
│ ├── PropertyDescriptionViewModel.cs
│ ├── ReadonlyPropertyDescriptionViewModel.cs
│ ├── ReferenceDescriptionViewModel.cs
│ ├── TreeViewItemViewModel.cs
│ └── UaBrowserViewModel.cs
├── Workstation.UaBrowser.csproj
├── Workstation.UaClient.dll
├── app.config
├── hmi2.png
├── netstandard.dll
├── source.extension.vsixmanifest
└── stylecop.json
└── opc-ua-tools.sln
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | build/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studo 2015 cache/options directory
26 | .vs/
27 |
28 | # MSTest test Results
29 | [Tt]est[Rr]esult*/
30 | [Bb]uild[Ll]og.*
31 |
32 | # NUNIT
33 | *.VisualState.xml
34 | TestResult.xml
35 |
36 | # Build Results of an ATL Project
37 | [Dd]ebugPS/
38 | [Rr]eleasePS/
39 | dlldata.c
40 |
41 | *_i.c
42 | *_p.c
43 | *_i.h
44 | *.ilk
45 | *.meta
46 | *.obj
47 | *.pch
48 | *.pdb
49 | *.pgc
50 | *.pgd
51 | *.rsp
52 | *.sbr
53 | *.tlb
54 | *.tli
55 | *.tlh
56 | *.tmp
57 | *.tmp_proj
58 | *.log
59 | *.vspscc
60 | *.vssscc
61 | .builds
62 | *.pidb
63 | *.svclog
64 | *.scc
65 |
66 | # Chutzpah Test files
67 | _Chutzpah*
68 |
69 | # Visual C++ cache files
70 | ipch/
71 | *.aps
72 | *.ncb
73 | *.opensdf
74 | *.sdf
75 | *.cachefile
76 |
77 | # Visual Studio profiler
78 | *.psess
79 | *.vsp
80 | *.vspx
81 |
82 | # TFS 2012 Local Workspace
83 | $tf/
84 |
85 | # Guidance Automation Toolkit
86 | *.gpState
87 |
88 | # ReSharper is a .NET coding add-in
89 | _ReSharper*/
90 | *.[Rr]e[Ss]harper
91 | *.DotSettings.user
92 |
93 | # JustCode is a .NET coding addin-in
94 | .JustCode
95 |
96 | # TeamCity is a build add-in
97 | _TeamCity*
98 |
99 | # DotCover is a Code Coverage Tool
100 | *.dotCover
101 |
102 | # NCrunch
103 | _NCrunch_*
104 | .*crunch*.local.xml
105 |
106 | # MightyMoose
107 | *.mm.*
108 | AutoTest.Net/
109 |
110 | # Web workbench (sass)
111 | .sass-cache/
112 |
113 | # Installshield output folder
114 | [Ee]xpress/
115 |
116 | # DocProject is a documentation generator add-in
117 | DocProject/buildhelp/
118 | DocProject/Help/*.HxT
119 | DocProject/Help/*.HxC
120 | DocProject/Help/*.hhc
121 | DocProject/Help/*.hhk
122 | DocProject/Help/*.hhp
123 | DocProject/Help/Html2
124 | DocProject/Help/html
125 |
126 | # Click-Once directory
127 | publish/
128 |
129 | # Publish Web Output
130 | *.[Pp]ublish.xml
131 | *.azurePubxml
132 | # TODO: Comment the next line if you want to checkin your web deploy settings
133 | # but database connection strings (with potential passwords) will be unencrypted
134 | *.pubxml
135 | *.publishproj
136 |
137 | # NuGet Packages
138 | *.nupkg
139 | # The packages folder can be ignored because of Package Restore
140 | **/packages/*
141 | # except build/, which is used as an MSBuild target.
142 | !**/packages/build/
143 | # Uncomment if necessary however generally it will be regenerated when needed
144 | #!**/packages/repositories.config
145 | *.nuget.props
146 | *.nuget.targets
147 | *.lock.json
148 |
149 | # Windows Azure Build Output
150 | csx/
151 | *.build.csdef
152 |
153 | # Windows Store app package directory
154 | AppPackages/
155 |
156 | # Others
157 | *.[Cc]ache
158 | ClientBin/
159 | #[Ss]tyle[Cc]op.*
160 | ~$*
161 | *~
162 | *.dbmdl
163 | *.dbproj.schemaview
164 | *.pfx
165 | *.publishsettings
166 | node_modules/
167 | bower_components/
168 |
169 | # RIA/Silverlight projects
170 | Generated_Code/
171 |
172 | # Backup & report files from converting an old project file
173 | # to a newer Visual Studio version. Backup files are not needed,
174 | # because we have git ;-)
175 | _UpgradeReport_Files/
176 | Backup*/
177 | UpgradeLog*.XML
178 | UpgradeLog*.htm
179 |
180 | # SQL Server files
181 | *.mdf
182 | *.ldf
183 |
184 | # Business Intelligence projects
185 | *.rdl.data
186 | *.bim.layout
187 | *.bim_*.settings
188 |
189 | # Microsoft Fakes
190 | FakesAssemblies/
191 |
192 | # Node.js Tools for Visual Studio
193 | .ntvs_analysis.dat
194 |
195 | # Visual Studio 6 build log
196 | *.plg
197 |
198 | # Visual Studio 6 workspace options file
199 | *.opt
200 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ![OPC UA Browser][1]
2 |
3 | # opc-ua-tools
4 | Tools to build an HMI using OPC Unified Architecture and Visual Studio.
5 |
6 | To Install:
7 | You can install the "OPC UA Browser" extension directly into Visual Studio 2019. Go to Tools...Extensions and Updates. Choose Online tab. Search "Workstation.UaBrowser". Install.
8 |
9 | To Run:
10 | To open the Ua Browser window, go to View...Other Windows...OPC UA Browser
11 |
12 | To Use:
13 | Enter the url of the server you wish to browse in the text box. Press Enter.
14 |
15 | You can drag and drop the nodes onto your view model.
16 |
17 | You can customize the code templates by going to Tools...Options...OPC UA Browser
18 |
19 | ### Releases
20 |
21 | v1.5.15 Support Visual Studio 2019.
22 | v1.5.14 Cache data types when browsing.
23 |
24 | [1]: UaBrowser.png
25 |
--------------------------------------------------------------------------------
/UaBrowser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser.png
--------------------------------------------------------------------------------
/UaBrowser/BouncyCastle.Crypto.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/BouncyCastle.Crypto.dll
--------------------------------------------------------------------------------
/UaBrowser/Data/TextBlockHelper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.IO;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Documents;
8 | using System.Windows.Markup;
9 | using System.Xml;
10 |
11 | namespace Workstation.UaBrowser.Data
12 | {
13 | public static class TextBlockHelper
14 | {
15 | public static readonly DependencyProperty MarkupTextProperty = DependencyProperty.RegisterAttached(
16 | "MarkupText",
17 | typeof(string),
18 | typeof(TextBlockHelper),
19 | new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.AffectsMeasure, MarkupTextPropertyChanged));
20 |
21 | public static void SetMarkupText(DependencyObject textBlock, string value)
22 | {
23 | textBlock.SetValue(MarkupTextProperty, value);
24 | }
25 |
26 | public static string GetMarkupText(DependencyObject textBlock)
27 | {
28 | return (string)textBlock.GetValue(MarkupTextProperty);
29 | }
30 |
31 | private static void MarkupTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
32 | {
33 | var textBlock = d as TextBlock;
34 | if (textBlock == null)
35 | {
36 | return;
37 | }
38 |
39 | var formattedText = (string)e.NewValue ?? string.Empty;
40 | formattedText = string.Format("{0}", formattedText);
41 |
42 | textBlock.Inlines.Clear();
43 | using (var xmlReader = XmlReader.Create(new StringReader(formattedText)))
44 | {
45 | var result = (Span)XamlReader.Load(xmlReader);
46 | textBlock.Inlines.Add(result);
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/UaBrowser/Data/TypeToStringConverter.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Globalization;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Data;
9 |
10 | namespace Workstation.UaBrowser.Data
11 | {
12 | [ValueConversion(typeof(Type), typeof(string))]
13 | public class TypeToStringConverter : ValueConverter
14 | {
15 | protected override string Convert(Type value, object parameter, CultureInfo culture)
16 | {
17 | return this.FormatTypeName(value);
18 | }
19 |
20 | private string FormatTypeName(Type type)
21 | {
22 | if (type == null)
23 | {
24 | return string.Empty;
25 | }
26 |
27 | if (!type.IsGenericType)
28 | {
29 | return type.Name;
30 | }
31 |
32 | if (type.IsNested && type.DeclaringType.IsGenericType)
33 | {
34 | throw new NotImplementedException();
35 | }
36 |
37 | StringBuilder txt = new StringBuilder();
38 | txt.Append(type.Name, 0, type.Name.IndexOf('`'));
39 | txt.Append("<");
40 | txt.Append(string.Join(", ", type.GetGenericArguments().Select(arg => this.FormatTypeName(arg))));
41 | txt.Append(">");
42 | return txt.ToString();
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/UaBrowser/Data/ValueConverter.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Diagnostics;
6 | using System.Globalization;
7 | using System.Windows;
8 | using System.Windows.Data;
9 |
10 | namespace Workstation.UaBrowser.Data
11 | {
12 | public class ValueConverter : IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | if (value == Binding.DoNothing)
17 | {
18 | return value;
19 | }
20 |
21 | if (!(value is TSource) && ((value != null) || typeof(TSource).IsValueType))
22 | {
23 | Trace.TraceError("Error in '{0}', expected value of type '{1}', received value of type '{2}' ", this.GetType().FullName, typeof(TSource).FullName, value != null ? value.GetType().FullName : "null");
24 | return DependencyProperty.UnsetValue;
25 | }
26 |
27 | if (!targetType.IsAssignableFrom(typeof(TTarget)))
28 | {
29 | Trace.TraceError("Error in '{0}', expected target of type '{1}', received target of type '{2}' ", this.GetType().FullName, typeof(TTarget).FullName, targetType.FullName);
30 | return DependencyProperty.UnsetValue;
31 | }
32 |
33 | return this.Convert((TSource)value, parameter, culture);
34 | }
35 |
36 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
37 | {
38 | if (!(value is TTarget) && ((value != null) || typeof(TTarget).IsValueType))
39 | {
40 | Trace.TraceError("Error in '{0}', expected value of type '{1}', received value of type '{2}' ", this.GetType().FullName, typeof(TTarget).FullName, value != null ? value.GetType().FullName : "null");
41 | return DependencyProperty.UnsetValue;
42 | }
43 |
44 | if (!targetType.IsAssignableFrom(typeof(TSource)))
45 | {
46 | Trace.TraceError("Error in '{0}', expected target of type '{1}', received target of type '{2}' ", this.GetType().FullName, typeof(TSource).FullName, targetType.FullName);
47 | return DependencyProperty.UnsetValue;
48 | }
49 |
50 | return this.ConvertBack((TTarget)value, parameter, culture);
51 | }
52 |
53 | protected virtual TTarget Convert(TSource value, object parameter, CultureInfo culture)
54 | {
55 | throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, "Error_ConverterFunctionNotDefined {0}", new object[] { "Convert" }));
56 | }
57 |
58 | protected virtual TSource ConvertBack(TTarget value, object parameter, CultureInfo culture)
59 | {
60 | throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, "Error_ConverterFunctionNotDefined {0}", new object[] { "ConvertBack" }));
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/UaBrowser/GuidList.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 |
6 | namespace Workstation.UaBrowser
7 | {
8 | internal static class GuidList
9 | {
10 | public const string GuidUaBrowserPkgString = "3ebf0b3e-abaa-4161-a990-435fa37f8c69";
11 | public const string GuidUaBrowserCmdSetString = "0076ad9f-bb50-4305-9361-516301194ea5";
12 | public const string GuidToolWindowPersistanceString = "a0afbf3c-c410-4b90-b4be-2955e7088d13";
13 | public const string GuidOptionsDialogPersistanceString = "7BBDD0E3-9181-4356-8338-926538B97870";
14 | public static readonly Guid GuidUaBrowserCmdSet = new Guid(GuidUaBrowserCmdSetString);
15 | }
16 | }
--------------------------------------------------------------------------------
/UaBrowser/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Key.snk
--------------------------------------------------------------------------------
/UaBrowser/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Converter Systems LLC. All rights reserved.
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to
7 | deal in the Software without restriction, including without limitation the
8 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 | sell copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.Configuration.Abstractions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.Configuration.Abstractions.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.Configuration.Binder.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.Configuration.Binder.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.Configuration.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.DependencyInjection.Abstractions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.DependencyInjection.Abstractions.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.Logging.Abstractions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.Logging.Abstractions.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.Logging.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.Logging.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.Options.ConfigurationExtensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.Options.ConfigurationExtensions.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.Options.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.Options.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.Extensions.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.Extensions.Primitives.dll
--------------------------------------------------------------------------------
/UaBrowser/Microsoft.IO.RecyclableMemoryStream.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Microsoft.IO.RecyclableMemoryStream.dll
--------------------------------------------------------------------------------
/UaBrowser/OptionsDialogPage.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 | using System.Windows;
7 | using Microsoft.VisualStudio.ComponentModelHost;
8 | using Microsoft.VisualStudio.Shell;
9 | using Workstation.UaBrowser.ViewModels;
10 |
11 | namespace Workstation.UaBrowser
12 | {
13 | [ClassInterface(ClassInterfaceType.AutoDual)]
14 | [CLSCompliant(false)]
15 | [ComVisible(true)]
16 | [Guid(GuidList.GuidOptionsDialogPersistanceString)]
17 | public class OptionsDialogPage : UIElementDialogPage
18 | {
19 | private OptionsDialogPageControl view;
20 | private UaBrowserViewModel viewmodel;
21 |
22 | public OptionsDialogPage()
23 | {
24 | }
25 |
26 | protected override UIElement Child
27 | {
28 | get
29 | {
30 | if (this.view == null)
31 | {
32 | this.view = new OptionsDialogPageControl();
33 | var componentModel = (IComponentModel)this.GetService(typeof(SComponentModel));
34 | this.viewmodel = componentModel.DefaultExportProvider.GetExportedValue();
35 | this.view.DataContext = this.viewmodel;
36 | }
37 |
38 | return this.view;
39 | }
40 | }
41 |
42 | protected override void OnApply(DialogPage.PageApplyEventArgs e)
43 | {
44 | if (e.ApplyBehavior == ApplyKind.Apply)
45 | {
46 | this.view.LayoutRoot.BindingGroup.CommitEdit();
47 | this.viewmodel.SaveSettingsCommand.Execute(null);
48 | }
49 |
50 | base.OnApply(e);
51 | }
52 |
53 | protected override void OnClosed(EventArgs e)
54 | {
55 | this.view.LayoutRoot.BindingGroup.CancelEdit();
56 | base.OnClosed(e);
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/UaBrowser/OptionsDialogPageControl.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 | In case of emergency:
25 | Reset to factory default settings.
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
40 |
41 |
46 |
47 |
52 |
53 |
58 |
59 |
64 |
65 |
70 |
71 |
76 |
77 |
82 |
83 |
88 |
89 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/UaBrowser/OptionsDialogPageControl.xaml.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using Microsoft.VisualStudio.Shell;
5 | using System;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Input;
9 |
10 | namespace Workstation.UaBrowser
11 | {
12 | ///
13 | /// Interaction logic for OptionsDialogPageControl.xaml
14 | ///
15 | public partial class OptionsDialogPageControl : UserControl
16 | {
17 | static OptionsDialogPageControl()
18 | {
19 | EventManager.RegisterClassHandler(typeof(TextBox), UIElementDialogPage.DialogKeyPendingEvent, new EventHandler(OptionsDialogPageControl.HandleTextBoxDialogKey));
20 | }
21 |
22 | private static void HandleTextBoxDialogKey(object sender, DialogKeyEventArgs e)
23 | {
24 | if (e.Key == Key.Return || e.Key == Key.Tab)
25 | {
26 | e.Handled = true;
27 | }
28 | }
29 |
30 | public OptionsDialogPageControl()
31 | {
32 | this.InitializeComponent();
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/UaBrowser/PkgCmdIDList.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | namespace Workstation.UaBrowser
5 | {
6 | internal static class PkgCmdIDList
7 | {
8 | public const uint CmdidUaBrowser = 0x101;
9 | }
10 | }
--------------------------------------------------------------------------------
/UaBrowser/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Reflection;
6 | using System.Resources;
7 | using System.Runtime.InteropServices;
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("Workstation.UaBrowser")]
13 | [assembly: AssemblyDescription("A tool for browsing the namespace of a OPC UA server.")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("Converter Systems LLC")]
16 | [assembly: AssemblyProduct("Workstation")]
17 | [assembly: AssemblyCopyright("Copyright © 2016 Converter Systems LLC.")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 | [assembly: ComVisible(false)]
21 | [assembly: CLSCompliant(false)]
22 | [assembly: NeutralResourcesLanguage("en-US")]
23 |
24 | // Also change in source.extension.vsixmanifest and UaBrowserPackage.cs
25 | [assembly: AssemblyVersion("2.2.2.0")]
26 | [assembly: AssemblyFileVersion("2.2.2.0")]
27 |
28 | [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)]
29 |
--------------------------------------------------------------------------------
/UaBrowser/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Workstation.UaBrowser.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Workstation.UaBrowser.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized string similar to ''' <summary>
65 | /// ''' Gets the event of $fullName$.
66 | /// ''' </summary>
67 | /// <MonitoredItem(nodeId: "$nodeId$", attributeId: AttributeIds.EventNotifier)>
68 | /// Public Property $fullName$() As $dataType$
69 | /// Get
70 | /// Return _$fullName$
71 | /// End Get
72 | /// Private Set(ByVal value As $dataType$)
73 | /// SetProperty(_$fullName$, value)
74 | /// End Set
75 | /// End Property
76 | ///
77 | /// Private _$fullName$ As $dataType$
78 | ///.
79 | ///
80 | internal static string EventFormatBasic {
81 | get {
82 | return ResourceManager.GetString("EventFormatBasic", resourceCulture);
83 | }
84 | }
85 |
86 | ///
87 | /// Looks up a localized string similar to /// <summary>
88 | /// /// Gets the event of $fullName$.
89 | /// /// </summary>
90 | /// [MonitoredItem(nodeId: "$nodeId$", attributeId: AttributeIds.EventNotifier)]
91 | /// public $dataType$ $fullName$
92 | /// {
93 | /// get { return this._$fullName$; }
94 | /// private set { this.SetProperty(ref this._$fullName$, value); }
95 | /// }
96 | ///
97 | /// private $dataType$ _$fullName$;
98 | ///.
99 | ///
100 | internal static string EventFormatCSharp {
101 | get {
102 | return ResourceManager.GetString("EventFormatCSharp", resourceCulture);
103 | }
104 | }
105 |
106 | ///
107 | /// Looks up a localized string similar to ''' <summary>
108 | /// ''' Invokes the method $fullName$
109 | /// ''' </summary>
110 | /// ''' <returns>A <see cref="Task"/> that returns the output arguments.</returns>
111 | /// Public Async Function $fullName$($parameters$) As $returnType$
112 | ///
113 | /// Dim response As CallResponse = Await Me.InnerChannel.CallAsync(New CallRequest With
114 | /// {
115 | /// .MethodsToCall =
116 | /// {
117 | /// New CallMethodRequest With
118 | /// {
119 | /// .ObjectId = NodeId.Parse [rest of string was truncated]";.
120 | ///
121 | internal static string MethodFormatBasic {
122 | get {
123 | return ResourceManager.GetString("MethodFormatBasic", resourceCulture);
124 | }
125 | }
126 |
127 | ///
128 | /// Looks up a localized string similar to /// <summary>
129 | /// /// Invokes the method $fullName$.
130 | /// /// </summary>
131 | /// /// <returns>A <see cref="Task"/> that returns the output arguments.</returns>
132 | /// public async $returnType$ $fullName$($parameters$)
133 | /// {
134 | /// var response = await this.InnerChannel.CallAsync(new CallRequest
135 | /// {
136 | /// MethodsToCall = new[]
137 | /// {
138 | /// new CallMethodRequest
139 | /// {
140 | /// ObjectId = NodeId.Pars [rest of string was truncated]";.
141 | ///
142 | internal static string MethodFormatCSharp {
143 | get {
144 | return ResourceManager.GetString("MethodFormatCSharp", resourceCulture);
145 | }
146 | }
147 |
148 | ///
149 | /// Looks up a localized string similar to ''' <summary>
150 | /// ''' Gets the value of $fullName$.
151 | /// ''' </summary>
152 | /// <MonitoredItem(nodeId: "$nodeId$")>
153 | /// Public Property $fullName$() As $dataType$
154 | /// Get
155 | /// Return _$fullName$
156 | /// End Get
157 | /// Private Set(ByVal value As $dataType$)
158 | /// SetProperty(_$fullName$, value)
159 | /// End Set
160 | /// End Property
161 | ///
162 | /// Private _$fullName$ As $dataType$
163 | ///.
164 | ///
165 | internal static string ReadOnlyValueFormatBasic {
166 | get {
167 | return ResourceManager.GetString("ReadOnlyValueFormatBasic", resourceCulture);
168 | }
169 | }
170 |
171 | ///
172 | /// Looks up a localized string similar to /// <summary>
173 | /// /// Gets the value of $fullName$.
174 | /// /// </summary>
175 | /// [MonitoredItem(nodeId: "$nodeId$")]
176 | /// public $dataType$ $fullName$
177 | /// {
178 | /// get { return this._$fullName$; }
179 | /// private set { this.SetProperty(ref this._$fullName$, value); }
180 | /// }
181 | ///
182 | /// private $dataType$ _$fullName$;
183 | ///.
184 | ///
185 | internal static string ReadOnlyValueFormatCSharp {
186 | get {
187 | return ResourceManager.GetString("ReadOnlyValueFormatCSharp", resourceCulture);
188 | }
189 | }
190 |
191 | ///
192 | /// Looks up a localized string similar to [DataTypeId("$nodeId$")]
193 | /// [BinaryEncodingId("$binaryEncodingId$")]
194 | /// Public Class $dataType$
195 | /// Inherits $baseType$
196 | ///
197 | ////*
198 | ///$element$
199 | ///*/
200 | ///
201 | /// Public Sub Encode(ByVal encoder As IEncoder)
202 | /// base.Encode(encoder);
203 | /// encoder.PushNamespace("$targetNamespace$");
204 | /// encoder.PopNamespace();
205 | /// End Sub
206 | ///
207 | /// Public Sub Decode(ByVal decoder As IDecoder)
208 | /// base.Decode(decoder);
209 | /// deco [rest of string was truncated]";.
210 | ///
211 | internal static string StructureFormatBasic {
212 | get {
213 | return ResourceManager.GetString("StructureFormatBasic", resourceCulture);
214 | }
215 | }
216 |
217 | ///
218 | /// Looks up a localized string similar to [DataTypeId("$nodeId$")]
219 | /// [BinaryEncodingId("$binaryEncodingId$")]
220 | /// public class $dataType$ : $baseType$
221 | /// {
222 | ////*
223 | ///$element$
224 | ///*/
225 | ///
226 | /// public override void Encode(IEncoder encoder)
227 | /// {
228 | /// base.Encode(encoder);
229 | /// encoder.PushNamespace("$targetNamespace$");
230 | /// encoder.PopNamespace();
231 | /// }
232 | ///
233 | /// public override void Decode(IDecoder decoder)
234 | /// {
235 | /// base.Decode(decoder);
236 | /// [rest of string was truncated]";.
237 | ///
238 | internal static string StructureFormatCSharp {
239 | get {
240 | return ResourceManager.GetString("StructureFormatCSharp", resourceCulture);
241 | }
242 | }
243 |
244 | ///
245 | /// Looks up a localized string similar to ''' <summary>
246 | /// ''' Gets or sets the value of $fullName$.
247 | /// ''' </summary>
248 | /// <MonitoredItem(nodeId: "$nodeId$")>
249 | /// Public Property $fullName$() As $dataType$
250 | /// Get
251 | /// Return _$fullName$
252 | /// End Get
253 | /// Set(ByVal value As $dataType$)
254 | /// SetProperty(_$fullName$, value)
255 | /// End Set
256 | /// End Property
257 | ///
258 | /// Private _$fullName$ As $dataType$
259 | ///.
260 | ///
261 | internal static string ValueFormatBasic {
262 | get {
263 | return ResourceManager.GetString("ValueFormatBasic", resourceCulture);
264 | }
265 | }
266 |
267 | ///
268 | /// Looks up a localized string similar to /// <summary>
269 | /// /// Gets or sets the value of $fullName$.
270 | /// /// </summary>
271 | /// [MonitoredItem(nodeId: "$nodeId$")]
272 | /// public $dataType$ $fullName$
273 | /// {
274 | /// get { return this._$fullName$; }
275 | /// set { this.SetProperty(ref this._$fullName$, value); }
276 | /// }
277 | ///
278 | /// private $dataType$ _$fullName$;
279 | ///.
280 | ///
281 | internal static string ValueFormatCSharp {
282 | get {
283 | return ResourceManager.GetString("ValueFormatCSharp", resourceCulture);
284 | }
285 | }
286 | }
287 | }
288 |
--------------------------------------------------------------------------------
/UaBrowser/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | ''' <summary>
122 | ''' Gets the event of $fullName$.
123 | ''' </summary>
124 | <MonitoredItem(nodeId: "$nodeId$", attributeId: AttributeIds.EventNotifier)>
125 | Public Property $fullName$() As $dataType$
126 | Get
127 | Return _$fullName$
128 | End Get
129 | Private Set(ByVal value As $dataType$)
130 | SetProperty(_$fullName$, value)
131 | End Set
132 | End Property
133 |
134 | Private _$fullName$ As $dataType$
135 |
136 |
137 |
138 | /// <summary>
139 | /// Gets the event of $fullName$.
140 | /// </summary>
141 | [MonitoredItem(nodeId: "$nodeId$", attributeId: AttributeIds.EventNotifier)]
142 | public $dataType$ $fullName$
143 | {
144 | get { return this._$fullName$; }
145 | private set { this.SetProperty(ref this._$fullName$, value); }
146 | }
147 |
148 | private $dataType$ _$fullName$;
149 |
150 |
151 |
152 | ''' <summary>
153 | ''' Invokes the method $fullName$
154 | ''' </summary>
155 | ''' <returns>A <see cref="Task"/> that returns the output arguments.</returns>
156 | Public Async Function $fullName$($parameters$) As $returnType$
157 |
158 | Dim response As CallResponse = Await Me.InnerChannel.CallAsync(New CallRequest With
159 | {
160 | .MethodsToCall =
161 | {
162 | New CallMethodRequest With
163 | {
164 | .ObjectId = NodeId.Parse("$parentNodeId$"),
165 | .MethodId = NodeId.Parse("$nodeId$"),
166 | .InputArguments = $inputArguments$
167 | }
168 | }
169 | })
170 | Dim result As CallMethodResult = response.Results(0)
171 | If StatusCode.IsBad(result.StatusCode) Then
172 | Throw New ServiceResultException(New ServiceResult(result.StatusCode))
173 | End If
174 |
175 | Return $returnValue$
176 | End Function
177 |
178 |
179 |
180 | /// <summary>
181 | /// Invokes the method $fullName$.
182 | /// </summary>
183 | /// <returns>A <see cref="Task"/> that returns the output arguments.</returns>
184 | public async $returnType$ $fullName$($parameters$)
185 | {
186 | var response = await this.InnerChannel.CallAsync(new CallRequest
187 | {
188 | MethodsToCall = new[]
189 | {
190 | new CallMethodRequest
191 | {
192 | ObjectId = NodeId.Parse("$parentNodeId$"),
193 | MethodId = NodeId.Parse("$nodeId$"),
194 | InputArguments = $inputArguments$
195 | }
196 | }
197 | });
198 |
199 | var result = response.Results[0];
200 | if (StatusCode.IsBad(result.StatusCode))
201 | {
202 | throw new ServiceResultException(new ServiceResult(result.StatusCode));
203 | }
204 |
205 | return $returnValue$;
206 | }
207 |
208 |
209 |
210 | ''' <summary>
211 | ''' Gets the value of $fullName$.
212 | ''' </summary>
213 | <MonitoredItem(nodeId: "$nodeId$")>
214 | Public Property $fullName$() As $dataType$
215 | Get
216 | Return _$fullName$
217 | End Get
218 | Private Set(ByVal value As $dataType$)
219 | SetProperty(_$fullName$, value)
220 | End Set
221 | End Property
222 |
223 | Private _$fullName$ As $dataType$
224 |
225 |
226 |
227 | /// <summary>
228 | /// Gets the value of $fullName$.
229 | /// </summary>
230 | [MonitoredItem(nodeId: "$nodeId$")]
231 | public $dataType$ $fullName$
232 | {
233 | get { return this._$fullName$; }
234 | private set { this.SetProperty(ref this._$fullName$, value); }
235 | }
236 |
237 | private $dataType$ _$fullName$;
238 |
239 |
240 |
241 | [DataTypeId("$nodeId$")]
242 | [BinaryEncodingId("$binaryEncodingId$")]
243 | Public Class $dataType$
244 | Inherits $baseType$
245 |
246 | /*
247 | $element$
248 | */
249 |
250 | Public Sub Encode(ByVal encoder As IEncoder)
251 | base.Encode(encoder);
252 | encoder.PushNamespace("$targetNamespace$");
253 | encoder.PopNamespace();
254 | End Sub
255 |
256 | Public Sub Decode(ByVal decoder As IDecoder)
257 | base.Decode(decoder);
258 | decoder.PushNamespace("$targetNamespace$");
259 | decoder.PopNamespace();
260 | End Sub
261 | End Class
262 |
263 |
264 | [DataTypeId("$nodeId$")]
265 | [BinaryEncodingId("$binaryEncodingId$")]
266 | public class $dataType$ : $baseType$
267 | {
268 | /*
269 | $element$
270 | */
271 |
272 | public override void Encode(IEncoder encoder)
273 | {
274 | base.Encode(encoder);
275 | encoder.PushNamespace("$targetNamespace$");
276 | encoder.PopNamespace();
277 | }
278 |
279 | public override void Decode(IDecoder decoder)
280 | {
281 | base.Decode(decoder);
282 | decoder.PushNamespace("$targetNamespace$");
283 | decoder.PopNamespace();
284 | }
285 | }
286 |
287 |
288 | ''' <summary>
289 | ''' Gets or sets the value of $fullName$.
290 | ''' </summary>
291 | <MonitoredItem(nodeId: "$nodeId$")>
292 | Public Property $fullName$() As $dataType$
293 | Get
294 | Return _$fullName$
295 | End Get
296 | Set(ByVal value As $dataType$)
297 | SetProperty(_$fullName$, value)
298 | End Set
299 | End Property
300 |
301 | Private _$fullName$ As $dataType$
302 |
303 |
304 |
305 | /// <summary>
306 | /// Gets or sets the value of $fullName$.
307 | /// </summary>
308 | [MonitoredItem(nodeId: "$nodeId$")]
309 | public $dataType$ $fullName$
310 | {
311 | get { return this._$fullName$; }
312 | set { this.SetProperty(ref this._$fullName$, value); }
313 | }
314 |
315 | private $dataType$ _$fullName$;
316 |
317 |
318 |
--------------------------------------------------------------------------------
/UaBrowser/Resources/Images.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Resources/Images.png
--------------------------------------------------------------------------------
/UaBrowser/Resources/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Resources/Thumbs.db
--------------------------------------------------------------------------------
/UaBrowser/Resources/robot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/Resources/robot.png
--------------------------------------------------------------------------------
/UaBrowser/System.Reactive.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/System.Reactive.Core.dll
--------------------------------------------------------------------------------
/UaBrowser/System.Reactive.Interfaces.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/System.Reactive.Interfaces.dll
--------------------------------------------------------------------------------
/UaBrowser/System.Reactive.Linq.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/System.Reactive.Linq.dll
--------------------------------------------------------------------------------
/UaBrowser/System.Reactive.PlatformServices.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/System.Reactive.PlatformServices.dll
--------------------------------------------------------------------------------
/UaBrowser/System.Reactive.Windows.Threading.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/System.Reactive.Windows.Threading.dll
--------------------------------------------------------------------------------
/UaBrowser/System.Runtime.CompilerServices.Unsafe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/System.Runtime.CompilerServices.Unsafe.dll
--------------------------------------------------------------------------------
/UaBrowser/System.Threading.Tasks.Dataflow.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/System.Threading.Tasks.Dataflow.dll
--------------------------------------------------------------------------------
/UaBrowser/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/convertersystems/opc-ua-tools/eed9c02286d5b6fd63370fc18a8b95d686e78d8a/UaBrowser/System.ValueTuple.dll
--------------------------------------------------------------------------------
/UaBrowser/UaBrowser.vsct:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 |
34 |
35 |
36 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
48 |
49 |
56 |
57 |
58 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/UaBrowser/UaBrowserControl.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
21 |
24 |
27 |
30 |
33 |
44 |
46 |
98 |
107 |
212 |
228 |
233 |
241 |
271 |
306 |
307 |
460 |
461 |
484 |
485 |
487 |
488 |
489 |
491 |
492 |
493 |
494 |
501 | ()
505 |
506 |
507 |
508 |
510 |
511 |
512 |
514 |
515 |
516 |
517 |
524 |
528 |
529 |
530 |
531 |
533 |
534 |
535 |
537 |
538 |
539 |
540 |
547 |
552 |
553 |
554 |
555 |
557 |
558 |
559 |
561 |
562 |
563 |
564 |
571 |
575 |
576 |
577 |
578 |
580 |
581 |
582 |
584 |
585 |
586 |
587 |
594 |
598 |
599 |
600 |
601 |
602 |
603 |
605 |
606 |
607 |
610 |
611 |
615 |
616 |
617 |
618 |
619 |
620 |
622 |
624 |
625 |
627 |
629 |
630 |
632 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
649 |
650 |
652 |
653 |
655 |
668 |
685 |
704 |
705 |
706 |
707 |
711 |
712 |
713 |
715 |
716 |
718 |
719 |
720 |
721 |
722 |
723 |
726 |
731 |
735 |
741 |
742 |
743 |
750 |
755 |
756 |
--------------------------------------------------------------------------------
/UaBrowser/UaBrowserControl.xaml.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using Workstation.UaBrowser.ViewModels;
5 | using System;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Input;
9 | using System.Windows.Media;
10 |
11 | namespace Workstation.UaBrowser
12 | {
13 | ///
14 | /// Interaction logic for UaBrowserControl.xaml
15 | ///
16 | public partial class UaBrowserControl : UserControl, IDisposable
17 | {
18 | private TreeViewItem dragItem;
19 | private Point? dragPoint;
20 |
21 | public UaBrowserControl()
22 | {
23 | this.InitializeComponent();
24 | }
25 |
26 | // Called by tool window when vs closes
27 | public void Dispose()
28 | {
29 | var vm = this.DataContext as UaBrowserViewModel;
30 | if (vm != null)
31 | {
32 | vm.Dispose();
33 | }
34 | }
35 |
36 | private static T FindAncestor(DependencyObject dependencyObject)
37 | where T : class
38 | {
39 | var target = dependencyObject;
40 | do
41 | {
42 | if (target is Visual)
43 | {
44 | target = VisualTreeHelper.GetParent(target);
45 | }
46 | else
47 | {
48 | target = LogicalTreeHelper.GetParent(target);
49 | }
50 | }
51 | while (target != null && !(target is T));
52 | return target as T;
53 | }
54 |
55 | private void OnPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
56 | {
57 | this.dragPoint = new Point?(e.GetPosition(null));
58 | this.dragItem = FindAncestor((DependencyObject)e.OriginalSource);
59 | }
60 |
61 | private void OnPreviewMouseMove(object sender, MouseEventArgs e)
62 | {
63 | if (e.LeftButton == MouseButtonState.Pressed && this.dragPoint.HasValue && this.dragItem != null)
64 | {
65 | var vector = this.dragPoint.Value - e.GetPosition(null);
66 | if (Math.Abs(vector.X) > SystemParameters.MinimumHorizontalDragDistance || Math.Abs(vector.Y) > SystemParameters.MinimumVerticalDragDistance)
67 | {
68 | var rdvm = this.dragItem.DataContext as ReferenceDescriptionViewModel;
69 | if (rdvm != null)
70 | {
71 | var vm = this.DataContext as UaBrowserViewModel;
72 | var text = vm.GetSnippet(rdvm);
73 | if (!string.IsNullOrEmpty(text))
74 | {
75 | DataObject data = new DataObject(System.Windows.DataFormats.Text, text);
76 | DragDrop.DoDragDrop(this.dragItem, data, DragDropEffects.Copy);
77 | this.dragItem = null;
78 | this.dragPoint = null;
79 | }
80 | }
81 | }
82 | }
83 | }
84 |
85 | private void MainGrid_TargetUpdated(object sender, System.Windows.Data.DataTransferEventArgs e)
86 | {
87 | var grid = (Grid)e.TargetObject;
88 | var b = (bool?)grid.Tag;
89 | if (b == true)
90 | {
91 | VisualStateManager.GoToElementState(grid, "IsLoading", true);
92 | }
93 | else
94 | {
95 | VisualStateManager.GoToElementState(grid, "Ready", true);
96 | }
97 | }
98 |
99 | private void Refresh_CanExecute(object sender, CanExecuteRoutedEventArgs e)
100 | {
101 | e.CanExecute = true;
102 | }
103 |
104 | private async void Refresh_Executed(object sender, ExecutedRoutedEventArgs e)
105 | {
106 | var vm = (UaBrowserViewModel)this.DataContext;
107 | await vm.RefreshAsync(e.Parameter as string, this.UserNameBox.Text, this.PasswordBox.Password);
108 |
109 | }
110 |
111 | }
112 | }
--------------------------------------------------------------------------------
/UaBrowser/UaBrowserPackage.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using Microsoft.VisualStudio.Shell;
5 | using Microsoft.VisualStudio.Shell.Interop;
6 | using System;
7 | using System.ComponentModel.Design;
8 | using System.Runtime.InteropServices;
9 |
10 | namespace Workstation.UaBrowser
11 | {
12 | ///
13 | /// This is the class that implements the package exposed by this assembly.
14 | ///
15 | // This attribute tells the PkgDef creation utility (CreatePkgDef.exe) that this class is
16 | // a package.
17 | [PackageRegistration(UseManagedResourcesOnly = true)]
18 |
19 | // This attribute is used to register the information needed to show this package
20 | // in the Help/About dialog of Visual Studio.
21 | [InstalledProductRegistration("#110", "#112", "2.2.2", IconResourceID = 400)]
22 |
23 | // This attribute is needed to let the shell know that this package exposes some menus.
24 | [ProvideMenuResource("Menus.ctmenu", 1)]
25 |
26 | // This attribute registers a tool window exposed by this package.
27 | [ProvideToolWindow(typeof(UaBrowserWindowPane))]
28 |
29 | // This attribute registers the package directory for locating references for this package.
30 | [ProvideBindingPath]
31 | [Guid(GuidList.GuidUaBrowserPkgString)]
32 | [ProvideOptionPage(typeof(OptionsDialogPage), "OPC UA Browser", "General", 0, 0, true)]
33 | public sealed class UaBrowserPackage : Package
34 | {
35 | public UaBrowserPackage()
36 | {
37 | }
38 |
39 | ///
40 | /// Initialization of the package; this method is called right after the package is sited, so this is the place
41 | /// where you can put all the initialization code that rely on services provided by VisualStudio.
42 | ///
43 | protected override void Initialize()
44 | {
45 | base.Initialize();
46 |
47 | // Add our command handlers for menu (commands must exist in the .vsct file)
48 | OleMenuCommandService mcs = this.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
49 | if (mcs != null)
50 | {
51 | // Create the command for the tool window
52 | CommandID toolwndCommandID = new CommandID(GuidList.GuidUaBrowserCmdSet, (int)PkgCmdIDList.CmdidUaBrowser);
53 | MenuCommand menuToolWin = new MenuCommand(this.ShowToolWindow, toolwndCommandID);
54 | mcs.AddCommand(menuToolWin);
55 | }
56 | }
57 |
58 | ///
59 | /// This function is called when the user clicks the menu item that shows the
60 | /// tool window. See the Initialize method to see how the menu item is associated to
61 | /// this function using the OleMenuCommandService service and the MenuCommand class.
62 | ///
63 | private void ShowToolWindow(object sender, EventArgs e)
64 | {
65 | // Get the instance number 0 of this tool window. This window is single instance so this instance
66 | // is actually the only one.
67 | // The last flag is set to true so that if the tool window does not exists it will be created.
68 | ToolWindowPane window = this.FindToolWindow(typeof(UaBrowserWindowPane), 0, true);
69 | if ((window == null) || (window.Frame == null))
70 | {
71 | throw new NotSupportedException("Unable to create OPC UA Browser window.");
72 | }
73 |
74 | IVsWindowFrame windowFrame = (IVsWindowFrame)window.Frame;
75 | Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show());
76 | }
77 | }
78 | }
--------------------------------------------------------------------------------
/UaBrowser/UaBrowserWindowPane.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using Workstation.UaBrowser.ViewModels;
5 | using Microsoft.VisualStudio.ComponentModelHost;
6 | using Microsoft.VisualStudio.Shell;
7 | using System;
8 | using System.Runtime.InteropServices;
9 | using System.Windows;
10 |
11 | namespace Workstation.UaBrowser
12 | {
13 | ///
14 | /// This class implements the tool window exposed by this package and hosts a user control.
15 | ///
16 | [Guid(GuidList.GuidToolWindowPersistanceString)]
17 | public class UaBrowserWindowPane : ToolWindowPane
18 | {
19 | ///
20 | /// Initializes a new instance of the class.
21 | ///
22 | public UaBrowserWindowPane()
23 | : base(null)
24 | {
25 | this.Caption = "OPC UA Browser";
26 |
27 | // Set the image that will appear on the tab of the window frame
28 | // when docked with an other window
29 | // The resource ID correspond to the one defined in the resx file
30 | // while the Index is the offset in the bitmap strip. Each image in
31 | // the strip being 16x16.
32 | this.BitmapResourceID = 300;
33 | this.BitmapIndex = 0;
34 | this.Content = new UaBrowserControl();
35 | }
36 |
37 | public override void OnToolWindowCreated()
38 | {
39 | base.OnToolWindowCreated();
40 | var componentModel = (IComponentModel)this.GetService(typeof(SComponentModel));
41 | var vm = componentModel.DefaultExportProvider.GetExportedValue();
42 |
43 | var fe = this.Content as FrameworkElement;
44 | if (fe != null)
45 | {
46 | fe.DataContext = vm;
47 | }
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/UaBrowser/VSPackage.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | OPC UA Browser
122 |
123 |
124 | Tool for browsing the namespace of an OPC UA server.
125 |
126 |
127 |
128 | Resources\Images.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | Resources\robot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
--------------------------------------------------------------------------------
/UaBrowser/ViewModels/DataTypeDescriptionViewModel.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Xml.Linq;
9 | using Workstation.ServiceModel.Ua;
10 |
11 | namespace Workstation.UaBrowser.ViewModels
12 | {
13 | public class DataTypeDescriptionViewModel : ReferenceDescriptionViewModel
14 | {
15 | private ExpandedNodeId binaryEncodingId;
16 | private XElement element;
17 | private string targetNamespace;
18 | private string baseType;
19 |
20 | public DataTypeDescriptionViewModel(ReferenceDescription description, ExpandedNodeId binaryEncodingId, XElement element, string targetNamespace, ReferenceDescriptionViewModel parent, Func loadChildren)
21 | : base(description, parent, loadChildren)
22 | {
23 | this.binaryEncodingId = binaryEncodingId;
24 | this.element = element;
25 | this.targetNamespace = targetNamespace;
26 | this.baseType = parent.DisplayName;
27 | }
28 |
29 | public override string GetSnippet(string snippet, string language)
30 | {
31 | var s = new StringBuilder(snippet);
32 | s.Replace("$element$", this.element.ToString());
33 | s.Replace("$targetNamespace$", this.targetNamespace);
34 | s.Replace("$binaryEncodingId$", this.binaryEncodingId.ToString());
35 | s.Replace("$nodeId$", this.NodeId.ToString());
36 | s.Replace("$dataType$", this.DisplayName);
37 | s.Replace("$baseType$", this.baseType);
38 | s.AppendLine();
39 | return s.ToString();
40 | }
41 |
42 | }
43 | }
--------------------------------------------------------------------------------
/UaBrowser/ViewModels/DelegateCommand.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Converter Systems LLC. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Windows.Input;
6 |
7 | namespace Workstation.UaBrowser.ViewModels
8 | {
9 | ///
10 | /// Delegates the ICommand logic to the ViewModel.
11 | ///
12 | public class DelegateCommand : ICommand
13 | {
14 | private readonly Action