Example #1
0
 public GeneralPage()
 {
     _mainWindow   = WindowEx.GetCurrentFirst <MainWindow>();
     _configWindow = WindowEx.GetCurrentFirst <ConfigWindow>();
     InitializeComponent();
     ScannerViewModel = Service.Get <OsuFileScanner>().ViewModel;
 }
Example #2
0
        private void BtnAddCollection_Click(object sender, RoutedEventArgs e)
        {
            var addCollectionControl = new AddCollectionControl();

            _overlay.ShowContent(addCollectionControl, DialogOptionFactory.AddCollectionOptions, async(obj, args) =>
            {
                await using var dbContext = new ApplicationDbContext();
                await dbContext.AddCollection(addCollectionControl.CollectionName.Text);// todo: exist
                await WindowEx.GetCurrentFirst <MainWindow>().UpdateCollections();

                await RefreshList();
            });
        }
Example #3
0
        private void BtnAddCollection_Click(object sender, RoutedEventArgs e)
        {
            var addCollectionControl = new AddCollectionControl();

            _overlay.ShowContent(addCollectionControl, DialogOptionFactory.AddCollectionOptions, (obj, args) =>
            {
                if (!SafeDbOperator.TryAddCollection(addCollectionControl.CollectionName.Text))
                {
                    return;
                }

                WindowEx.GetCurrentFirst <MainWindow>().UpdateCollections();
                RefreshList();
            });
        }
Example #4
0
 public HotKeyPage()
 {
     _mainWindow = WindowEx.GetCurrentFirst <MainWindow>();
     InitializeComponent();
 }
Example #5
0
 public AboutPage()
 {
     _mainWindow   = WindowEx.GetCurrentFirst <MainWindow>();
     _configWindow = WindowEx.GetCurrentFirst <ConfigWindow>();
     InitializeComponent();
 }