public SettingsForm(Settings settings) { InitializeComponent (); this.settings = settings; resolutionNumber.Value = settings.Resolution; }
public void Start(String configString, Settings settings) { try { mainForm.UpdateControlsForRender (); mainForm.SetPictureBoxImage (null); tempFileName = "temp.txt"; StreamWriter writer = new StreamWriter (tempFileName); writer.Write (configString); writer.Close (); worker = new RenderWorker (); worker.Start (renderMode, settings, tempFileName, StartRender, EndRender, Progress, Finish, SetPixel); } catch { } }
public void Start(RenderMode renderMode, Settings settings, String tempFileName, Action<int, int, int, int> startRenderCallback, Action endRenderCallback, Action<int> progressCallback, Action<int> finishedCallback, Action<int, int, double, double, double> setPixelCallback) { exitAppWhenFinished = false; this.renderMode = renderMode; this.settings = settings; this.tempFileName = tempFileName; this.startRenderCallback = startRenderCallback; this.endRenderCallback = endRenderCallback; this.progressCallback = progressCallback; this.finishedCallback = finishedCallback; this.setPixelCallback = setPixelCallback; backgroundWorker.RunWorkerAsync (); }
/// <summary> /// shows the settings window /// </summary> /// <param name="sender">not used</param> /// <param name="e">not used</param> private void buttonSettingsClick(object sender, EventArgs e) { _aSettings = new Settings(AConfiguration, APluginManager); _aSettings.ShowDialog(); }