Пример #1
0
        private void btn_ok_Click(object sender, RoutedEventArgs e)
        {
            StoreLocation store = new StoreLocation();

            LycuteApplication.SetLocation(tbx_Store.Content.ToString());
            store.CreateDatabase(tbx_Store.Content.ToString());
            DBHelper.ConfigDatabase();
            //alert
            Common.AlertDiag alert1 = new Common.AlertDiag();
            alert1._strAlertNote = "Location of e-book library is changed";
            alert1.ShowInTaskbar = false;
            alert1.WindowStyle   = WindowStyle.ToolWindow;
            alert1.CancelButton  = Visibility.Hidden;
            alert1.ShowDialog();

            m.loadMain(new Home());
        }
        public MainWindow()
        {
            InitializeComponent();
            StoreLocation store = new StoreLocation();

            if (!StoreLocation.IsDBConfiged())
            {
                //load config forms
                loadMain(new Setting.ConfigLocation());
            }
            else
            {
                store.CreateDatabase(LycuteOption._RootFolderDrection);
                DBHelper.ConfigDatabase();
                loadMain(_Element);
            }
        }