private static void ExecuteOpenDialog(object sender, ExecutedRelayEventArgs e) { var element = e.Parameter as GLEvaluationElement; if (element == null) { throw new ArgumentNullException("element"); } try { var dialog = new GLEvaluationElementSettingDialog(element); dialog.SetCenterMouse(); // 親コントロールを取得します。 var glcontainer = element.GLContainer; var parent = (glcontainer != null ? glcontainer.ParentForm : null); // 親を指定して評価値用のダイアログを開きます。 dialog.ShowDialog(parent); } catch (Exception ex) { Util.ThrowIfFatal(ex); Log.ErrorException(ex, "評価値ダイアログの表示に失敗しました;;"); } }
private static void ExecuteOpenDialog(GLEvaluationElement element) { if (element == null) { throw new ArgumentNullException("element"); } try { var dialog = new GLEvaluationElementSettingDialog(element); dialog.SetCenterMouse(); // 親コントロールを取得します。 var glcontainer = element.GLContainer; var parent = (glcontainer != null ? glcontainer.ParentForm : null); // 親を指定して評価値用のダイアログを開きます。 dialog.ShowDialog(parent); } catch(Exception ex) { Util.ThrowIfFatal(ex); Log.ErrorException(ex, "評価値ダイアログの表示に失敗しました;;"); } }