40 lines
945 B
C#
40 lines
945 B
C#
using PCUT.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Http.Core;
|
|
using Http.Core.Extensions;
|
|
using static Http.Core.Constants.HttpConstants;
|
|
|
|
namespace PCUT.ViewModels
|
|
{
|
|
internal class CutDialogViewModel : NotificationBase
|
|
{
|
|
private string _printCommand;
|
|
public string PrintCommand
|
|
{
|
|
get => _printCommand;
|
|
set
|
|
{
|
|
SetProperty(ref _printCommand, value);
|
|
}
|
|
}
|
|
|
|
public async Task CutFileAsync(string fileId)
|
|
{
|
|
using (var httpClient = HttpClientFactory.CreateClient(ClientNames.ApiClient))
|
|
{
|
|
try
|
|
{
|
|
_ = await httpClient.GetAsync(Api.Cut.FormatRoute(fileId));
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|