optimize<Popup>: remove popup from welcome page

This commit is contained in:
leo 2022-10-19 15:20:58 +08:00
parent b1102ac035
commit 8520786b7e
13 changed files with 443 additions and 368 deletions

View file

@ -7,14 +7,13 @@ using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media;
using System.Xml.Linq;
namespace SourceGit.Views.Widgets {
/// <summary>
/// 新标签页
/// </summary>
public partial class Welcome : UserControl, Controls.IPopupContainer {
public partial class Welcome : UserControl {
public Welcome() {
InitializeComponent();
@ -22,20 +21,6 @@ namespace SourceGit.Views.Widgets {
Models.Theme.AddListener(this, UpdateVisibles);
}
#region POPUP_CONTAINER
public void Show(Controls.PopupWidget widget) {
popup.Show(widget);
}
public void ShowAndStart(Controls.PopupWidget widget) {
popup.ShowAndStart(widget);
}
public void UpdateProgress(string message) {
popup.UpdateProgress(message);
}
#endregion
#region FUNC_EVENTS
private void OnOpenClicked(object sender, RoutedEventArgs e) {
var dialog = new Controls.FolderDialog();
@ -60,7 +45,11 @@ namespace SourceGit.Views.Widgets {
}
private void OnCloneClicked(object sender, RoutedEventArgs e) {
if (MakeSureReady()) new Popups.Clone().Show();
if (MakeSureReady()) {
var dialog = new Clone();
dialog.Owner = App.Current.MainWindow;
dialog.ShowDialog();
}
}
private void FillSortMenu(ContextMenu menu, Models.Preference.SortMethod desired, string label) {