Skip to content

Commit 2313ab9

Browse files
committed
feat: IPendingHandler add start time
1 parent 0626880 commit 2313ab9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Wpf.Ui.Violeta/Controls/PendingBox/IPendingHandler.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ public interface IPendingHandler : IDisposable
88

99
public event EventHandler? Cancel;
1010

11+
public DateTime StartTime { get; set; }
12+
1113
public string? Message { get; set; }
12-
public bool Cancelable { get; set; }
14+
15+
public bool IsShowCancel { get; set; }
16+
1317
public bool Canceled { get; }
1418

1519
public void Show();

src/Wpf.Ui.Violeta/Controls/PendingBox/PendingHandler.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ public class PendingHandler(PendingBoxDialog pendingBoxDialog) : IPendingHandler
1111

1212
public event EventHandler? Cancel;
1313

14+
public DateTime StartTime { get; set; } = DateTime.Now;
15+
1416
public virtual string? Message
1517
{
1618
get => Dialog.Dispatcher.Invoke(() => Dialog.Message);
1719
set => Dialog.Dispatcher.Invoke(() => Dialog.Message = value);
1820
}
1921

20-
public virtual bool Cancelable
22+
public virtual bool IsShowCancel
2123
{
2224
get => Dialog.Dispatcher.Invoke(() => Dialog.IsShowCancel);
2325
set => Dialog.Dispatcher.Invoke(() => Dialog.IsShowCancel = value);

0 commit comments

Comments
 (0)