Exemple #1
0
        public MainWindow()
        {
            InitializeComponent();

            Library = LibraryDefaults.GetDefaultLibrary();

            ErrorTextBox.Text = "Default Library generated" + Library.TimeStamp;
        }
        public void InitializeOrClear()
        {
            var culture = Thread.CurrentThread.CurrentCulture;

            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); // use US culture
            var fullDefault = LibraryDefaults.GetDefaultLibrary();

            DefaultLibraries = new List <CSLibrary>();
            UserLibraries    = new List <CSLibrary>();
            DefaultLibraries.Add(fullDefault);  //add hardcoded minimum default lib
            UserLibraries.Add(new CSLibrary()); //add blank user library
            Library = new CSLibrary();
            Library.Append(fullDefault);
            Thread.CurrentThread.CurrentCulture = culture; // set it back
        }