aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-07-09 13:32:33 +0300
committerAvi Levkovich <avi@twine-s.com>2018-07-09 13:32:33 +0300
commit6b755271ed4ef5f1b1d09d96e54fe081920f4f41 (patch)
tree51f6bb96aefb3666c827d1dd06ef6d76cf81a44a /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parent042a453f826da5c8a600ab4ae8b3d611044168de (diff)
parent47396728e782e433a11768904cda94c47dc02933 (diff)
downloadTango-6b755271ed4ef5f1b1d09d96e54fe081920f4f41.tar.gz
Tango-6b755271ed4ef5f1b1d09d96e54fe081920f4f41.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.Designer.cs9
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.resx17
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt1
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs37
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj35
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs9
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/AboutViewVM.cs20
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs42
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml63
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml12
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml7
14 files changed, 289 insertions, 27 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs
index 10b05bc64..777c488d7 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs
@@ -24,6 +24,7 @@ namespace Tango.MachineStudio.UI.Console
private INotificationProvider _notificatrion;
private TextBox _txtLog;
private String _currentFile;
+ private ScriptEngine _engine;
/// <summary>
@@ -160,22 +161,24 @@ namespace Tango.MachineStudio.UI.Console
private void Stop()
{
-
+ if (_engine != null)
+ {
+ _engine.Stop();
+ }
}
private async void Run()
{
- ScriptEngine engine = new ScriptEngine(new ConsoleOnExecuteParameters(new ConsoleManager(WriteLine)));
- engine.Stop();
- engine.ReferencedAssemblies.Add(this.GetType());
- engine.ReferencedAssemblies.Add(typeof(INotificationProvider));
+ _engine = new ScriptEngine(new ConsoleOnExecuteParameters(new ConsoleManager(WriteLine)));
+ _engine.ReferencedAssemblies.Add(this.GetType());
+ _engine.ReferencedAssemblies.Add(typeof(INotificationProvider));
foreach (var module in _moduleLoader.AllModules)
{
- engine.ReferencedAssemblies.Add(module.GetType());
+ _engine.ReferencedAssemblies.Add(module.GetType());
}
- await engine.Run(Code, null);
+ await _engine.Run(Code, null);
}
private void WriteLine(String text)
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.Designer.cs
index c035ee88d..5ff36aae1 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.Designer.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.Designer.cs
@@ -59,5 +59,14 @@ namespace Tango.MachineStudio.UI.Properties {
resourceCulture = value;
}
}
+
+ /// <summary>
+ /// Looks up a localized string similar to .
+ /// </summary>
+ internal static string BuildDate {
+ get {
+ return ResourceManager.GetString("BuildDate", resourceCulture);
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.resx
index af7dbebba..32307e87f 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.resx
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/Resources.resx
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@@ -109,9 +112,13 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="BuildDate" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\BuildDate.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+ </data>
</root> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt
new file mode 100644
index 000000000..e53f275f3
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt
@@ -0,0 +1 @@
+Sun 07/08/2018 16:34:22.22
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
index 48b0fdada..fdad31251 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
@@ -43,14 +43,14 @@ namespace Tango.MachineStudio.UI.StudioApplication
_navigationManager = navigationManager;
_openedWindows = new List<Window>();
- Task.Factory.StartNew(() =>
+ Task.Factory.StartNew(() =>
{
while (MainWindow.Instance == null)
{
Thread.Sleep(100);
}
- InvokeUI(() =>
+ InvokeUI(() =>
{
MainWindow.Instance.ContentRendered += (_, __) =>
{
@@ -256,5 +256,38 @@ namespace Tango.MachineStudio.UI.StudioApplication
window.Closed += (x, y) => { _openedWindows.Remove(window); };
}
+
+ /// <summary>
+ /// Gets the core libraries version.
+ /// </summary>
+ public string CoreVersion
+ {
+ get
+ {
+ return typeof(ExtendedObject).Assembly.GetName().Version.ToString();
+ }
+ }
+
+ /// <summary>
+ /// Gets the build date.
+ /// </summary>
+ public string BuildDate
+ {
+ get
+ {
+ return Properties.Resources.BuildDate;
+ }
+ }
+
+ /// <summary>
+ /// Gets the change log.
+ /// </summary>
+ public string ChangeLog
+ {
+ get
+ {
+ return EmbeddedResourceHelper.GetEmbeddedResourceText("Tango.MachineStudio.UI.ChangeLogs.MachineStudioChangeLog.txt") + Environment.NewLine + Environment.NewLine + Environment.NewLine + EmbeddedResourceHelper.GetEmbeddedResourceText("Tango.MachineStudio.UI.ChangeLogs.CoreChangeLog.txt");
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
index f21fe0919..4d581795b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
@@ -151,6 +151,11 @@
<Compile Include="Notifications\TextInputBoxWindow.xaml.cs">
<DependentUpon>TextInputBoxWindow.xaml</DependentUpon>
</Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
<Compile Include="StudioApplication\DefaultStudioApplicationManager.cs" />
<Compile Include="Authentication\DefaultAuthenticationProvider.cs" />
<Compile Include="Navigation\DefaultNavigationManager.cs" />
@@ -163,6 +168,7 @@
<Compile Include="TFS\TeamFoundationServiceExtendedClient.cs" />
<Compile Include="TFS\TeamMembersProvider.cs" />
<Compile Include="TFS\WorkItemValidationAttribute.cs" />
+ <Compile Include="ViewModels\AboutViewVM.cs" />
<Compile Include="ViewModels\ConnectedMachineViewVM.cs" />
<Compile Include="ViewModels\LoadingViewVM.cs" />
<Compile Include="ViewModels\LoginViewVM.cs" />
@@ -176,6 +182,9 @@
<Compile Include="ViewModels\ResolvedIssuesViewVM.cs" />
<Compile Include="ViewModels\ShutdownViewVM.cs" />
<Compile Include="ViewModels\UpdateViewVM.cs" />
+ <Compile Include="Views\AboutView.xaml.cs">
+ <DependentUpon>AboutView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\ConnectedMachineView.xaml.cs">
<DependentUpon>ConnectedMachineView.xaml</DependentUpon>
</Compile>
@@ -251,6 +260,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Views\AboutView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\ConnectedMachineView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -313,20 +326,11 @@
<SubType>
</SubType>
</Compile>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- </EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
@@ -484,9 +488,20 @@
<Resource Include="Images\settings.png" />
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="..\..\Versioning\CoreChangeLog.txt">
+ <Link>ChangeLogs\CoreChangeLog.txt</Link>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\..\Versioning\MachineStudioChangeLog.txt">
+ <Link>ChangeLogs\MachineStudioChangeLog.txt</Link>
+ </EmbeddedResource>
<Content Include="Html\HTML Templates\Thread Break.html" />
+ <Resource Include="Resources\BuildDate.txt" />
<Resource Include="machine.ico" />
<Resource Include="Images\bug-resolved.png" />
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
<EmbeddedResource Include="TFS\SystemInformationTemplate.cshtml" />
<Resource Include="Images\bug.png" />
</ItemGroup>
@@ -494,6 +509,8 @@
<PropertyGroup>
<PostBuildEvent>if $(ConfigurationName) == Debug $(TargetDir)linkgen.exe -s "$(TargetPath)" -d "$(TargetDir)Utilities\Machine Studio.lnk"
+echo %25date%25 %25time%25 &gt; "$(ProjectDir)\Resources\BuildDate.txt"
+
RD /S /Q "$(TargetDir)cs\"
RD /S /Q "$(TargetDir)da\"
RD /S /Q "$(TargetDir)de\"
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
index 931130a05..8a5ce3d8b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
@@ -87,6 +87,7 @@ namespace Tango.MachineStudio.UI
TangoIOC.Default.Register<MachineLoginViewVM>();
TangoIOC.Default.Register<UpdateViewVM>();
TangoIOC.Default.Register<ConsoleWindowVM>();
+ TangoIOC.Default.Register<AboutViewVM>();
//Register View (Supervising Controller Pattern).
//if (!ViewModelBase.IsInDesignModeStatic)
@@ -167,5 +168,13 @@ namespace Tango.MachineStudio.UI
return TangoIOC.Default.GetInstance<ConsoleWindowVM>();
}
}
+
+ public AboutViewVM AboutViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<AboutViewVM>();
+ }
+ }
}
} \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/AboutViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/AboutViewVM.cs
new file mode 100644
index 000000000..5fe3b06b8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/AboutViewVM.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.MachineStudio.Common.StudioApplication;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.UI.ViewModels
+{
+ public class AboutViewVM : DialogViewVM
+ {
+ public IStudioApplicationManager ApplicationManager { get; set; }
+
+ public AboutViewVM(IStudioApplicationManager applicationManager)
+ {
+ ApplicationManager = applicationManager;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs
index 9f84cfb53..76e138e0e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs
@@ -13,6 +13,13 @@ namespace Tango.MachineStudio.UI.ViewModels
{
public class ConnectedMachineViewVM : DialogViewVM
{
+ public enum ConnectedMachineVMResult
+ {
+ Cancel,
+ Disconnect,
+ UploadHardwareConfig,
+ }
+
private IStudioApplicationManager _applicationManager;
public IStudioApplicationManager ApplicationManager
{
@@ -20,16 +27,28 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _applicationManager = value; RaisePropertyChangedAuto(); }
}
+ public ConnectedMachineVMResult Result { get; set; }
+
public RelayCommand DisconnectCommand { get; set; }
+ public RelayCommand UploadHardwareConfigurationCommand { get; set; }
+
public ConnectedMachineViewVM(IStudioApplicationManager application)
{
ApplicationManager = application;
DisconnectCommand = new RelayCommand(Disconnect);
+ UploadHardwareConfigurationCommand = new RelayCommand(UploadHardwareConfiguration);
+ }
+
+ private void UploadHardwareConfiguration()
+ {
+ Result = ConnectedMachineVMResult.UploadHardwareConfig;
+ Accept();
}
private void Disconnect()
{
+ Result = ConnectedMachineVMResult.Disconnect;
Accept();
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
index aa0eedefb..8eaa1f360 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -159,6 +159,11 @@ namespace Tango.MachineStudio.UI.ViewModels
/// </summary>
public RelayCommand OpenDeveloperConsoleCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the about command.
+ /// </summary>
+ public RelayCommand AboutCommand { get; set; }
+
private IAuthenticationProvider _authenticationProvider;
/// <summary>
/// Gets or sets the authentication provider.
@@ -319,6 +324,8 @@ namespace Tango.MachineStudio.UI.ViewModels
OpenDeveloperConsoleCommand = new RelayCommand(OpenDeveloperConsole);
TangoMessenger.Default.Register<Messages.ForcedUpdateMessage>((x) => DisableCheckForUpdates = true);
+
+ AboutCommand = new RelayCommand(ShowAboutDialog);
}
private void MachineEventsStateProvider_EventsResolved(object sender, IEnumerable<MachinesEvent> e)
@@ -502,9 +509,32 @@ namespace Tango.MachineStudio.UI.ViewModels
}
else
{
- _notificationProvider.ShowModalDialog<ConnectedMachineViewVM>((x) =>
+ _notificationProvider.ShowModalDialog<ConnectedMachineViewVM>(async (x) =>
{
- DisconnectFromMachine();
+ if (x.Result == ConnectedMachineViewVM.ConnectedMachineVMResult.Disconnect)
+ {
+ DisconnectFromMachine();
+ }
+ else if (x.Result == ConnectedMachineViewVM.ConnectedMachineVMResult.UploadHardwareConfig)
+ {
+ if (NotificationProvider.ShowQuestion("This will reset the machine hardware configuration to the database configuration. Are you sure?"))
+ {
+ using (NotificationProvider.PushTaskItem("Uploading hardware configuration..."))
+ {
+ try
+ {
+ var configuration = ApplicationManager.ConnectedMachine.Machine.Configuration;
+ await ApplicationManager.ConnectedMachine.UploadHardwareConfiguration(configuration.HardwareVersion, configuration);
+ NotificationProvider.ShowInfo("Hardware configuration uploaded successfully.");
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error upload hardware configuration.");
+ NotificationProvider.ShowError("Error upload hardware configuration." + Environment.NewLine + ex.Message);
+ }
+ }
+ }
+ }
});
}
@@ -660,6 +690,14 @@ namespace Tango.MachineStudio.UI.ViewModels
}
}
+ /// <summary>
+ /// Shows the about dialog.
+ /// </summary>
+ private void ShowAboutDialog()
+ {
+ NotificationProvider.ShowModalDialog<AboutViewVM>((x) => { });
+ }
+
private void ReportIssue()
{
_notificationProvider.ShowModalDialog<ReportIssueViewVM, ReportIssueView>(new ReportIssueViewVM(TFSClient.Project, TFSClient.CreateBug()), async (vm) =>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
new file mode 100644
index 000000000..2ac0df9de
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
@@ -0,0 +1,63 @@
+<UserControl x:Class="Tango.MachineStudio.UI.Views.AboutView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="700" Background="White" d:DataContext="{d:DesignInstance Type=vm:AboutViewVM, IsDesignTimeCreatable=False}" DataContext="{Binding AboutViewVM, Source={StaticResource Locator}}">
+ <Grid>
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="80"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <Grid>
+ <StackPanel Orientation="Horizontal" Margin="10">
+ <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant"></Image>
+ <TextBlock Text="About" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20"></TextBlock>
+ </StackPanel>
+ </Grid>
+
+ <Grid Grid.Row="1" Margin="10 0 10 10">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="50"/>
+ </Grid.RowDefinitions>
+
+ <Grid Margin="0 10 0 0">
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top">
+ This dialog contains information about your current version of Machine Studio.
+ </TextBlock>
+
+
+
+ <controls:TableGrid RowHeight="30" Height="120" DockPanel.Dock="Top">
+ <TextBlock FontWeight="SemiBold">Machine Studio:</TextBlock>
+ <TextBlock><Run>v</Run><Run Text="{Binding ApplicationManager.Version,Mode=OneWay}"></Run></TextBlock>
+ <TextBlock FontWeight="SemiBold">Core Libraries:</TextBlock>
+ <TextBlock><Run>v</Run><Run Text="{Binding ApplicationManager.CoreVersion,Mode=OneWay}"></Run></TextBlock>
+ <TextBlock FontWeight="SemiBold">Build Date:</TextBlock>
+ <TextBlock Text="{Binding ApplicationManager.BuildDate,Mode=OneWay}"></TextBlock>
+ </controls:TableGrid>
+
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" FontWeight="SemiBold">Change Log:</TextBlock>
+ <TextBox Margin="0 5 0 0" Style="{x:Null}" IsReadOnly="True" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled" TextWrapping="Wrap" AcceptsReturn="True" Foreground="DimGray" Text="{Binding ApplicationManager.ChangeLog,Mode=OneWay}">
+
+ </TextBox>
+ </DockPanel>
+ </DockPanel>
+ </Grid>
+
+ <Grid Grid.Row="1">
+ <Button HorizontalAlignment="Right" Width="140" Command="{Binding OKCommand}">CLOSE</Button>
+ </Grid>
+ </Grid>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml.cs
new file mode 100644
index 000000000..79a7f3e2c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.UI.Views
+{
+ /// <summary>
+ /// Interaction logic for AboutView.xaml
+ /// </summary>
+ public partial class AboutView : UserControl
+ {
+ public AboutView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
index 45f1c9b26..a4f253de3 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
@@ -40,7 +40,7 @@
</DataTemplate>
</ContentControl.Resources>
</ContentControl>
-
+
<TextBlock Text="Machine Connection" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20"></TextBlock>
</StackPanel>
</Grid>
@@ -116,7 +116,15 @@
</Grid>
<Grid Grid.Row="1">
- <Button HorizontalAlignment="Right" Width="140" Command="{Binding DisconnectCommand}">DISCONNECT</Button>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Height="40" VerticalAlignment="Bottom">
+ <Button Height="Auto" Command="{Binding UploadHardwareConfigurationCommand}" ToolTip="Upload the current hardware configuration stored for this machine">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock VerticalAlignment="Center">UPLOAD HW CONFIG</TextBlock>
+ <materialDesign:PackIcon Margin="10 0 0 0" Width="16" Height="16" VerticalAlignment="Center" Kind="ArrowRightBold"/>
+ </StackPanel>
+ </Button>
+ <Button Height="Auto" Width="140" Command="{Binding DisconnectCommand}" Margin="10 0 0 0">DISCONNECT</Button>
+ </StackPanel>
</Grid>
</Grid>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
index 8417c70c8..e36a03ffe 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -202,6 +202,13 @@
</Button>
<Separator/>
</StackPanel>
+ <Button Command="{Binding AboutCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Information" Width="24" Height="24" />
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">About</TextBlock>
+ </StackPanel>
+ </Button>
+ <Separator/>
<Button Command="{Binding ExitCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="CloseCircleOutline" Width="24" Height="24" />