private void ConfigExecute() { timer.Stop(); var config = new Config(timer.Interval.Milliseconds) { Possibility = Simulator.Possibility, Frequency = Simulator.Frequency, MinMemory = generator.MinMemory, MaxMemory = generator.MaxMemory, MinCpu = generator.MinCpu, MaxCpu = generator.MaxCpu, MinTime = generator.MinTime, MaxTime = generator.MaxTime }; if (config.ShowDialog() == true) { generator.Config(config.MinMemory, config.MaxMemory, config.MinCpu, config.MaxCpu, config.MinTime, config.MaxTime); Simulator.Frequency = config.Frequency; Simulator.Possibility = config.Possibility; timer.Interval = new TimeSpan(0, 0, 0, 0, config.RefreshTime); } timer.Start(); }