mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Extract organization GUID from any position in file name.
This commit is contained in:
parent
fb25461d2e
commit
e8ee742b0a
@ -67,7 +67,7 @@
|
||||
Cursor="Hand"
|
||||
ToolTip="Enter the organization ID that will have access to this device."></Run>
|
||||
</TextBlock>
|
||||
<TextBox Grid.Column="1" Grid.Row="2" TextWrapping="Wrap" Text="{Binding OrganizationName}" FontSize="14" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" TextWrapping="Wrap" Text="{Binding OrganizationID}" FontSize="14" />
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Remotely.Agent.Installer.Win.Services;
|
||||
using Remotely.Agent.Installer.Win.Services;
|
||||
using Remotely.Shared.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -193,9 +193,10 @@ namespace Remotely.Agent.Installer.Win.ViewModels
|
||||
CopyCommandLineArgs();
|
||||
|
||||
var fileName = Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location);
|
||||
if (fileName.Length > 36)
|
||||
|
||||
for (var i = 0; i < fileName.Length; i++)
|
||||
{
|
||||
var guid = fileName.Substring(fileName.Length - 36);
|
||||
var guid = string.Join("", fileName.Skip(i).Take(36));
|
||||
if (Guid.TryParse(guid, out _))
|
||||
{
|
||||
OrganizationID = guid;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user