mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using Avalonia.Controls;
|
|
using Remotely.Desktop.Linux.Controls;
|
|
using Remotely.Desktop.Linux.Services;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Windows.Input;
|
|
|
|
namespace Remotely.Desktop.Linux.ViewModels
|
|
{
|
|
public class MessageBoxViewModel : ViewModelBase
|
|
{
|
|
public string Caption { get; set; }
|
|
public string Message { get; set; }
|
|
|
|
public bool IsOkButtonVisible { get; set; }
|
|
public bool AreYesNoButtonsVisible { get; set; }
|
|
|
|
public MessageBoxResult Result { get; set; } = MessageBoxResult.Cancel;
|
|
|
|
public ICommand OKCommand => new Executor((param) =>
|
|
{
|
|
Result = MessageBoxResult.OK;
|
|
(param as Window).Close();
|
|
});
|
|
public ICommand YesCommand => new Executor((param) =>
|
|
{
|
|
Result = MessageBoxResult.Yes;
|
|
(param as Window).Close();
|
|
});
|
|
public ICommand NoCommand => new Executor((param) =>
|
|
{
|
|
Result = MessageBoxResult.No;
|
|
(param as Window).Close();
|
|
});
|
|
}
|
|
}
|