add background worker to radflyoutbase
This commit is contained in:
@@ -14,6 +14,7 @@ public partial class RadFlyoutBase : UserControl
|
||||
protected TableLayoutPanel tableLayoutPanel_ActionPanel;
|
||||
protected TableLayoutPanel tableLayoutPanel_TitlePanel;
|
||||
protected RadLabel radLabel_Title;
|
||||
protected BackgroundWorker bgWorker_LoadData;
|
||||
|
||||
public static RadSvgImage? CancelSvg { get; set; } = null;
|
||||
public static RadSvgImage? ConfirmSvg { get; set; } = null;
|
||||
@@ -113,6 +114,31 @@ public partial class RadFlyoutBase : UserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
ParentChanged += FlyoutDialogBase_ParentChanged;
|
||||
bgWorker_LoadData.DoWork += BgWorker_LoadData_DoWork;
|
||||
bgWorker_LoadData.RunWorkerCompleted += BgWorker_LoadData_RunWorkerCompleted;
|
||||
}
|
||||
|
||||
protected virtual void BgWorker_LoadData_DoWork(object? sender, DoWorkEventArgs e)
|
||||
{
|
||||
OnLoadData(e);
|
||||
}
|
||||
|
||||
protected virtual void BgWorker_LoadData_RunWorkerCompleted(object? sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
OnLoadDataCompleted(e);
|
||||
}
|
||||
|
||||
protected virtual void LoadData()
|
||||
{
|
||||
bgWorker_LoadData.RunWorkerAsync();
|
||||
}
|
||||
|
||||
protected virtual void OnLoadData(DoWorkEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnLoadDataCompleted(RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>2.12.4</Version>
|
||||
<Version>2.13.0</Version>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user