33 lines
No EOL
743 B
C#
33 lines
No EOL
743 B
C#
namespace NotesDataAnalyst;
|
|
|
|
public partial class LinkInputPopup : ContentPage
|
|
{
|
|
public event Action<string>? LinkSubmitted;
|
|
|
|
public LinkInputPopup()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void OnAddButtonClicked(object sender, EventArgs e)
|
|
{
|
|
string url = urlEntry.Text;
|
|
|
|
if (!string.IsNullOrEmpty(url))
|
|
{
|
|
LinkSubmitted?.Invoke(url); // Ïåðåäà÷à ââåäåííîé ññûëêè îáðàòíî
|
|
ClosePopup();
|
|
}
|
|
}
|
|
|
|
private void OnCancelButtonClicked(object sender, EventArgs e)
|
|
{
|
|
ClosePopup();
|
|
}
|
|
|
|
private void ClosePopup()
|
|
{
|
|
// Çàêðûòèå îêíà (èìèòèðóåì ïîâåäåíèå Popup)
|
|
Application.Current.MainPage.Navigation.PopModalAsync();
|
|
}
|
|
} |