Esempio n. 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                HopfieldNetworkOptions options = UtilityCore.ReadOptions <HopfieldNetworkOptions>(FILE);

                if (options != null && options.ImageFolders != null && options.ImageFolders.Length > 0)
                {
                    foreach (string folder in options.ImageFolders)
                    {
                        if (AddFolder(folder))
                        {
                            _imageFolders.Add(folder);
                        }
                    }

                    ResetTraining();
                }
                else
                {
                    expanderFolder.IsExpanded = true;
                }

                SetInkColor();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), this.Title, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Esempio n. 2
0
        private void LoadFromFile()
        {
            AsteroidFieldOptions options = UtilityCore.ReadOptions <AsteroidFieldOptions>(FILE) ?? new AsteroidFieldOptions();

            this.NumStartingObjects = options.NumStaringObjects ?? NumberOfStartingObjects.Normal;
            this.OctreeShowLines    = options.OctreeShowLines ?? false;
            this.OctreeCentersDrift = options.OctreeCentersDrift ?? true;
            this.ShowStars          = options.ShowStars ?? true;
        }
Esempio n. 3
0
        private void LoadOptionsFromFile()
        {
            MainFormOptions options = UtilityCore.ReadOptions <MainFormOptions>(FILE) ?? new MainFormOptions();

            chkAutoClose.IsChecked = options.ShouldAutoClose ?? false;
        }