prefix Telerik-based type names with "Rad"
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
public class DialogClosedEventArgs : EventArgs
|
||||
{
|
||||
public DialogBase Parent { get; private set; }
|
||||
public FlyoutBase? Content => Parent?.DialogPanel;
|
||||
public RadDialogBase Parent { get; private set; }
|
||||
public RadFlyoutBase? Content => Parent?.DialogPanel;
|
||||
|
||||
public DialogClosedEventArgs(DialogBase dialog)
|
||||
public DialogClosedEventArgs(RadDialogBase dialog)
|
||||
{
|
||||
Parent = dialog;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
public class DialogLoadingEventArgs : EventArgs
|
||||
{
|
||||
public DialogBase Parent { get; private set; }
|
||||
public FlyoutBase? Content => Parent?.DialogPanel;
|
||||
public RadDialogBase Parent { get; private set; }
|
||||
public RadFlyoutBase? Content => Parent?.DialogPanel;
|
||||
|
||||
public DialogLoadingEventArgs(DialogBase dialog)
|
||||
public DialogLoadingEventArgs(RadDialogBase dialog)
|
||||
{
|
||||
Parent = dialog;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
public class FlyoutClosedEventArgs : global::Telerik.WinControls.UI.SplashScreen.FlyoutClosedEventArgs
|
||||
{
|
||||
public new FlyoutBase? Content => base.Content as FlyoutBase;
|
||||
public new RadFlyoutBase? Content => base.Content as RadFlyoutBase;
|
||||
|
||||
public FlyoutClosedEventArgs(FlyoutBase content) : base(content)
|
||||
public FlyoutClosedEventArgs(RadFlyoutBase content) : base(content)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ namespace Pilz.UI.Telerik.Dialogs;
|
||||
|
||||
public class FlyoutCreatedEventArgs : ContentCreatedEventArgs
|
||||
{
|
||||
public new FlyoutBase? Content => base.Content as FlyoutBase;
|
||||
public new RadFlyoutBase? Content => base.Content as RadFlyoutBase;
|
||||
|
||||
public FlyoutCreatedEventArgs(FlyoutBase content) : base(content)
|
||||
public FlyoutCreatedEventArgs(RadFlyoutBase content) : base(content)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Pilz.UI.Telerik.Dialogs;
|
||||
|
||||
partial class DialogBase
|
||||
partial class RadDialogBase
|
||||
{
|
||||
public delegate void DialogLoadingEventHandler(DialogLoadingEventArgs e);
|
||||
public delegate void DialogClosedEventHandler(DialogClosedEventArgs e);
|
||||
@@ -8,60 +8,60 @@ partial class DialogBase
|
||||
public static event DialogLoadingEventHandler? DialogLoading;
|
||||
public static event DialogClosedEventHandler? DialogClosed;
|
||||
|
||||
public static T Show<T>(string title, Icon icon, object? tag = null) where T : FlyoutBase
|
||||
public static T Show<T>(string title, Icon icon, object? tag = null) where T : RadFlyoutBase
|
||||
{
|
||||
return Show<T>(null, title, icon, tag);
|
||||
}
|
||||
|
||||
public static T ShowDialog<T>(string title, Icon icon, object? tag = null) where T : FlyoutBase
|
||||
public static T ShowDialog<T>(string title, Icon icon, object? tag = null) where T : RadFlyoutBase
|
||||
{
|
||||
return ShowDialog<T>(null, title, icon, tag);
|
||||
}
|
||||
|
||||
public static T Show<T>(IWin32Window? parent, string title, Icon icon, object? tag = null) where T : FlyoutBase
|
||||
public static T Show<T>(IWin32Window? parent, string title, Icon icon, object? tag = null) where T : RadFlyoutBase
|
||||
{
|
||||
return Show(CreatePanelInstance<T>(tag), parent, title, icon);
|
||||
}
|
||||
|
||||
public static T ShowDialog<T>(IWin32Window? parent, string title, Icon icon, object? tag = null) where T : FlyoutBase
|
||||
public static T ShowDialog<T>(IWin32Window? parent, string title, Icon icon, object? tag = null) where T : RadFlyoutBase
|
||||
{
|
||||
return ShowDialog(CreatePanelInstance<T>(tag), parent, title, icon);
|
||||
}
|
||||
|
||||
public static T Show<T>(T dialogPanel, string title, Icon icon) where T : FlyoutBase
|
||||
public static T Show<T>(T dialogPanel, string title, Icon icon) where T : RadFlyoutBase
|
||||
{
|
||||
return Show(dialogPanel, null, title, icon);
|
||||
}
|
||||
|
||||
public static T ShowDialog<T>(T dialogPanel, string title, Icon icon) where T : FlyoutBase
|
||||
public static T ShowDialog<T>(T dialogPanel, string title, Icon icon) where T : RadFlyoutBase
|
||||
{
|
||||
return ShowDialog(dialogPanel, null, title, icon);
|
||||
}
|
||||
|
||||
public static T Show<T>(T dialogPanel, IWin32Window? parent, string title, Icon icon) where T : FlyoutBase
|
||||
public static T Show<T>(T dialogPanel, IWin32Window? parent, string title, Icon icon) where T : RadFlyoutBase
|
||||
{
|
||||
CreateForm(dialogPanel, parent, title, icon).Show();
|
||||
return dialogPanel;
|
||||
}
|
||||
|
||||
public static T ShowDialog<T>(T dialogPanel, IWin32Window? parent, string title, Icon icon) where T : FlyoutBase
|
||||
public static T ShowDialog<T>(T dialogPanel, IWin32Window? parent, string title, Icon icon) where T : RadFlyoutBase
|
||||
{
|
||||
CreateForm(dialogPanel, parent, title, icon).ShowDialog();
|
||||
return dialogPanel;
|
||||
}
|
||||
|
||||
private static T CreatePanelInstance<T>(object? tag) where T : FlyoutBase
|
||||
private static T CreatePanelInstance<T>(object? tag) where T : RadFlyoutBase
|
||||
{
|
||||
T dialogPanel = Activator.CreateInstance<T>();
|
||||
dialogPanel.Tag = tag;
|
||||
return dialogPanel;
|
||||
}
|
||||
|
||||
private static DialogBase CreateForm<T>(T dialogPanel, IWin32Window? parent, string title, Icon icon) where T : FlyoutBase
|
||||
private static RadDialogBase CreateForm<T>(T dialogPanel, IWin32Window? parent, string title, Icon icon) where T : RadFlyoutBase
|
||||
{
|
||||
dialogPanel.Dock = DockStyle.Fill;
|
||||
|
||||
var dialog = new DialogBase(dialogPanel)
|
||||
var dialog = new RadDialogBase(dialogPanel)
|
||||
{
|
||||
Text = title,
|
||||
Icon = icon,
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
namespace Pilz.UI.Telerik.Dialogs;
|
||||
|
||||
public partial class DialogBase : RadForm
|
||||
public partial class RadDialogBase : RadForm
|
||||
{
|
||||
public FlyoutBase? DialogPanel { get; private set; }
|
||||
public RadFlyoutBase? DialogPanel { get; private set; }
|
||||
|
||||
private DialogBase()
|
||||
private RadDialogBase()
|
||||
{
|
||||
Load += DialogBaseForm_Load;
|
||||
FormClosed += DialogBaseForm_FormClosed;
|
||||
}
|
||||
|
||||
public DialogBase(FlyoutBase? dialogPanel) : this()
|
||||
public RadDialogBase(RadFlyoutBase? dialogPanel) : this()
|
||||
{
|
||||
DialogPanel = dialogPanel;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Pilz.UI.Telerik.Dialogs
|
||||
{
|
||||
partial class FlyoutBase
|
||||
partial class RadFlyoutBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
@@ -28,7 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlyoutBase));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RadFlyoutBase));
|
||||
radButton_Cancel = new global::Telerik.WinControls.UI.RadButton();
|
||||
radButton_Confirm = new global::Telerik.WinControls.UI.RadButton();
|
||||
tableLayoutPanel_ActionButtons = new TableLayoutPanel();
|
||||
@@ -3,7 +3,7 @@ using Telerik.WinControls.UI.SplashScreen;
|
||||
|
||||
namespace Pilz.UI.Telerik.Dialogs;
|
||||
|
||||
partial class FlyoutBase
|
||||
partial class RadFlyoutBase
|
||||
{
|
||||
public delegate void FlyoutCreatedEventHandler(FlyoutCreatedEventArgs e);
|
||||
public delegate void FlyoutClosedEventHandler(FlyoutClosedEventArgs e);
|
||||
@@ -26,7 +26,7 @@ partial class FlyoutBase
|
||||
private static object? tagToAssign = null;
|
||||
public static Control? ParentContext { get; private set; } = null;
|
||||
|
||||
static FlyoutBase()
|
||||
static RadFlyoutBase()
|
||||
{
|
||||
RadFlyoutManager.ContentCreated += RadFlyoutManager_ContentCreated;
|
||||
RadFlyoutManager.FlyoutClosed += RadFlyoutManager_FlyoutClosed;
|
||||
@@ -34,12 +34,12 @@ partial class FlyoutBase
|
||||
|
||||
private static void RadFlyoutManager_ContentCreated(ContentCreatedEventArgs e)
|
||||
{
|
||||
if (e.Content is FlyoutBase dialogBase)
|
||||
if (e.Content is RadFlyoutBase dialogBase)
|
||||
{
|
||||
if (tagToAssign != null)
|
||||
dialogBase.Tag = tagToAssign;
|
||||
|
||||
var eventArgs = new FlyoutCreatedEventArgs((FlyoutBase)e.Content);
|
||||
var eventArgs = new FlyoutCreatedEventArgs((RadFlyoutBase)e.Content);
|
||||
|
||||
if (dialogBase is ILoadContent iLoadContent)
|
||||
iLoadContent.LoadContent();
|
||||
@@ -56,9 +56,9 @@ partial class FlyoutBase
|
||||
|
||||
private static void RadFlyoutManager_FlyoutClosed(global::Telerik.WinControls.UI.SplashScreen.FlyoutClosedEventArgs e)
|
||||
{
|
||||
if (e.Content is FlyoutBase dialogBase)
|
||||
if (e.Content is RadFlyoutBase dialogBase)
|
||||
{
|
||||
var eventArgs = new FlyoutClosedEventArgs((FlyoutBase)e.Content);
|
||||
var eventArgs = new FlyoutClosedEventArgs((RadFlyoutBase)e.Content);
|
||||
|
||||
foreach (var args in flyoutCloseHandlers)
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Pilz.UI.Telerik.Dialogs;
|
||||
|
||||
public partial class FlyoutBase : UserControl
|
||||
public partial class RadFlyoutBase : UserControl
|
||||
{
|
||||
public static RadSvgImage? CancelSvg { get; set; } = null;
|
||||
public static RadSvgImage? ConfirmSvg { get; set; } = null;
|
||||
@@ -35,7 +35,7 @@ public partial class FlyoutBase : UserControl
|
||||
set => radButton_Confirm.Enabled = value;
|
||||
}
|
||||
|
||||
protected FlyoutBase()
|
||||
protected RadFlyoutBase()
|
||||
{
|
||||
InitializeComponent();
|
||||
ParentChanged += FlyoutDialogBase_ParentChanged;
|
||||
@@ -61,7 +61,7 @@ public partial class FlyoutBase : UserControl
|
||||
{
|
||||
Result = result;
|
||||
|
||||
if (FindForm() is DialogBase dialogForm)
|
||||
if (FindForm() is RadDialogBase dialogForm)
|
||||
dialogForm.Close();
|
||||
else
|
||||
CloseFlyout();
|
||||
Reference in New Issue
Block a user