private void button_ShowInfo_Click(object sender, System.EventArgs e) { VisionLightInfo info = new VisionLightInfo(); // collect all infos foreach (Layer layer in EditorManager.Scene.Layers) { layer.GetStaticLightInfo(info); } string s = info.ToText(); if (s == null) { return; } ShowDescriptionDlg dlg = new ShowDescriptionDlg(); dlg.Text = "Scene lighting information"; dlg.HeaderText = "Scene elements that contribute to vLux computations"; dlg.DescriptionText = s; dlg.ShowDialog(this); }
/// <summary> /// Used to handle the "ShowAgain" option when the description dialog of the scene is closed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void _OnDescriptionDialogClosed(object sender, FormClosedEventArgs e) { if (!_descriptionDialog.ShowAgain) { Settings.ShowDescriptionAtStartup = false; Dirty = true; } _descriptionDialog.FormClosed -= new FormClosedEventHandler(_OnDescriptionDialogClosed); // force making a fresh one next time _descriptionDialog = null; }
/// <summary> /// Shows the description dialog (e.g. after scene loading) /// </summary> public void ShowDescription() { Layer mainLayer = V3DLayer; // show the description dialog if (mainLayer != null && mainLayer.HasDescription) { if (_descriptionDialog == null || _descriptionDialog.IsDisposed) { _descriptionDialog = new ShowDescriptionDlg(); _descriptionDialog.FormClosed += new FormClosedEventHandler(_OnDescriptionDialogClosed); } _descriptionDialog.HeaderText = "Scene description.\nTo change the description, select the main layer and edit the description property."; _descriptionDialog.DescriptionText = mainLayer.Description; _descriptionDialog.ShowAgain = true; _descriptionDialog.Show(EditorManager.MainForm); } }
private void button_ShowInfo_Click(object sender, System.EventArgs e) { VisionLightInfo info = new VisionLightInfo(); // collect all infos foreach (Layer layer in EditorManager.Scene.Layers) layer.GetStaticLightInfo(info); string s = info.ToText(); if (s==null) return; ShowDescriptionDlg dlg = new ShowDescriptionDlg(); dlg.Text = "Scene lighting information"; dlg.HeaderText = "Scene elements that contribute to vLux computations"; dlg.DescriptionText = s; dlg.ShowDialog(this); }