diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-02-17 01:49:32 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-02-17 01:49:32 +0200 |
| commit | da39ba78af62aa19f40d755d870dbfe321fbde2e (patch) | |
| tree | ff95e65169635234ce10cdcf0c44b3f801ea17c5 /Software/Visual_Studio/PPC | |
| parent | e2a5664b9425953e33b39c21dab8d5c24adfa78f (diff) | |
| parent | 5f3cb9b25e937a0e9a4a3102cd26e6e3b94e5dfa (diff) | |
| download | Tango-da39ba78af62aa19f40d755d870dbfe321fbde2e.tar.gz Tango-da39ba78af62aa19f40d755d870dbfe321fbde2e.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC')
34 files changed, 771 insertions, 43 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs index 5f0b35ce2..f07ba39a9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs @@ -41,6 +41,11 @@ namespace Tango.PPC.Common.Application event EventHandler SetupRequired; /// <summary> + /// Occurs when a system restart is required. + /// </summary> + event EventHandler SystemRestartRequired; + + /// <summary> /// Occurs when the application has encountered an error when initializing. /// </summary> event EventHandler<Exception> ApplicationInitializationError; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/WiFiNetwork.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/WiFiNetwork.cs index 766e25e40..46a1e2355 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/WiFiNetwork.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/WiFiNetwork.cs @@ -86,14 +86,14 @@ namespace Tango.PPC.Common.Connectivity return new WiFiAuthentication(new AuthRequest(AccessPoint)); } - public Task<bool> Connect(WiFiAuthentication request) + public Task<bool> Connect(WiFiAuthentication request, bool overwriteProfile) { return Task.Factory.StartNew<bool>(() => { try { Connecting = true; - return AccessPoint.Connect(request.AuthRequest, false); + return AccessPoint.Connect(request.AuthRequest, overwriteProfile); } catch (Exception) { @@ -126,5 +126,20 @@ namespace Tango.PPC.Common.Connectivity } }); } + + public Task Forget() + { + return Task.Factory.StartNew(() => + { + try + { + AccessPoint.DeleteProfile(); + } + catch + { + + } + }); + } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Navigation/NavigationView.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Navigation/NavigationView.cs index ac02422c0..e3129b970 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Navigation/NavigationView.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Navigation/NavigationView.cs @@ -21,5 +21,6 @@ namespace Tango.PPC.Common.Navigation ExternalBridgeView, HomeModule, ShutdownView, + RestartingSystemView } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs index a073c1c5e..75e8d40dc 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs @@ -10,6 +10,7 @@ using Tango.PPC.Common.Scripting; namespace Tango.PPC.Common.OS { using System.Collections.ObjectModel; + using System.Diagnostics; using Tango.Core; using SLID = Guid; //SLID id declaration as typedef GUID SLID; in slpublic.h @@ -124,5 +125,14 @@ namespace Tango.PPC.Common.OS CmdCommand cmd = new CmdCommand("tzutil", $"/s \"{timeZone.Id}\""); await cmd.Run(); } + + /// <summary> + /// Restarts the system. + /// </summary> + /// <returns></returns> + public void Restart() + { + Process.Start("shutdown.exe", "-r -t 0"); + } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs index d7898d174..0cdf85927 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs @@ -43,5 +43,11 @@ namespace Tango.PPC.Common.OS /// <param name="timeZone">The time zone.</param> /// <returns></returns> Task ChangeTimeZone(TimeZoneInfo timeZone); + + /// <summary> + /// Restarts the system. + /// </summary> + /// <returns></returns> + void Restart(); } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index 266bef3eb..05cd998e6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -43,6 +43,7 @@ <converters:GreaterThanToBooleanConverter x:Key="GreaterThanToBooleanConverter" /> <converters:ByteArrayToFileSizeConverter x:Key="ByteArrayToFileSizeConverter" /> <converters:EnumToVisibilityConverter x:Key="EnumToVisibilityConverter" /> + <converters:EnumToBooleanConverter x:Key="EnumToBooleanConverter" /> <converters:DateTimeUTCToStringConverter x:Key="DateTimeUTCToStringConverter" /> <converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter" /> <converters:IsNullToVisibilityConverter x:Key="IsNullToVisibilityConverter" /> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj index 1b51876d7..124e6e276 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj @@ -193,6 +193,8 @@ <Compile Include="Update\PPCUpdateService.cs" /> <Compile Include="UWF\DefaultUnifiedWriteFilterManager.cs" /> <Compile Include="UWF\IUnifiedWriteFilterManager.cs" /> + <Compile Include="WatchDog\WatchDogClient.cs" /> + <Compile Include="WatchDog\WatchDogServer.cs" /> <Page Include="Connectivity\AvailableWiFiConnectionsControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -353,7 +355,7 @@ </Target> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/WatchDog/WatchDogClient.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/WatchDog/WatchDogClient.cs new file mode 100644 index 000000000..47a24ea85 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/WatchDog/WatchDogClient.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.PPC.Common.WatchDog +{ + public class WatchDogClient + { + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/WatchDog/WatchDogServer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/WatchDog/WatchDogServer.cs new file mode 100644 index 000000000..77bca2e30 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/WatchDog/WatchDogServer.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Pipes; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Tango.PPC.Common.WatchDog +{ + public class WatchDogServer + { + private NamedPipeServerStream _server; + private Thread _thread; + + public bool IsStarted { get; private set; } + + public void Start() + { + _thread = new Thread(ThreadMethod); + _thread.IsBackground = true; + _thread.Start(); + } + + private void ThreadMethod() + { + IsStarted = true; + + try + { + _server = new NamedPipeServerStream("Tango_Watch_Dog_Pipe"); + _server.WaitForConnection(); + StreamReader reader = new StreamReader(_server); + StreamWriter writer = new StreamWriter(_server); + + while (IsStarted) + { + var line = reader.ReadLine(); + writer.WriteLine(line); + writer.Flush(); + } + } + catch + { + IsStarted = false; + } + } + + public void Stop() + { + _server.Dispose(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs index a05e66f10..5fc7f00df 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs @@ -224,7 +224,14 @@ namespace Tango.PPC.UI.Connectivity if (vm.DialogResult) { - result = await network.Connect(auth); + result = await network.Connect(auth, true); + + if (!result) + { + await _notification.ShowError("Could not connect to the specified network. Please check your password."); + await network.Forget(); + } + await RefreshAvailableWiFiNetworks(); } else @@ -234,7 +241,7 @@ namespace Tango.PPC.UI.Connectivity } else { - result = await network.Connect(auth); + result = await network.Connect(auth, false); await RefreshAvailableWiFiNetworks(); } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index 2929908cc..39ce8cd30 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -46,6 +46,11 @@ namespace Tango.PPC.UI.PPCApplication private INotificationProvider _notificationProvider; /// <summary> + /// Occurs when a system restart is required. + /// </summary> + public event EventHandler SystemRestartRequired; + + /// <summary> /// Occurs when the application has started. /// </summary> public event EventHandler ApplicationStarted; @@ -141,6 +146,7 @@ namespace Tango.PPC.UI.PPCApplication PPCSettings settings = null; bool initialized = false; + bool isAfterSetup = false; await Task.Factory.StartNew(() => { @@ -163,8 +169,21 @@ namespace Tango.PPC.UI.PPCApplication if (App.StartupArgs.Contains("-update_ok")) { LogManager.Log("Application started with '-update_ok' startup arguments. The application has been successfully updated."); + + if (settings.ApplicationState == ApplicationStates.PreSetup) + { + isAfterSetup = true; + LogManager.Log("System restart is required."); + } + settings.ApplicationState = ApplicationStates.Ready; settings.Save(); + + if (isAfterSetup) + { + SystemRestartRequired?.Invoke(this, new EventArgs()); + return; + } } if (settings.ApplicationState == ApplicationStates.Ready) diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 17598c085..f40bfa7de 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -144,6 +144,7 @@ <Compile Include="ViewModels\MainViewVM.cs" /> <Compile Include="ViewModels\MachineUpdateViewVM.cs" /> <Compile Include="ViewModels\NoPermissionsViewVM.cs" /> + <Compile Include="ViewModels\RestartingSystemViewVM.cs" /> <Compile Include="ViewsContracts\ILayoutView.cs" /> <Compile Include="ViewsContracts\IMachineSetupView.cs" /> <Compile Include="ViewsContracts\IMachineUpdateView.cs" /> @@ -174,6 +175,9 @@ <Compile Include="Views\NoPermissionsView.xaml.cs"> <DependentUpon>NoPermissionsView.xaml</DependentUpon> </Compile> + <Compile Include="Views\RestartingSystemView.xaml.cs"> + <DependentUpon>RestartingSystemView.xaml</DependentUpon> + </Compile> <Page Include="Connectivity\WiFiAuthenticationView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -242,6 +246,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Views\RestartingSystemView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index 444fd70b9..4eb5475f0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -102,6 +102,7 @@ namespace Tango.PPC.UI TangoIOC.Default.Register<MachineUpdateViewVM>(); TangoIOC.Default.Register<LoadingErrorViewVM>(); TangoIOC.Default.Register<NoPermissionsViewVM>(); + TangoIOC.Default.Register<RestartingSystemViewVM>(); TangoIOC.Default.GetInstance<IPPCApplicationManager>().ContentRendered += (_, __) => @@ -191,5 +192,13 @@ namespace Tango.PPC.UI return TangoIOC.Default.GetInstance<NoPermissionsViewVM>(); } } + + public static RestartingSystemViewVM RestartingSystemViewVM + { + get + { + return TangoIOC.Default.GetInstance<RestartingSystemViewVM>(); + } + } } }
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/RestartingSystemViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/RestartingSystemViewVM.cs new file mode 100644 index 000000000..b1cb57fce --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/RestartingSystemViewVM.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Common; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Navigation; +using Tango.PPC.Common.OS; + +namespace Tango.PPC.UI.ViewModels +{ + public class RestartingSystemViewVM : PPCViewModel + { + private IOperationSystemManager _os; + private INavigationManager _navigationManager; + + public RestartingSystemViewVM(IPPCApplicationManager applicationManager, IOperationSystemManager operationSystemManager, INavigationManager navigationManager) + { + _navigationManager = navigationManager; + _os = operationSystemManager; + applicationManager.SystemRestartRequired += ApplicationManager_SystemRestartRequired; + } + + private void ApplicationManager_SystemRestartRequired(object sender, EventArgs e) + { + InvokeUI(() => + { + _navigationManager.NavigateTo(NavigationView.RestartingSystemView); + }); + } + + public async override void OnNavigatedTo() + { + base.OnNavigatedTo(); + await Task.Delay(2000); + _os.Restart(); + } + + public override void OnApplicationStarted() + { + + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml index 30b99dbbf..9437caac9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml @@ -65,7 +65,7 @@ <TextBlock DockPanel.Dock="Top" Margin="20 0" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center"> Checking internet connection, please wait... </TextBlock> - <touch:TouchBusyIndicator Width="250" Margin="0 100 0 0" Height="250" IsIndeterminate="{Binding CurrentView,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='WiFiTestView'}" /> + <touch:TouchBusyIndicator Width="250" Margin="0 100 0 0" Height="250" IsIndeterminate="{Binding CurrentView,Converter={StaticResource EnumToBooleanConverter},ConverterParameter='WiFiTestView'}" /> </StackPanel> </Grid> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml index 6d1bde59d..c6e3fa6ea 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml @@ -89,6 +89,7 @@ <local:ExternalBridgeView></local:ExternalBridgeView> <local:MachineSetupView></local:MachineSetupView> <local:MachineUpdateView></local:MachineUpdateView> + <local:RestartingSystemView></local:RestartingSystemView> </controls:NavigationControl> </touch:TouchPanel> </Grid> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml new file mode 100644 index 000000000..996b1788d --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml @@ -0,0 +1,27 @@ +<UserControl x:Class="Tango.PPC.UI.Views.RestartingSystemView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.PPC.UI.Views" + mc:Ignorable="d" + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:RestartingSystemViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.RestartingSystemViewVM}" Background="{StaticResource TangoPrimaryBackgroundBrush}"> + <Grid> + + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> + <touch:TouchBusyIndicator Width="350" Height="350" IsIndeterminate="{Binding IsVisible}" Foreground="{StaticResource TangoGrayBrush}" /> + <TextBlock Margin="0 40 0 0" TextAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoGrayTextBrush}"> + <Run> + Setup completed. + </Run> + <LineBreak/> + <Run> + Restarting the system for the last time... + </Run> + </TextBlock> + </StackPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml.cs new file mode 100644 index 000000000..1b426192e --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.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.PPC.UI.Views +{ + /// <summary> + /// Interaction logic for RestartingSystemView.xaml + /// </summary> + public partial class RestartingSystemView : UserControl + { + public RestartingSystemView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Updater/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Updater/MainWindow.xaml.cs index eb8d61a6b..ae4f22420 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Updater/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Updater/MainWindow.xaml.cs @@ -25,23 +25,17 @@ namespace Tango.PPC.Updater { private String _sourceFolder = AppDomain.CurrentDomain.BaseDirectory; private String _msProcessName = "Tango.PPC.UI"; - private String _appPath = String.Join(" ", App.StartupArgs); + private String _appPath; public MainWindow() { //Launch debugger.. -//#if DEBUG -// if (!Debugger.IsAttached) -// { -// Debugger.Launch(); -// } -//#endif - - if (!Directory.Exists(_appPath)) - { - ShowError("This update utility can only be executed by the main Tango."); - Environment.Exit(0); - } + //#if DEBUG + // if (!Debugger.IsAttached) + // { + // Debugger.Launch(); + // } + //#endif InitializeComponent(); @@ -68,43 +62,63 @@ namespace Tango.PPC.Updater private void MainWindow_ContentRendered(object sender, EventArgs e) { + Update(); + } + + private void Update() + { try { - Update(); + Init(); + EnsureTangoIsDown(); + RemoveOldDLLFiles(); + ReplaceFiles(); + + txtStatus.Text = "Update completed. Starting application..."; + DoEvents(); + Thread.Sleep(1000); + StartTango(true); } catch (Exception ex) { - Debug.WriteLine(ex.ToString()); - ShowError(ex.Message); - Process p = new Process(); - p.StartInfo.FileName = _appPath + "\\" + _msProcessName + ".exe"; - p.StartInfo.LoadUserProfile = true; - p.StartInfo.UseShellExecute = true; - p.Start(); + ShowError($"Update failed.\n{ex.Message}"); + StartTango(false); + } + finally + { Environment.Exit(0); } } - private void Update() + private void Init() { - EnsureTangoIsDown(); - RemoveOldDLLFiles(); - ReplaceFiles(); - StartTango(); - Environment.Exit(0); + try + { + _appPath = String.Join(" ", App.StartupArgs); + } + catch + { + throw new ArgumentException("Error parsing startup arguments."); + } + + if (!Directory.Exists(_appPath)) + { + throw new InvalidOperationException("This update utility can only be executed by the main Tango application."); + } } - private void StartTango() + private void StartTango(bool success) { - txtStatus.Text = "Update completed. Starting application..."; - DoEvents(); - Thread.Sleep(1000); - Process p = new Process(); p.StartInfo.FileName = _appPath + "\\" + _msProcessName + ".exe"; p.StartInfo.LoadUserProfile = true; p.StartInfo.UseShellExecute = true; - p.StartInfo.Arguments = "-update_ok"; + + if (success) + { + p.StartInfo.Arguments = "-update_ok"; + } + p.Start(); } @@ -138,7 +152,7 @@ namespace Tango.PPC.Updater prog.Value = progress++; DoEvents(); - Thread.Sleep(30); + Thread.Sleep(10); } catch (Exception ex) { @@ -198,8 +212,7 @@ namespace Tango.PPC.Updater if (tries > 10) { - ShowError("The main Tango process seems to in a frozen state. Please restart your computer and try again."); - Environment.Exit(0); + throw new IOException("The main Tango process seems to in a frozen state. Please restart your computer and try again."); } } while (appProcess != null); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.config b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.config new file mode 100644 index 000000000..731f6de6c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> + </startup> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.xaml b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.xaml new file mode 100644 index 000000000..a78cd685d --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.xaml @@ -0,0 +1,9 @@ +<Application x:Class="Tango.PPC.WatchDog.App" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.PPC.WatchDog" + StartupUri="MainWindow.xaml"> + <Application.Resources> + + </Application.Resources> +</Application> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.xaml.cs new file mode 100644 index 000000000..3e39963bd --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Tango.PPC.WatchDog +{ + /// <summary> + /// Interaction logic for App.xaml + /// </summary> + public partial class App : Application + { + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindow.xaml b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindow.xaml new file mode 100644 index 000000000..4e772e774 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindow.xaml @@ -0,0 +1,35 @@ +<Window x:Class="Tango.PPC.WatchDog.MainWindow" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:local="clr-namespace:Tango.PPC.WatchDog" + mc:Ignorable="d" + Title="Tango Watch Dog" Background="Transparent" AllowsTransparency="True" Height="250" Width="500" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="NoResize" Icon="/cat.png" + d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}"> + <Grid> + <Border Margin="10" BorderThickness="1" BorderBrush="DimGray"> + <Border.Effect> + <DropShadowEffect ShadowDepth="0" BlurRadius="10" Color="Black" /> + </Border.Effect> + <DockPanel> + <Border DockPanel.Dock="Top" BorderThickness="0 0 0 1" BorderBrush="Gainsboro" Background="#202020" Padding="10"> + <DockPanel> + <Image Source="/cat.png" Stretch="Uniform" Height="32" RenderOptions.BitmapScalingMode="Fant" /> + <TextBlock Margin="10 0 0 0" Foreground="Gainsboro" VerticalAlignment="Center">Tango Watch Dog</TextBlock> + <Button DockPanel.Dock="Right" Width="24" Height="24" HorizontalAlignment="Right" Cursor="Hand"> + <Button.Template> + <ControlTemplate TargetType="Button"> + <Image Source="/close.png" Width="12" Height="12"></Image> + </ControlTemplate> + </Button.Template> + </Button> + </DockPanel> + </Border> + <Grid Background="Gray"> + + </Grid> + </DockPanel> + </Border> + </Grid> +</Window> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindow.xaml.cs new file mode 100644 index 000000000..585fc3510 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindow.xaml.cs @@ -0,0 +1,29 @@ +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.PPC.WatchDog +{ + /// <summary> + /// Interaction logic for MainWindow.xaml + /// </summary> + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + DataContext = new MainWindowVM(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindowVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindowVM.cs new file mode 100644 index 000000000..a95a9503c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/MainWindowVM.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.PPC.WatchDog +{ + public class MainWindowVM : ViewModel + { + + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..254eb3416 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango PPC Watch Dog")] +[assembly: AssemblyVersion("1.0.2.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Resources.Designer.cs new file mode 100644 index 000000000..44abe9d05 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.PPC.WatchDog.Properties +{ + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.PPC.WatchDog.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Resources.resx b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : 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:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <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="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <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> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Settings.Designer.cs new file mode 100644 index 000000000..3bf29275f --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.PPC.WatchDog.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Settings.settings b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Tango.PPC.WatchDog.csproj b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Tango.PPC.WatchDog.csproj new file mode 100644 index 000000000..b9429e044 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/Tango.PPC.WatchDog.csproj @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{280267F5-A19E-4B96-999D-C13D293ECA45}</ProjectGuid> + <OutputType>WinExe</OutputType> + <RootNamespace>Tango.PPC.WatchDog</RootNamespace> + <AssemblyName>Tango.PPC.WatchDog</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\Build\PPC\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\..\Build\PPC\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <ApplicationDefinition Include="App.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </ApplicationDefinition> + <Page Include="MainWindow.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Compile Include="..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="App.xaml.cs"> + <DependentUpon>App.xaml</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="MainWindow.xaml.cs"> + <DependentUpon>MainWindow.xaml</DependentUpon> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="MainWindowVM.cs" /> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</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="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <Resource Include="cat.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="close.png" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj"> + <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> + <Name>Tango.SharedUI</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/cat.png b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/cat.png Binary files differnew file mode 100644 index 000000000..b5020c106 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/cat.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/close.png b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/close.png Binary files differnew file mode 100644 index 000000000..3a040a008 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.WatchDog/close.png |
