コード例 #1
0
        private void SaveOptionsToFile()
        {
            MainFormOptions options = new MainFormOptions();

            options.ShouldAutoClose = chkAutoClose.IsChecked.Value;

            UtilityCore.SaveOptions(options, FILE);
        }
コード例 #2
0
        private void SaveToFile()
        {
            AsteroidFieldOptions options = new AsteroidFieldOptions();

            options.NumStaringObjects  = this.NumStartingObjects;
            options.OctreeShowLines    = this.OctreeShowLines;
            options.OctreeCentersDrift = this.OctreeCentersDrift;
            options.ShowStars          = this.ShowStars;

            UtilityCore.SaveOptions(options, FILE);
        }
コード例 #3
0
        private void Window_Closed(object sender, EventArgs e)
        {
            try
            {
                HopfieldNetworkOptions options = new HopfieldNetworkOptions()
                {
                    ImageFolders = _imageFolders.ToArray(),
                };

                UtilityCore.SaveOptions(options, FILE);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), this.Title, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }