Esempio n. 1
0
        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {

            _configWindow = new LibraryConfigurationWindow();
            _configWindow.ShowDialog();

        }
Esempio n. 2
0
        private void ChooseFolder(LibraryConfigurationWindow win)
        {
            using (var dialog = new CommonOpenFileDialog {
                IsFolderPicker = true
            })
            {
                CommonFileDialogResult result = dialog.ShowDialog();

                if (result == CommonFileDialogResult.Ok)
                {
                    TxtEbookFolder = dialog.FileName;
                }
            }


            win?.Activate();
        }
Esempio n. 3
0
        private void ConfigurationDone(LibraryConfigurationWindow confWin)
        {
            if (confWin.tbNewLibrary.IsEnabled)
            {
                _configurationData.DatabaseName = confWin.tbNewLibrary.Text;
                _configurationData.LibraryExits = false;
            }
            else
            {
                _configurationData.DatabaseName = confWin.cbLibraryName.SelectedItem.ToString();
                _configurationData.LibraryExits = true;
            }

            foreach (KeyValuePair <string, bool> entry in EBookFormats)
            {
                _configurationData.BookFormatsCheckStatus.Add(entry.Key, entry.Value);
            }

            MSG.Messenger.Default.Send(_configurationData);

            confWin?.Close();
        }