Beispiel #1
0
        private void CustomLogicCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            browseLogicButton.Enabled = customLogicCheckBox.Checked;
            customLogicPath.Enabled   = customLogicCheckBox.Checked;

            // Reload logic options to make sure they're correct
            if (customLogicCheckBox.Checked)
            {
                // Only load logic for custom if the file exists
                if (File.Exists(customLogicPath.Text))
                {
                    shuffler.LoadOptions(customLogicPath.Text);
                }
            }
            else
            {
                shuffler.LoadOptions();
            }

            LoadOptionControls(shuffler.GetOptions());
        }
Beispiel #2
0
        public MainWindow()
        {
            InitializeComponent();

            // Initialize seed to random value
            seedField.Text = new Random().Next().ToString();

            // Create shuffler and populate logic options
            shuffler = new Shuffler();

            if (customLogicCheckBox.Checked)
            {
                shuffler.LoadOptions(customLogicPath.Text);
            }
            else
            {
                shuffler.LoadOptions();
            }

            LoadOptionControls(shuffler.GetOptions());
        }