From 402b0f438ceffa5501e9fc9e2e5f2ce20149945f Mon Sep 17 00:00:00 2001 From: seto Date: Wed, 29 Jul 2020 10:23:49 +0900 Subject: [PATCH] update --- Crystallography.Controls/CommonDialog.cs | 92 +- .../Crystal/AtomControl.Designer.cs | 171 +- .../Crystal/AtomControl.cs | 153 +- .../Crystal/AtomControl.ja.resx | 86 +- .../Crystal/AtomControl.resx | 967 ++++-- .../Crystal/AtomCoordinateTable.Designer.cs | 11 +- .../Crystal/AtomCoordinateTable.cs | 100 +- .../Crystal/CrystalControl.Designer.cs | 470 ++- .../Crystal/CrystalControl.cs | 20 +- .../Crystal/CrystalControl.ja.resx | 448 +-- .../Crystal/CrystalControl.resx | 1074 +++---- .../Crystal/SymmetryControl.Designer.cs | 487 ++-- .../Crystal/SymmetryControl.cs | 36 +- .../Crystal/SymmetryControl.resx | 1637 ++++------- .../CrystalDatabaseControl.Designer.cs | 471 +++ .../CrystalDatabase/CrystalDatabaseControl.cs | 399 +++ .../CrystalDatabaseControl.resx | 191 ++ .../FormPeriodicTable.Designer.cs | 9 +- .../FormPeriodicTable.cs | 16 +- .../FormPeriodicTable.resx | 0 .../SearchCrystalControl.Designer.cs | 769 +++++ .../CrystalDatabase/SearchCrystalControl.cs | 122 + .../SearchCrystalControl.resx} | 0 .../Crystallography.Controls.csproj | 66 +- Crystallography.Controls/DataSet.Designer.cs | 2584 +++++++++++++---- Crystallography.Controls/DataSet.cs | 146 +- Crystallography.Controls/DataSet.xsd | 41 +- .../FormElasticity.Designer.cs | 194 -- Crystallography.Controls/FormElasticity.cs | 12 - .../Numeric/NumericBox.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- Crystallography.Controls/packages.config | 12 +- Crystallography/AtomCoordination.cs | 63 - Crystallography/Atoms.cs | 295 +- Crystallography/BetheMethod.cs | 115 +- Crystallography/BondsAndPolyhedra.cs | 1 - Crystallography/ConvertCrystalData.cs | 1490 ++++------ Crystallography/Crystal.cs | 11 +- Crystallography/CrystalMinimum.cs | 502 +++- Crystallography/Crystallography.csproj | 16 +- Crystallography/ExtensionMethods.cs | 4 +- Crystallography/Matrix.cs | 99 +- Crystallography/Properties/AssemblyInfo.cs | 4 +- Crystallography/WyckoffPosition.cs | 5 +- Crystallography/packages.config | 10 +- PDIndexer/FormMain.resx | 36 +- PDIndexer/PDIndexer.csproj | 18 +- PDIndexer/packages.config | 6 +- 48 files changed, 8204 insertions(+), 5263 deletions(-) create mode 100644 Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.Designer.cs create mode 100644 Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.cs create mode 100644 Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.resx rename Crystallography.Controls/{ => CrystalDatabase}/FormPeriodicTable.Designer.cs (96%) rename Crystallography.Controls/{ => CrystalDatabase}/FormPeriodicTable.cs (93%) rename Crystallography.Controls/{ => CrystalDatabase}/FormPeriodicTable.resx (100%) create mode 100644 Crystallography.Controls/CrystalDatabase/SearchCrystalControl.Designer.cs create mode 100644 Crystallography.Controls/CrystalDatabase/SearchCrystalControl.cs rename Crystallography.Controls/{FormElasticity.resx => CrystalDatabase/SearchCrystalControl.resx} (100%) delete mode 100644 Crystallography.Controls/FormElasticity.Designer.cs delete mode 100644 Crystallography.Controls/FormElasticity.cs delete mode 100644 Crystallography/AtomCoordination.cs diff --git a/Crystallography.Controls/CommonDialog.cs b/Crystallography.Controls/CommonDialog.cs index 3d7511d..9ac9fe2 100644 --- a/Crystallography.Controls/CommonDialog.cs +++ b/Crystallography.Controls/CommonDialog.cs @@ -6,6 +6,19 @@ namespace Crystallography.Controls { public partial class CommonDialog : Form { + #region プロパティ,フィールド + + public (string Text, double Ratio) Progress + { + set + { + Text = value.Text; + var progress = (int)(progressBar.Maximum * value.Ratio); + progressBar.Value = progress < progressBar.Maximum ? progress : progressBar.Maximum ; + Application.DoEvents(); + } + } + public enum DialogModeEnum { Initialize, History, License, Hint } public DialogModeEnum DialogMode @@ -16,7 +29,6 @@ public DialogModeEnum DialogMode flowLayoutPanelSoftwareInformation.Visible = true; if (value == DialogModeEnum.Initialize) { - progressBar.Visible = true; checkBoxCloseWindow.Visible = true; @@ -56,17 +68,9 @@ public DialogModeEnum DialogMode Size = new Size(400, 200); } } - } - public CommonDialog() - { - InitializeComponent(); - } - - private string software="";// e.g., "ReciPro"  - public string Software { get => software; @@ -93,31 +97,45 @@ public string VersionAndDate public string History { get; set; } = ""; - + public string[] Hint { set { hint = value; setToolTips(); } get => hint; } private string[] hint; - public string[] Hint - { - set - { - hint = value; - setToolTips(); - } - get => hint; - } + public bool AutomaricallyClose { set => checkBoxCloseWindow.Checked = value; get => checkBoxCloseWindow.Checked; } + + private int currentHintIndex = 0; + + /// + /// License + /// + static public string License = + "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation" + + " files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy," + + " modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software" + + " is furnished to do so, subject to the following conditions:\r\n\r\n" + + "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\n" + + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES" + + " OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE " + + "LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN " + + "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."; + + + #endregion - private void setToolTips() + #region コンストラクタ、ロード、クローズ + + public CommonDialog() { - textBox.Text = hint.Length > 0 ? hint[new Random().Next(hint.Length)]: ""; + InitializeComponent(); } - - public bool AutomaricallyClose + private void CommonDialog_FormClosing(object sender, FormClosingEventArgs e) { - set => checkBoxCloseWindow.Checked = value; - get => checkBoxCloseWindow.Checked; + e.Cancel = true; + Visible = false; } - private int currentHintIndex = 0; + #endregion + + #region ボタンイベント private void buttonOK_Click(object sender, EventArgs e) { @@ -134,26 +152,8 @@ private void buttonNext_Click(object sender, EventArgs e) textBox.Text = hint[currentHintIndex]; } } + #endregion - - /// - /// License - /// - static public string License = - "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation" + - " files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy," + - " modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software" + - " is furnished to do so, subject to the following conditions:\r\n\r\n" + - "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\n" + - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES" + - " OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE " + - "LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN " + - "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."; - - private void CommonDialog_FormClosing(object sender, FormClosingEventArgs e) - { - e.Cancel = true; - Visible = false; - } + private void setToolTips() => textBox.Text = hint.Length > 0 ? hint[new Random().Next(hint.Length)] : ""; } } \ No newline at end of file diff --git a/Crystallography.Controls/Crystal/AtomControl.Designer.cs b/Crystallography.Controls/Crystal/AtomControl.Designer.cs index bad231d..a24e86d 100644 --- a/Crystallography.Controls/Crystal/AtomControl.Designer.cs +++ b/Crystallography.Controls/Crystal/AtomControl.Designer.cs @@ -96,6 +96,13 @@ private void InitializeComponent() this.numericBoxOriginShiftY = new Crystallography.Controls.NumericBox(); this.numericBoxOriginShiftX = new Crystallography.Controls.NumericBox(); this.tabPageDebyeWaller = new System.Windows.Forms.TabPage(); + this.labelDimension = new System.Windows.Forms.Label(); + this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); + this.label3 = new System.Windows.Forms.Label(); + this.radioButtonDebyeWallerTypeU = new System.Windows.Forms.RadioButton(); + this.radioButtonDebyeWallerTypeB = new System.Windows.Forms.RadioButton(); + this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); + this.label13 = new System.Windows.Forms.Label(); this.checkBoxDetailsDebyeWallerError = new System.Windows.Forms.CheckBox(); this.flowLayoutPanelAniso2 = new System.Windows.Forms.FlowLayoutPanel(); this.numericBoxB22 = new Crystallography.Controls.NumericBox(); @@ -123,6 +130,12 @@ private void InitializeComponent() this.label4 = new System.Windows.Forms.Label(); this.tabPageAppearance = new System.Windows.Forms.TabPage(); this.checkBoxShowLabel = new System.Windows.Forms.CheckBox(); + this.label10 = new System.Windows.Forms.Label(); + this.label37 = new System.Windows.Forms.Label(); + this.label38 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label35 = new System.Windows.Forms.Label(); + this.label36 = new System.Windows.Forms.Label(); this.numericBoxAlpha = new Crystallography.Controls.NumericBox(); this.numericBoxEmission = new Crystallography.Controls.NumericBox(); this.numericBoxShininess = new Crystallography.Controls.NumericBox(); @@ -130,12 +143,6 @@ private void InitializeComponent() this.numericBoxDiffusion = new Crystallography.Controls.NumericBox(); this.numericBoxAmbient = new Crystallography.Controls.NumericBox(); this.numericBoxAtomRadius = new Crystallography.Controls.NumericBox(); - this.label10 = new System.Windows.Forms.Label(); - this.label37 = new System.Windows.Forms.Label(); - this.label38 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.label35 = new System.Windows.Forms.Label(); - this.label36 = new System.Windows.Forms.Label(); this.colorControlAtomColor = new Crystallography.Controls.ColorControl(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.buttonChangeToSameElement = new System.Windows.Forms.Button(); @@ -169,6 +176,8 @@ private void InitializeComponent() this.tabPageOriginShift.SuspendLayout(); this.flowLayoutPanel3.SuspendLayout(); this.tabPageDebyeWaller.SuspendLayout(); + this.flowLayoutPanel5.SuspendLayout(); + this.flowLayoutPanel4.SuspendLayout(); this.flowLayoutPanelAniso2.SuspendLayout(); this.flowLayoutPanelAniso1.SuspendLayout(); this.tabPageScatteringFactor.SuspendLayout(); @@ -520,6 +529,7 @@ private void InitializeComponent() // numericBoxOccerr // this.numericBoxOccerr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxOccerr.DecimalPlaces = 6; resources.ApplyResources(this.numericBoxOccerr, "numericBoxOccerr"); this.numericBoxOccerr.FooterBackColor = System.Drawing.SystemColors.Control; this.numericBoxOccerr.HeaderBackColor = System.Drawing.SystemColors.Control; @@ -528,11 +538,13 @@ private void InitializeComponent() this.numericBoxOccerr.SmartIncrement = true; this.numericBoxOccerr.TextFont = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.numericBoxOccerr.ThonsandsSeparator = true; + this.numericBoxOccerr.TrimEndZero = true; // // numericBoxOcc // resources.ApplyResources(this.numericBoxOcc, "numericBoxOcc"); this.numericBoxOcc.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxOcc.DecimalPlaces = 6; this.numericBoxOcc.FooterBackColor = System.Drawing.SystemColors.Control; this.numericBoxOcc.HeaderBackColor = System.Drawing.SystemColors.Control; this.numericBoxOcc.Name = "numericBoxOcc"; @@ -541,11 +553,13 @@ private void InitializeComponent() this.numericBoxOcc.SmartIncrement = true; this.numericBoxOcc.TextFont = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.numericBoxOcc.ThonsandsSeparator = true; + this.numericBoxOcc.TrimEndZero = true; // // numericBoxZ // resources.ApplyResources(this.numericBoxZ, "numericBoxZ"); this.numericBoxZ.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxZ.DecimalPlaces = 6; this.numericBoxZ.FooterBackColor = System.Drawing.SystemColors.Control; this.numericBoxZ.HeaderBackColor = System.Drawing.SystemColors.Control; this.numericBoxZ.Name = "numericBoxZ"; @@ -554,10 +568,12 @@ private void InitializeComponent() this.numericBoxZ.SmartIncrement = true; this.numericBoxZ.TextFont = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.numericBoxZ.ThonsandsSeparator = true; + this.numericBoxZ.TrimEndZero = true; // // numericBoxYerr // this.numericBoxYerr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxYerr.DecimalPlaces = 6; resources.ApplyResources(this.numericBoxYerr, "numericBoxYerr"); this.numericBoxYerr.FooterBackColor = System.Drawing.SystemColors.Control; this.numericBoxYerr.HeaderBackColor = System.Drawing.SystemColors.Control; @@ -566,10 +582,12 @@ private void InitializeComponent() this.numericBoxYerr.SmartIncrement = true; this.numericBoxYerr.TextFont = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.numericBoxYerr.ThonsandsSeparator = true; + this.numericBoxYerr.TrimEndZero = true; // // numericBoxXerr // this.numericBoxXerr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxXerr.DecimalPlaces = 6; resources.ApplyResources(this.numericBoxXerr, "numericBoxXerr"); this.numericBoxXerr.FooterBackColor = System.Drawing.SystemColors.Control; this.numericBoxXerr.HeaderBackColor = System.Drawing.SystemColors.Control; @@ -578,11 +596,13 @@ private void InitializeComponent() this.numericBoxXerr.SmartIncrement = true; this.numericBoxXerr.TextFont = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.numericBoxXerr.ThonsandsSeparator = true; + this.numericBoxXerr.TrimEndZero = true; // // numericBoxY // resources.ApplyResources(this.numericBoxY, "numericBoxY"); this.numericBoxY.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxY.DecimalPlaces = 6; this.numericBoxY.FooterBackColor = System.Drawing.SystemColors.Control; this.numericBoxY.HeaderBackColor = System.Drawing.SystemColors.Control; this.numericBoxY.Name = "numericBoxY"; @@ -591,11 +611,13 @@ private void InitializeComponent() this.numericBoxY.SmartIncrement = true; this.numericBoxY.TextFont = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.numericBoxY.ThonsandsSeparator = true; + this.numericBoxY.TrimEndZero = true; // // numericBoxX // resources.ApplyResources(this.numericBoxX, "numericBoxX"); this.numericBoxX.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxX.DecimalPlaces = 6; this.numericBoxX.FooterBackColor = System.Drawing.SystemColors.Control; this.numericBoxX.HeaderBackColor = System.Drawing.SystemColors.Control; this.numericBoxX.Name = "numericBoxX"; @@ -604,10 +626,12 @@ private void InitializeComponent() this.numericBoxX.SmartIncrement = true; this.numericBoxX.TextFont = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.numericBoxX.ThonsandsSeparator = true; + this.numericBoxX.TrimEndZero = true; // // numericBoxZerr // this.numericBoxZerr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxZerr.DecimalPlaces = 6; resources.ApplyResources(this.numericBoxZerr, "numericBoxZerr"); this.numericBoxZerr.FooterBackColor = System.Drawing.SystemColors.Control; this.numericBoxZerr.HeaderBackColor = System.Drawing.SystemColors.Control; @@ -616,6 +640,7 @@ private void InitializeComponent() this.numericBoxZerr.SmartIncrement = true; this.numericBoxZerr.TextFont = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.numericBoxZerr.ThonsandsSeparator = true; + this.numericBoxZerr.TrimEndZero = true; // // tabPageOriginShift // @@ -814,16 +839,61 @@ private void InitializeComponent() // tabPageDebyeWaller // this.tabPageDebyeWaller.BackColor = System.Drawing.Color.Transparent; + this.tabPageDebyeWaller.Controls.Add(this.labelDimension); + this.tabPageDebyeWaller.Controls.Add(this.flowLayoutPanelIso); + this.tabPageDebyeWaller.Controls.Add(this.flowLayoutPanel5); + this.tabPageDebyeWaller.Controls.Add(this.flowLayoutPanel4); this.tabPageDebyeWaller.Controls.Add(this.checkBoxDetailsDebyeWallerError); this.tabPageDebyeWaller.Controls.Add(this.flowLayoutPanelAniso2); this.tabPageDebyeWaller.Controls.Add(this.flowLayoutPanelAniso1); - this.tabPageDebyeWaller.Controls.Add(this.radioButtonAnisotropy); - this.tabPageDebyeWaller.Controls.Add(this.radioButtonIsotoropy); - this.tabPageDebyeWaller.Controls.Add(this.flowLayoutPanelIso); resources.ApplyResources(this.tabPageDebyeWaller, "tabPageDebyeWaller"); this.tabPageDebyeWaller.Name = "tabPageDebyeWaller"; this.toolTip.SetToolTip(this.tabPageDebyeWaller, resources.GetString("tabPageDebyeWaller.ToolTip")); // + // labelDimension + // + resources.ApplyResources(this.labelDimension, "labelDimension"); + this.labelDimension.Name = "labelDimension"; + // + // flowLayoutPanel5 + // + resources.ApplyResources(this.flowLayoutPanel5, "flowLayoutPanel5"); + this.flowLayoutPanel5.Controls.Add(this.label3); + this.flowLayoutPanel5.Controls.Add(this.radioButtonDebyeWallerTypeU); + this.flowLayoutPanel5.Controls.Add(this.radioButtonDebyeWallerTypeB); + this.flowLayoutPanel5.Name = "flowLayoutPanel5"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // radioButtonDebyeWallerTypeU + // + resources.ApplyResources(this.radioButtonDebyeWallerTypeU, "radioButtonDebyeWallerTypeU"); + this.radioButtonDebyeWallerTypeU.Name = "radioButtonDebyeWallerTypeU"; + this.radioButtonDebyeWallerTypeU.CheckedChanged += new System.EventHandler(this.radioButtonDebyeWallerTypeU_CheckedChanged); + // + // radioButtonDebyeWallerTypeB + // + resources.ApplyResources(this.radioButtonDebyeWallerTypeB, "radioButtonDebyeWallerTypeB"); + this.radioButtonDebyeWallerTypeB.Checked = true; + this.radioButtonDebyeWallerTypeB.Name = "radioButtonDebyeWallerTypeB"; + this.radioButtonDebyeWallerTypeB.TabStop = true; + // + // flowLayoutPanel4 + // + resources.ApplyResources(this.flowLayoutPanel4, "flowLayoutPanel4"); + this.flowLayoutPanel4.Controls.Add(this.label13); + this.flowLayoutPanel4.Controls.Add(this.radioButtonIsotoropy); + this.flowLayoutPanel4.Controls.Add(this.radioButtonAnisotropy); + this.flowLayoutPanel4.Name = "flowLayoutPanel4"; + // + // label13 + // + resources.ApplyResources(this.label13, "label13"); + this.label13.Name = "label13"; + // // checkBoxDetailsDebyeWallerError // resources.ApplyResources(this.checkBoxDetailsDebyeWallerError, "checkBoxDetailsDebyeWallerError"); @@ -1087,6 +1157,12 @@ private void InitializeComponent() // tabPageAppearance // this.tabPageAppearance.Controls.Add(this.checkBoxShowLabel); + this.tabPageAppearance.Controls.Add(this.label10); + this.tabPageAppearance.Controls.Add(this.label37); + this.tabPageAppearance.Controls.Add(this.label38); + this.tabPageAppearance.Controls.Add(this.label11); + this.tabPageAppearance.Controls.Add(this.label35); + this.tabPageAppearance.Controls.Add(this.label36); this.tabPageAppearance.Controls.Add(this.numericBoxAlpha); this.tabPageAppearance.Controls.Add(this.numericBoxEmission); this.tabPageAppearance.Controls.Add(this.numericBoxShininess); @@ -1094,12 +1170,6 @@ private void InitializeComponent() this.tabPageAppearance.Controls.Add(this.numericBoxDiffusion); this.tabPageAppearance.Controls.Add(this.numericBoxAmbient); this.tabPageAppearance.Controls.Add(this.numericBoxAtomRadius); - this.tabPageAppearance.Controls.Add(this.label10); - this.tabPageAppearance.Controls.Add(this.label37); - this.tabPageAppearance.Controls.Add(this.label38); - this.tabPageAppearance.Controls.Add(this.label11); - this.tabPageAppearance.Controls.Add(this.label35); - this.tabPageAppearance.Controls.Add(this.label36); this.tabPageAppearance.Controls.Add(this.colorControlAtomColor); resources.ApplyResources(this.tabPageAppearance, "tabPageAppearance"); this.tabPageAppearance.Name = "tabPageAppearance"; @@ -1110,6 +1180,36 @@ private void InitializeComponent() this.checkBoxShowLabel.Name = "checkBoxShowLabel"; this.checkBoxShowLabel.UseVisualStyleBackColor = true; // + // label10 + // + resources.ApplyResources(this.label10, "label10"); + this.label10.Name = "label10"; + // + // label37 + // + resources.ApplyResources(this.label37, "label37"); + this.label37.Name = "label37"; + // + // label38 + // + resources.ApplyResources(this.label38, "label38"); + this.label38.Name = "label38"; + // + // label11 + // + resources.ApplyResources(this.label11, "label11"); + this.label11.Name = "label11"; + // + // label35 + // + resources.ApplyResources(this.label35, "label35"); + this.label35.Name = "label35"; + // + // label36 + // + resources.ApplyResources(this.label36, "label36"); + this.label36.Name = "label36"; + // // numericBoxAlpha // resources.ApplyResources(this.numericBoxAlpha, "numericBoxAlpha"); @@ -1233,36 +1333,6 @@ private void InitializeComponent() this.numericBoxAtomRadius.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); this.numericBoxAtomRadius.ThonsandsSeparator = true; // - // label10 - // - resources.ApplyResources(this.label10, "label10"); - this.label10.Name = "label10"; - // - // label37 - // - resources.ApplyResources(this.label37, "label37"); - this.label37.Name = "label37"; - // - // label38 - // - resources.ApplyResources(this.label38, "label38"); - this.label38.Name = "label38"; - // - // label11 - // - resources.ApplyResources(this.label11, "label11"); - this.label11.Name = "label11"; - // - // label35 - // - resources.ApplyResources(this.label35, "label35"); - this.label35.Name = "label35"; - // - // label36 - // - resources.ApplyResources(this.label36, "label36"); - this.label36.Name = "label36"; - // // colorControlAtomColor // this.colorControlAtomColor.Argb = -986896; @@ -1525,6 +1595,10 @@ private void InitializeComponent() this.flowLayoutPanel3.PerformLayout(); this.tabPageDebyeWaller.ResumeLayout(false); this.tabPageDebyeWaller.PerformLayout(); + this.flowLayoutPanel5.ResumeLayout(false); + this.flowLayoutPanel5.PerformLayout(); + this.flowLayoutPanel4.ResumeLayout(false); + this.flowLayoutPanel4.PerformLayout(); this.flowLayoutPanelAniso2.ResumeLayout(false); this.flowLayoutPanelAniso1.ResumeLayout(false); this.tabPageScatteringFactor.ResumeLayout(false); @@ -1660,5 +1734,12 @@ private void InitializeComponent() private System.Windows.Forms.DataGridViewTextBoxColumn siteSymDataGridViewTextBoxColumn; public System.Windows.Forms.DataGridView dataGridView; private System.Windows.Forms.CheckBox checkBoxShowLabel; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.RadioButton radioButtonDebyeWallerTypeU; + private System.Windows.Forms.RadioButton radioButtonDebyeWallerTypeB; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label labelDimension; } } diff --git a/Crystallography.Controls/Crystal/AtomControl.cs b/Crystallography.Controls/Crystal/AtomControl.cs index 5199e16..806d23c 100644 --- a/Crystallography.Controls/Crystal/AtomControl.cs +++ b/Crystallography.Controls/Crystal/AtomControl.cs @@ -35,12 +35,12 @@ public Crystal Crystal public bool SkipEvent { get; set; } = false; - private bool details1 = false; + public bool AtomicPositionError { set { - details1 = value; + atmicPositionError = value; if (value == false) { tableLayoutPanel1.ColumnStyles[4].SizeType = tableLayoutPanel1.ColumnStyles[7].SizeType = SizeType.Absolute; @@ -59,27 +59,27 @@ public bool AtomicPositionError numericBoxXerr.TabStop = numericBoxYerr.TabStop = numericBoxZerr.TabStop = numericBoxOccerr.TabStop = true; } } - get => details1; + get => atmicPositionError; } + private bool atmicPositionError = false; - private bool details2 = false; public bool DebyeWallerError { set { - details2 = value; + debyeWallerError = value; if (value == false) { - numericBoxBiso.Width = numericBoxB11.Width = numericBoxB12.Width = - numericBoxB13.Width = numericBoxB22.Width = numericBoxB23.Width = numericBoxB33.Width = 60; + //numericBoxBiso.Width = numericBoxB11.Width = numericBoxB12.Width = + // numericBoxB13.Width = numericBoxB22.Width = numericBoxB23.Width = numericBoxB33.Width = 60; numericBoxBisoerr.Visible = numericBoxB11err.Visible = numericBoxB12err.Visible = numericBoxB13err.Visible = numericBoxB22err.Visible = numericBoxB23err.Visible = numericBoxB33err.Visible = false; } else { - numericBoxBiso.Width = numericBoxB11.Width = numericBoxB12.Width = - numericBoxB13.Width = numericBoxB22.Width = numericBoxB23.Width = numericBoxB33.Width = 45; + //numericBoxBiso.Width = numericBoxB11.Width = numericBoxB12.Width = + // numericBoxB13.Width = numericBoxB22.Width = numericBoxB23.Width = numericBoxB33.Width = 45; numericBoxBisoerr.Visible = numericBoxBiso.Visible = numericBoxB33err.Visible = numericBoxB23err.Visible = @@ -87,9 +87,11 @@ public bool DebyeWallerError numericBoxB12err.Visible = numericBoxB11err.Visible = true; } } - get => details2; + get => debyeWallerError; } - public bool Istoropy + private bool debyeWallerError = false; + + public bool UseIsotropy { set { @@ -101,35 +103,48 @@ public bool Istoropy get => radioButtonIsotoropy.Checked; } + public bool UseTypeU + { + set + { + if (value) + radioButtonDebyeWallerTypeU.Checked = true; + else + radioButtonDebyeWallerTypeB.Checked = true; + } + get => radioButtonDebyeWallerTypeU.Checked; + } + + #region 貂ゥ蠎ヲ蝗蟄 繝励Ο繝代ユ繧」 [Category("Atom")] - public double Biso { set => numericBoxBiso.Value = value; get => numericBoxBiso.Value; } + public double Iso { set => numericBoxBiso.Value = value; get => numericBoxBiso.Value; } [Category("Atom")] - public double BisoErr { set => numericBoxBisoerr.Value = value; get => numericBoxBisoerr.Value; } + public double IsoErr { set => numericBoxBisoerr.Value = value; get => numericBoxBisoerr.Value; } [Category("Atom")] - public double B11 { set => numericBoxB11.Value = value; get => numericBoxB11.Value; } + public double Aniso11 { set => numericBoxB11.Value = value; get => numericBoxB11.Value; } [Category("Atom")] - public double B11Err { set => numericBoxB11err.Value = value; get => numericBoxB11err.Value; } + public double Aniso11Err { set => numericBoxB11err.Value = value; get => numericBoxB11err.Value; } [Category("Atom")] - public double B12 { set => numericBoxB12.Value = value; get => numericBoxB12.Value; } + public double Aniso12 { set => numericBoxB12.Value = value; get => numericBoxB12.Value; } [Category("Atom")] - public double B12Err { set => numericBoxB12err.Value = value; get => numericBoxB12err.Value; } + public double Aniso12Err { set => numericBoxB12err.Value = value; get => numericBoxB12err.Value; } [Category("Atom")] - public double B13 { set => numericBoxB13.Value = value; get => numericBoxB13.Value; } + public double Aniso13 { set => numericBoxB13.Value = value; get => numericBoxB13.Value; } [Category("Atom")] - public double B13Err { set => numericBoxB13err.Value = value; get => numericBoxB13err.Value; } + public double Aniso13Err { set => numericBoxB13err.Value = value; get => numericBoxB13err.Value; } [Category("Atom")] - public double B22 { set => numericBoxB22.Value = value; get => numericBoxB22.Value; } + public double Aniso22 { set => numericBoxB22.Value = value; get => numericBoxB22.Value; } [Category("Atom")] - public double B22Err { set => numericBoxB22err.Value = value; get => numericBoxB22err.Value; } + public double Aniso22Err { set => numericBoxB22err.Value = value; get => numericBoxB22err.Value; } [Category("Atom")] - public double B23 { set => numericBoxB23.Value = value; get { return numericBoxB23.Value; } } + public double Aniso23 { set => numericBoxB23.Value = value; get { return numericBoxB23.Value; } } [Category("Atom")] - public double B23Err { set { numericBoxB23err.Value = value; } get { return numericBoxB23err.Value; } } + public double Aniso23Err { set { numericBoxB23err.Value = value; } get { return numericBoxB23err.Value; } } [Category("Atom")] - public double B33 { set { numericBoxB33.Value = value; } get { return numericBoxB33.Value; } } + public double Aniso33 { set { numericBoxB33.Value = value; } get { return numericBoxB33.Value; } } [Category("Atom")] - public double B33Err { set { numericBoxB33err.Value = value; } get { return numericBoxB33err.Value; } } + public double Aniso33Err { set { numericBoxB33err.Value = value; } get { return numericBoxB33err.Value; } } #endregion #region 蜴溷ュ蝉ス咲スョ 繝励Ο繝代ユ繧」 @@ -288,6 +303,23 @@ private void radioButtonIsotoropy_CheckedChanged(object sender, EventArgs e) { flowLayoutPanelAniso1.Visible = flowLayoutPanelAniso2.Visible = !radioButtonIsotoropy.Checked; flowLayoutPanelIso.Visible = radioButtonIsotoropy.Checked; + + labelDimension.Text = radioButtonDebyeWallerTypeB.Checked && radioButtonAnisotropy.Checked ? "Dimension: None" : "Dimension: 邃ォ^2"; + } + + private void radioButtonDebyeWallerTypeU_CheckedChanged(object sender, EventArgs e) + { + var U = radioButtonDebyeWallerTypeU.Checked; + numericBoxBiso.HeaderText = U ? "Uiso" : "Biso"; + numericBoxB11.HeaderText = U ? "U11" : "B11"; + numericBoxB22.HeaderText = U ? "U22" : "B22"; + numericBoxB33.HeaderText = U ? "U33" : "B33"; + numericBoxB12.HeaderText = U ? "U12" : "B12"; + numericBoxB23.HeaderText = U ? "U23" : "B23"; + numericBoxB13.HeaderText = U ? "U13" : "B13"; + + labelDimension.Text = radioButtonDebyeWallerTypeB.Checked && radioButtonAnisotropy.Checked ? "Dimension: None" : "Dimension: 邃ォ^2"; + } //蜴溷ュ千分蜿キ繧ウ繝ウ繝 @@ -490,19 +522,52 @@ public void SetToInterface(Atoms atoms) AtomSubNoElectron = atoms.SubNumberElectron; IsotopicComposition = atoms.Isotope; - X = atoms.X; Y = atoms.Y; Z = atoms.Z; Occ = atoms.Occ; - XErr = atoms.X_err; YErr = atoms.Y_err; ZErr = atoms.Z_err; OccErr = atoms.Occ_err; - - Biso = atoms.Dsf.Biso; B11 = atoms.Dsf.B11; B12 = atoms.Dsf.B12; B13 = atoms.Dsf.B31; B22 = atoms.Dsf.B22; B23 = atoms.Dsf.B23; B33 = atoms.Dsf.B33; - BisoErr = atoms.Dsf.Biso_err; B11Err = atoms.Dsf.B11_err; B12Err = atoms.Dsf.B12_err; B13Err = atoms.Dsf.B31_err; B22Err = atoms.Dsf.B22_err; B23Err = atoms.Dsf.B23_err; B33Err = atoms.Dsf.B33_err; - Istoropy = atoms.Dsf.IsIso; - - Ambient = atoms.Ambient; Diffusion = atoms.Diffusion; Emission = atoms.Emission; Shininess = atoms.Shininess; Specular = atoms.Specular; - - Radius = atoms.Radius; AtomColor = Color.FromArgb(atoms.Argb); Alpha = Color.FromArgb(atoms.Argb).A / 255f; + #region 蜴溷ュ蝉ス咲スョ縲∝頃譛臥紫 + X = atoms.X; XErr = atoms.X_err; + Y = atoms.Y; YErr = atoms.Y_err; + Z = atoms.Z; ZErr = atoms.Z_err; + Occ = atoms.Occ; OccErr = atoms.Occ_err; + #endregion + + + #region 貂ゥ蠎ヲ蝗蟄宣未菫 + UseIsotropy = atoms.Dsf.UseIso; + UseTypeU = atoms.Dsf.OriginalType == DiffuseScatteringFactor.Type.U; + + + Iso = UseTypeU ? atoms.Dsf.Uiso * 100 : atoms.Dsf.Biso * 100; + Aniso11 = UseTypeU ? atoms.Dsf.U11 * 100 : atoms.Dsf.B11; + Aniso12 = UseTypeU ? atoms.Dsf.U12 * 100 : atoms.Dsf.B12; + Aniso13 = UseTypeU ? atoms.Dsf.U31 * 100 : atoms.Dsf.B31; + Aniso22 = UseTypeU ? atoms.Dsf.U22 * 100 : atoms.Dsf.B22; + Aniso23 = UseTypeU ? atoms.Dsf.U23 * 100 : atoms.Dsf.B23; + Aniso33 = UseTypeU ? atoms.Dsf.U31 * 100 : atoms.Dsf.B31; + + IsoErr = UseTypeU ? atoms.Dsf.Uiso_err * 100 : atoms.Dsf.Biso_err * 100; + Aniso11Err = UseTypeU ? atoms.Dsf.U11_err * 100 : atoms.Dsf.B11_err; + Aniso12Err = UseTypeU ? atoms.Dsf.U12_err * 100 : atoms.Dsf.B12_err; + Aniso13Err = UseTypeU ? atoms.Dsf.U31_err * 100 : atoms.Dsf.B31_err; + Aniso22Err = UseTypeU ? atoms.Dsf.U22_err * 100 : atoms.Dsf.B22_err; + Aniso23Err = UseTypeU ? atoms.Dsf.U23_err * 100 : atoms.Dsf.B23_err; + Aniso33Err = UseTypeU ? atoms.Dsf.U31_err * 100 : atoms.Dsf.B31_err; + + #endregion + + #region Appearance髢「騾」 + + Ambient = atoms.Ambient; + Diffusion = atoms.Diffusion; + Emission = atoms.Emission; + Shininess = atoms.Shininess; + Specular = atoms.Specular; + + Radius = atoms.Radius; + AtomColor = Color.FromArgb(atoms.Argb); + Alpha = Color.FromArgb(atoms.Argb).A / 255f; ShowLabel = atoms.ShowLabel; - + + #endregion } @@ -512,7 +577,18 @@ public void SetToInterface(Atoms atoms) /// private Atoms GetFromInterface() { - var dsf = new DiffuseScatteringFactor(Istoropy, Biso, B11, B22, B33, B12, B23, B13, BisoErr, B11Err, B22Err, B33Err, B12Err, B23Err, B13Err); + + var aniso = UseTypeU ? + new[] { Aniso11 / 100, Aniso22 / 100, Aniso33 / 100, Aniso12 / 100, Aniso23 / 100, Aniso13 / 100 } : + new[] { Aniso11, Aniso22, Aniso33, Aniso12, Aniso23, Aniso13 }; + + var anisoErr = UseTypeU ? + new[] { Aniso11Err / 100, Aniso22Err / 100, Aniso33Err / 100, Aniso12Err / 100, Aniso23Err / 100, Aniso13Err / 100 } : + new[] { Aniso11Err, Aniso22Err, Aniso33Err, Aniso12Err, Aniso23Err, Aniso13Err }; + + var dsf = new DiffuseScatteringFactor(UseTypeU ? DiffuseScatteringFactor.Type.U : DiffuseScatteringFactor.Type.B, + UseIsotropy, Iso / 100, IsoErr / 100, aniso, anisoErr, Crystal.CellValue); + var material = new Material(AtomColor.ToArgb(), (Ambient, Diffusion, Specular, Shininess, Emission), Alpha); var atoms = new Atoms(Label, AtomNo, AtomSubNoXray, AtomSubNoElectron, IsotopicComposition, @@ -647,6 +723,9 @@ private void listBoxAtoms_MouseLeave(object sender, EventArgs e) // this.toolTip.SetToolTip(this.listBoxAtoms, "displya element, position, symmetry seeting for each atoms."); } + + + private void buttonOriginShift_Click(object sender, EventArgs e) { var button = sender as Button; diff --git a/Crystallography.Controls/Crystal/AtomControl.ja.resx b/Crystallography.Controls/Crystal/AtomControl.ja.resx index 546c65c..88e9bbf 100644 --- a/Crystallography.Controls/Crystal/AtomControl.ja.resx +++ b/Crystallography.Controls/Crystal/AtomControl.ja.resx @@ -136,6 +136,9 @@ 髱樒ュ画婿 + + 79, 4 + -236, -25 @@ -191,50 +194,62 @@ 390, 0 + + 1000, 22 + - 87, 24 + 87, 22 - + 306, 0 - - 84, 24 + + 84, 22 - + 133, 48 - - 84, 24 + + 84, 22 217, 24 + + 1000, 22 + - 84, 24 + 84, 22 217, 0 + + 1000, 22 + - 84, 24 + 84, 22 - + 133, 24 - - 84, 24 + + 84, 22 - + 133, 0 - - 84, 24 + + 84, 22 217, 48 + + 1000, 22 + - 84, 24 + 84, 22 477, 74 @@ -317,6 +332,12 @@ 468, 3 + + 80, 51 + + + 80, 27 + 4, 27 @@ -371,11 +392,8 @@ 謨」荵ア蝗蟄 - - 繝。繧、繝ェ繧ェ, 9pt - - - 蜊雁セ + + 90, 22 繝。繧、繝ェ繧ェ, 9pt @@ -413,25 +431,21 @@ 謾セ蟆 - - Segoe UI Symbol, 9pt - - - - 0, 0, 0, 0 + + 繝。繧、繝ェ繧ェ, 9pt - - + + 蜊雁セ 繝。繧、繝ェ繧ェ, 9pt - - 0, 2, 0, 0 - 蜴溷ュ舌ョ濶イ + + 76, 20 + 4, 27 @@ -474,12 +488,6 @@ 荳翫∈遘サ蜍 - - 繝。繧、繝ェ繧ェ, 9pt - - - 螟画峩 - 繝。繧、繝ェ繧ェ, 9pt @@ -519,7 +527,7 @@ 繧オ繧、繝亥ッセ遘ー諤ァ - + 563, 185 diff --git a/Crystallography.Controls/Crystal/AtomControl.resx b/Crystallography.Controls/Crystal/AtomControl.resx index f5caa9a..26a1355 100644 --- a/Crystallography.Controls/Crystal/AtomControl.resx +++ b/Crystallography.Controls/Crystal/AtomControl.resx @@ -123,20 +123,20 @@ - Arial, 9pt + Segoe UI Symbol, 9.75pt NoControl - 3, 6 + 53, 0 0, 0, 0, 0 - 68, 19 + 74, 21 0 @@ -151,28 +151,28 @@ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPageDebyeWaller + flowLayoutPanel4 - 4 + 1 True - Arial, 9pt + Segoe UI Symbol, 9.75pt NoControl - 3, 28 + 127, 0 0, 0, 0, 0 - 82, 19 + 89, 21 1 @@ -187,10 +187,10 @@ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPageDebyeWaller + flowLayoutPanel4 - 3 + 2 True @@ -204,6 +204,12 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + Biso @@ -223,7 +229,7 @@ 1, 1, 1, 1 - 72, 24 + 96, 24 0 @@ -232,7 +238,7 @@ numericBoxBiso - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelIso @@ -243,8 +249,17 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + ツア + - 72, 0 + 96, 0 0, 0, 0, 0 @@ -265,7 +280,7 @@ numericBoxBisoerr - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelIso @@ -274,13 +289,13 @@ 1 - 85, 4 + 60, 26 0, 0, 0, 0 - 142, 24 + 166, 24 2 @@ -295,7 +310,7 @@ tabPageDebyeWaller - 5 + 1 None @@ -940,7 +955,7 @@ numericBox1 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanel8 @@ -1012,7 +1027,7 @@ numericBox2 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanel8 @@ -1135,7 +1150,7 @@ numericBox3 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanel9 @@ -1207,7 +1222,7 @@ numericBox4 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanel9 @@ -1325,7 +1340,7 @@ numericBoxOccerr - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -1370,7 +1385,7 @@ numericBoxOcc - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -1415,7 +1430,7 @@ numericBoxZ - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -1448,7 +1463,7 @@ numericBoxYerr - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -1481,7 +1496,7 @@ numericBoxXerr - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -1526,7 +1541,7 @@ numericBoxY - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -1571,7 +1586,7 @@ numericBoxX - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -1604,7 +1619,7 @@ numericBoxZerr - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -2255,7 +2270,7 @@ numericBoxOriginShiftZ - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageOriginShift @@ -2300,7 +2315,7 @@ numericBoxOriginShiftY - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageOriginShift @@ -2345,7 +2360,7 @@ numericBoxOriginShiftX - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageOriginShift @@ -2377,6 +2392,237 @@ 1 + + True + + + Segoe UI Symbol, 9.75pt + + + NoControl + + + 366, 3 + + + 76, 17 + + + 308 + + + Dimension: + + + labelDimension + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageDebyeWaller + + + 0 + + + True + + + GrowAndShrink + + + True + + + Segoe UI Symbol, 9.75pt + + + NoControl + + + 0, 1 + + + 0, 1, 0, 0 + + + 66, 17 + + + 308 + + + Notation: + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flowLayoutPanel5 + + + 0 + + + True + + + Segoe UI Symbol, 9.75pt + + + NoControl + + + 66, 0 + + + 0, 0, 0, 0 + + + 35, 21 + + + 0 + + + U + + + radioButtonDebyeWallerTypeU + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flowLayoutPanel5 + + + 1 + + + True + + + Segoe UI Symbol, 9.75pt + + + NoControl + + + 101, 0 + + + 0, 0, 0, 0 + + + 33, 21 + + + 1 + + + B + + + radioButtonDebyeWallerTypeB + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flowLayoutPanel5 + + + 2 + + + 3, 1 + + + 134, 21 + + + 307 + + + flowLayoutPanel5 + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageDebyeWaller + + + 2 + + + True + + + GrowAndShrink + + + True + + + Segoe UI Symbol, 9.75pt + + + NoControl + + + 0, 2 + + + 0, 2, 0, 0 + + + 53, 17 + + + 308 + + + Model: + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flowLayoutPanel4 + + + 0 + + + 143, 1 + + + 216, 21 + + + 307 + + + flowLayoutPanel4 + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageDebyeWaller + + + 3 + Top, Right @@ -2390,7 +2636,7 @@ NoControl - 453, 3 + 481, 2 87, 19 @@ -2411,7 +2657,7 @@ tabPageDebyeWaller - 0 + 4 True @@ -2422,6 +2668,15 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + B12 + 0, 0 @@ -2435,7 +2690,7 @@ 1, 22 - 70, 24 + 81, 24 0 @@ -2444,7 +2699,7 @@ numericBoxB22 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso2 @@ -2455,8 +2710,17 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + ツア + - 70, 0 + 81, 0 0, 0, 0, 0 @@ -2468,7 +2732,7 @@ 1, 22 - 70, 24 + 66, 24 1 @@ -2477,7 +2741,7 @@ numericBoxB22err - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso2 @@ -2488,11 +2752,20 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + B23 + - 140, 0 + 152, 0 - 0, 0, 0, 0 + 5, 0, 0, 0 1000, 24 @@ -2501,7 +2774,7 @@ 1, 22 - 70, 24 + 81, 24 2 @@ -2510,7 +2783,7 @@ numericBoxB23 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso2 @@ -2521,8 +2794,17 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + ツア + - 210, 0 + 233, 0 0, 0, 0, 0 @@ -2534,7 +2816,7 @@ 1, 22 - 70, 24 + 66, 24 3 @@ -2543,7 +2825,7 @@ numericBoxB23err - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso2 @@ -2554,11 +2836,20 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + B31 + - 280, 0 + 304, 0 - 0, 0, 0, 0 + 5, 0, 0, 0 1000, 24 @@ -2567,7 +2858,7 @@ 1, 22 - 70, 24 + 81, 24 4 @@ -2576,7 +2867,7 @@ numericBoxB33 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso2 @@ -2587,8 +2878,17 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + ツア + - 350, 0 + 385, 0 0, 0, 0, 0 @@ -2600,7 +2900,7 @@ 1, 22 - 70, 24 + 66, 24 5 @@ -2609,7 +2909,7 @@ numericBoxB33err - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso2 @@ -2618,10 +2918,10 @@ 5 - 84, 44 + 62, 50 - 420, 24 + 451, 24 4 @@ -2636,7 +2936,7 @@ tabPageDebyeWaller - 1 + 5 True @@ -2647,6 +2947,15 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + B11 + 0, 0 @@ -2660,7 +2969,7 @@ 1, 22 - 70, 24 + 81, 24 0 @@ -2669,7 +2978,7 @@ numericBoxB11 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso1 @@ -2680,8 +2989,17 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + ツア + - 70, 0 + 81, 0 0, 0, 0, 0 @@ -2693,7 +3011,7 @@ 1, 22 - 70, 24 + 66, 24 1 @@ -2702,7 +3020,7 @@ numericBoxB11err - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso1 @@ -2713,11 +3031,20 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + B22 + - 140, 0 + 152, 0 - 0, 0, 0, 0 + 5, 0, 0, 0 1000, 24 @@ -2726,7 +3053,7 @@ 1, 22 - 70, 24 + 81, 24 2 @@ -2735,7 +3062,7 @@ numericBoxB12 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso1 @@ -2746,8 +3073,17 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + ツア + - 210, 0 + 233, 0 0, 0, 0, 0 @@ -2759,7 +3095,7 @@ 1, 22 - 70, 24 + 66, 24 3 @@ -2768,7 +3104,7 @@ numericBoxB12err - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso1 @@ -2779,11 +3115,20 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + B11 + - 280, 0 + 304, 0 - 0, 0, 0, 0 + 5, 0, 0, 0 1000, 24 @@ -2792,7 +3137,7 @@ 1, 22 - 70, 24 + 81, 24 4 @@ -2801,7 +3146,7 @@ numericBoxB13 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso1 @@ -2812,8 +3157,17 @@ Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + ツア + - 350, 0 + 385, 0 0, 0, 0, 0 @@ -2825,7 +3179,7 @@ 1, 22 - 70, 24 + 66, 24 5 @@ -2834,7 +3188,7 @@ numericBoxB13err - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null flowLayoutPanelAniso1 @@ -2843,10 +3197,10 @@ 5 - 85, 20 + 62, 27 - 420, 24 + 451, 24 3 @@ -2861,7 +3215,7 @@ tabPageDebyeWaller - 2 + 6 4, 24 @@ -3223,6 +3577,9 @@ True + + NoControl + 225, 7 @@ -3247,26 +3604,224 @@ 0 - - GrowAndShrink - - - Segoe UI Symbol, 9.75pt - - - Segoe UI Symbol, 9pt + + True - + Segoe UI Symbol, 9pt - - 341, 48 + + NoControl - - 0, 0, 0, 0 + + 4, 33 - - 1000, 25 + + 53, 15 + + + 88 + + + Ambient + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageAppearance + + + 1 + + + True + + + Segoe UI Symbol, 9pt + + + NoControl + + + 338, 33 + + + 38, 15 + + + 88 + + + Alpha + + + label37 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageAppearance + + + 2 + + + True + + + Segoe UI Symbol, 9pt + + + NoControl + + + 133, 33 + + + 52, 15 + + + 88 + + + Specular + + + label38 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageAppearance + + + 3 + + + True + + + Segoe UI Symbol, 9pt + + + NoControl + + + 70, 33 + + + 55, 15 + + + 88 + + + Diffusion + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageAppearance + + + 4 + + + True + + + Segoe UI Symbol, 9pt + + + NoControl + + + 267, 33 + + + 54, 15 + + + 88 + + + Emission + + + label35 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageAppearance + + + 5 + + + True + + + Segoe UI Symbol, 9pt + + + NoControl + + + 201, 33 + + + 56, 15 + + + 88 + + + Shininess + + + label36 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageAppearance + + + 6 + + + GrowAndShrink + + + Segoe UI Symbol, 9.75pt + + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + 341, 48 + + + 0, 0, 0, 0 + + + 1000, 25 1, 23 @@ -3284,13 +3839,13 @@ numericBoxAlpha - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageAppearance - 1 + 7 GrowAndShrink @@ -3329,13 +3884,13 @@ numericBoxEmission - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageAppearance - 2 + 8 GrowAndShrink @@ -3374,13 +3929,13 @@ numericBoxShininess - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageAppearance - 3 + 9 GrowAndShrink @@ -3419,13 +3974,13 @@ numericBoxSpecular - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageAppearance - 4 + 10 GrowAndShrink @@ -3464,13 +4019,13 @@ numericBoxDiffusion - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageAppearance - 5 + 11 GrowAndShrink @@ -3509,13 +4064,13 @@ numericBoxAmbient - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageAppearance - 6 + 12 GrowAndShrink @@ -3560,210 +4115,12 @@ numericBoxAtomRadius - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageAppearance - 7 - - - True - - - Segoe UI Symbol, 9pt - - - NoControl - - - 4, 33 - - - 53, 15 - - - 88 - - - Ambient - - - label10 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPageAppearance - - - 8 - - - True - - - Segoe UI Symbol, 9pt - - - NoControl - - - 338, 33 - - - 38, 15 - - - 88 - - - Alpha - - - label37 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPageAppearance - - - 9 - - - True - - - Segoe UI Symbol, 9pt - - - NoControl - - - 133, 33 - - - 52, 15 - - - 88 - - - Specular - - - label38 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPageAppearance - - - 10 - - - True - - - Segoe UI Symbol, 9pt - - - NoControl - - - 70, 33 - - - 55, 15 - - - 88 - - - Diffusion - - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPageAppearance - - - 11 - - - True - - - Segoe UI Symbol, 9pt - - - NoControl - - - 267, 33 - - - 54, 15 - - - 88 - - - Emission - - - label35 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPageAppearance - - - 12 - - - True - - - Segoe UI Symbol, 9pt - - - NoControl - - - 201, 33 - - - 56, 15 - - - 88 - - - Shininess - - - label36 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPageAppearance - - 13 @@ -3812,7 +4169,7 @@ colorControlAtomColor - Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.5.24.516, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.7.8.335, Culture=neutral, PublicKeyToken=null tabPageAppearance diff --git a/Crystallography.Controls/Crystal/AtomCoordinateTable.Designer.cs b/Crystallography.Controls/Crystal/AtomCoordinateTable.Designer.cs index f82e2bd..438b230 100644 --- a/Crystallography.Controls/Crystal/AtomCoordinateTable.Designer.cs +++ b/Crystallography.Controls/Crystal/AtomCoordinateTable.Designer.cs @@ -56,6 +56,7 @@ private void InitializeComponent() // // comboBox // + this.comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox.FormattingEnabled = true; this.comboBox.Location = new System.Drawing.Point(82, 1); this.comboBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); @@ -209,21 +210,20 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Arial Unicode MS", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.Location = new System.Drawing.Point(528, 6); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(16, 16); + this.label4.Size = new System.Drawing.Size(15, 15); this.label4.TabIndex = 5; this.label4.Text = "邃ォ"; - this.label4.Click += new System.EventHandler(this.label4_Click); // // label5 // this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Arial Unicode MS", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.Location = new System.Drawing.Point(357, 7); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(16, 16); + this.label5.Size = new System.Drawing.Size(15, 15); this.label5.TabIndex = 5; this.label5.Text = "邃ォ"; // @@ -245,7 +245,6 @@ private void InitializeComponent() this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Name = "AtomCoordinateTable"; this.Size = new System.Drawing.Size(555, 201); - this.Load += new System.EventHandler(this.AtomCoordinateTable_Load); this.Resize += new System.EventHandler(this.AtomCoordinateTable_Resize_1); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataSet)).EndInit(); diff --git a/Crystallography.Controls/Crystal/AtomCoordinateTable.cs b/Crystallography.Controls/Crystal/AtomCoordinateTable.cs index 5b8c58b..8bcefc6 100644 --- a/Crystallography.Controls/Crystal/AtomCoordinateTable.cs +++ b/Crystallography.Controls/Crystal/AtomCoordinateTable.cs @@ -2,12 +2,16 @@ using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; +using System.Threading; +using System.Threading.Tasks; using System.Windows.Forms; namespace Crystallography.Controls { public partial class AtomCoordinateTable : UserControl { + ReaderWriterLockSlim rwLock = new ReaderWriterLockSlim(); + private bool skipEvent { get; set; } = false; public AtomCoordinateTable() { InitializeComponent(); @@ -22,9 +26,11 @@ public Crystal Crystal crystal = value; if (crystal != null && crystal.Atoms != null && crystal.Atoms.Length > 0) { + skipEvent = true; comboBox.Items.Clear(); for (int i = 0; i < crystal.Atoms.Length; i++) comboBox.Items.Add(crystal.Atoms[i].Label); + skipEvent = false; comboBox.SelectedIndex = 0; } } @@ -48,11 +54,13 @@ public Atoms Atom } } } - get { return atom; } + get => atom; } private void comboBox_SelectedIndexChanged(object sender, EventArgs e) { + if (skipEvent) + return; if (crystal != null && crystal.Atoms != null && crystal.Atoms.Length > 0 && comboBox.SelectedIndex < Crystal.Atoms.Length) { atom = Crystal.Atoms[comboBox.SelectedIndex]; @@ -60,11 +68,15 @@ private void comboBox_SelectedIndexChanged(object sender, EventArgs e) } } + + + + private void RefreshTable() { if (crystal != null && crystal.Atoms != null && crystal.Atoms.Length > 0 && comboBox.SelectedIndex < Crystal.Atoms.Length) { - List atom = AtomCoordination.Search(Crystal, Atom, (double)numericUpDownMaxLength.Value); + var atom = Search(Crystal, Atom, (double)numericUpDownMaxLength.Value); dataSet.Tables[0].Clear(); for (int i = 0; i < atom.Count; i++) { @@ -77,6 +89,51 @@ private void RefreshTable() } } + + public List<(string Label, double Distance)> Search(Crystal crystal, Atoms targetAtom, double maxLengthAngstrom) + { + var mat = 10 * crystal.MatrixReal; + Vector3DBase pos = mat * targetAtom.Atom[0]; + var max2 = maxLengthAngstrom * maxLengthAngstrom; + var atoms = new List<(string Label, double Distance)>(); + //縺セ縺壹髫」繧雁粋縺」縺溷腰菴肴シ蟄舌ョ蜴溷ュ蝉ス咲スョ繧偵☆縺ケ縺ヲ謗「邏「縺励※CoordinatedAtom蝙九ョ繝ェ繧ケ繝医↓蜈ィ驛ィ蜈・繧後k + for (int max = 0; max < 8; max++) + { + bool flag = false; + Parallel.For(-max, max + 1, xShift => + { + for (int yShift = -max; yShift <= max; yShift++) + for (int zShift = -max; zShift <= max; zShift++) + { + if (Math.Abs(xShift) == max || Math.Abs(yShift) == max || Math.Abs(zShift) == max) + { + foreach (Atoms atm in crystal.Atoms) + foreach (var v in atm.Atom) + { + var tempPos = mat * (v + new Vector3DBase(xShift, yShift, zShift)); + if (max2 > (tempPos - pos).Length2) + { + rwLock.EnterWriteLock(); + try + { + atoms.Add((atm.Label, (tempPos - pos).Length)); + flag = true;//荳蛟九〒繧りヲ九▽縺代i繧後◆繧臥カ夊。 + } + finally { rwLock.ExitWriteLock(); } + } + } + } + } + }); + if (flag == false && max > 2) + break; + } + atoms.Sort((a1, a2) => a1.Distance.CompareTo(a2.Distance)); + return atoms; + } + + + private Bitmap bmp; private Graphics g; private Point OriginPos = new Point(30, 30); @@ -84,7 +141,7 @@ private void RefreshTable() private Profile profile = new Profile(); private double BottomMargin = 0; - private void DrawGraph(List atoms) + private void DrawGraph(List<(string Label, double Distance)> atoms) { if (pictureBox.Width <= 0 || pictureBox.Height <= 0 || atoms.Count == 0) return; bmp = new Bitmap(pictureBox.Width, pictureBox.Height); g = Graphics.FromImage(bmp); @@ -133,7 +190,7 @@ private void DrawGraph(List atoms) pictureBox.Image = bmp; } - private class ControlPoint : System.IComparable + private class ControlPoint : IComparable { public double X; public bool Flag; @@ -150,7 +207,7 @@ public int CompareTo(object obj) } } - private void DrawHistogram(List atoms) + private void DrawHistogram(List<(string Label, double Distance)> atoms) { SolidBrush solidBrush = new SolidBrush(Color.LawnGreen); float zero = ConvToPicBoxCoord(0, 0).Y; @@ -163,7 +220,7 @@ private void DrawHistogram(List atoms) } } - private void DrawLabel(List atoms) + private void DrawLabel(List<(string Label, double Distance)> atoms) { PointF JustBeforePt = new PointF(-10, -10); @@ -254,36 +311,11 @@ private PointD ConvToRealCoord(int x, int y) #endregion 蠎ァ讓吝、画鋤髢「菫 - private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) - { - } - - private void AtomCoordinateTable_Load(object sender, EventArgs e) - { - } - private void label4_Click(object sender, EventArgs e) - { - } + private void numericUpDownWidth_ValueChanged(object sender, EventArgs e) => RefreshTable(); - private void numericUpDownWidth_ValueChanged(object sender, EventArgs e) - { - RefreshTable(); - } + private void numericUpDownMaxLength_ValueChanged(object sender, EventArgs e) => RefreshTable(); - private void numericUpDownMaxLength_ValueChanged(object sender, EventArgs e) - { - RefreshTable(); - } - - private void AtomCoordinateTable_Resize(object sender, EventArgs e) - { - RefreshTable(); - } - - private void AtomCoordinateTable_Resize_1(object sender, EventArgs e) - { - RefreshTable(); - } + private void AtomCoordinateTable_Resize_1(object sender, EventArgs e) => RefreshTable(); } } \ No newline at end of file diff --git a/Crystallography.Controls/Crystal/CrystalControl.Designer.cs b/Crystallography.Controls/Crystal/CrystalControl.Designer.cs index af7e00b..208c0d3 100644 --- a/Crystallography.Controls/Crystal/CrystalControl.Designer.cs +++ b/Crystallography.Controls/Crystal/CrystalControl.Designer.cs @@ -34,10 +34,16 @@ private void InitializeComponent() this.tabPageBasicInfo = new System.Windows.Forms.TabPage(); this.panel5 = new System.Windows.Forms.Panel(); this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); - this.numericBoxZnumber = new Crystallography.Controls.NumericBox(); this.numericBoxVolume = new Crystallography.Controls.NumericBox(); + this.numericBoxCellMass = new Crystallography.Controls.NumericBox(); + this.numericBoxMolarVolume = new Crystallography.Controls.NumericBox(); + this.numericBoxMolarMass = new Crystallography.Controls.NumericBox(); this.numericBoxDensity = new Crystallography.Controls.NumericBox(); this.colorControl = new Crystallography.Controls.ColorControl(); + this.panel1 = new System.Windows.Forms.Panel(); + this.textBoxFormula = new System.Windows.Forms.TextBox(); + this.numericBoxZnumber = new Crystallography.Controls.NumericBox(); + this.label90 = new System.Windows.Forms.Label(); this.symmetryControl = new Crystallography.Controls.SymmetryControl(); this.tabPageAtom = new System.Windows.Forms.TabPage(); this.atomControl = new Crystallography.Controls.AtomControl(); @@ -179,8 +185,6 @@ private void InitializeComponent() this.revertCellConstantsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.strainControlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.textBoxFormula = new System.Windows.Forms.TextBox(); - this.label90 = new System.Windows.Forms.Label(); this.textBoxName = new System.Windows.Forms.TextBox(); this.label22 = new System.Windows.Forms.Label(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); @@ -191,6 +195,7 @@ private void InitializeComponent() this.tabPageBasicInfo.SuspendLayout(); this.panel5.SuspendLayout(); this.flowLayoutPanel4.SuspendLayout(); + this.panel1.SuspendLayout(); this.tabPageAtom.SuspendLayout(); this.panelAtom.SuspendLayout(); this.contextMenuStrip2.SuspendLayout(); @@ -248,61 +253,94 @@ private void InitializeComponent() // panel5 // this.panel5.Controls.Add(this.flowLayoutPanel4); + this.panel5.Controls.Add(this.panel1); this.panel5.Controls.Add(this.symmetryControl); resources.ApplyResources(this.panel5, "panel5"); this.panel5.Name = "panel5"; // // flowLayoutPanel4 // - this.flowLayoutPanel4.Controls.Add(this.numericBoxZnumber); this.flowLayoutPanel4.Controls.Add(this.numericBoxVolume); + this.flowLayoutPanel4.Controls.Add(this.numericBoxCellMass); + this.flowLayoutPanel4.Controls.Add(this.numericBoxMolarVolume); + this.flowLayoutPanel4.Controls.Add(this.numericBoxMolarMass); this.flowLayoutPanel4.Controls.Add(this.numericBoxDensity); this.flowLayoutPanel4.Controls.Add(this.colorControl); resources.ApplyResources(this.flowLayoutPanel4, "flowLayoutPanel4"); this.flowLayoutPanel4.Name = "flowLayoutPanel4"; // - // numericBoxZnumber - // - resources.ApplyResources(this.numericBoxZnumber, "numericBoxZnumber"); - this.numericBoxZnumber.BackColor = System.Drawing.Color.Transparent; - this.numericBoxZnumber.DecimalPlaces = -2; - this.numericBoxZnumber.Name = "numericBoxZnumber"; - this.numericBoxZnumber.RadianValue = 0D; - this.numericBoxZnumber.ReadOnly = true; - this.numericBoxZnumber.RestrictLimitValue = true; - this.numericBoxZnumber.SkipEventDuringInput = false; - this.numericBoxZnumber.SmartIncrement = true; - this.numericBoxZnumber.TextBoxBackColor = System.Drawing.SystemColors.Control; - this.numericBoxZnumber.ThonsandsSeparator = true; - // // numericBoxVolume // resources.ApplyResources(this.numericBoxVolume, "numericBoxVolume"); this.numericBoxVolume.BackColor = System.Drawing.SystemColors.Control; this.numericBoxVolume.DecimalPlaces = 4; - this.numericBoxVolume.Name = "numericBoxVolume"; - this.numericBoxVolume.RadianValue = 0D; + this.numericBoxVolume.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxVolume.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxVolume.Name = "numericBoxVolume"; this.numericBoxVolume.ReadOnly = true; this.numericBoxVolume.RestrictLimitValue = false; this.numericBoxVolume.SkipEventDuringInput = false; this.numericBoxVolume.SmartIncrement = true; this.numericBoxVolume.TextBoxBackColor = System.Drawing.SystemColors.Control; this.numericBoxVolume.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - // + // + // numericBoxCellMass + // + resources.ApplyResources(this.numericBoxCellMass, "numericBoxCellMass"); + this.numericBoxCellMass.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxCellMass.DecimalPlaces = 4; + this.numericBoxCellMass.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxCellMass.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxCellMass.Name = "numericBoxCellMass"; + this.numericBoxCellMass.ReadOnly = true; + this.numericBoxCellMass.RestrictLimitValue = false; + this.numericBoxCellMass.SkipEventDuringInput = false; + this.numericBoxCellMass.SmartIncrement = true; + this.numericBoxCellMass.TextBoxBackColor = System.Drawing.SystemColors.Control; + this.numericBoxCellMass.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + // + // numericBoxMolarVolume + // + resources.ApplyResources(this.numericBoxMolarVolume, "numericBoxMolarVolume"); + this.numericBoxMolarVolume.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxMolarVolume.DecimalPlaces = 4; + this.numericBoxMolarVolume.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxMolarVolume.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxMolarVolume.Name = "numericBoxMolarVolume"; + this.numericBoxMolarVolume.ReadOnly = true; + this.numericBoxMolarVolume.RestrictLimitValue = false; + this.numericBoxMolarVolume.SkipEventDuringInput = false; + this.numericBoxMolarVolume.SmartIncrement = true; + this.numericBoxMolarVolume.TextBoxBackColor = System.Drawing.SystemColors.Control; + this.numericBoxMolarVolume.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + // + // numericBoxMolarMass + // + resources.ApplyResources(this.numericBoxMolarMass, "numericBoxMolarMass"); + this.numericBoxMolarMass.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxMolarMass.DecimalPlaces = 4; + this.numericBoxMolarMass.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxMolarMass.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxMolarMass.Name = "numericBoxMolarMass"; + this.numericBoxMolarMass.ReadOnly = true; + this.numericBoxMolarMass.RestrictLimitValue = false; + this.numericBoxMolarMass.SkipEventDuringInput = false; + this.numericBoxMolarMass.SmartIncrement = true; + this.numericBoxMolarMass.TextBoxBackColor = System.Drawing.SystemColors.Control; + this.numericBoxMolarMass.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + // // numericBoxDensity // resources.ApplyResources(this.numericBoxDensity, "numericBoxDensity"); this.numericBoxDensity.BackColor = System.Drawing.Color.Transparent; this.numericBoxDensity.DecimalPlaces = 4; - this.numericBoxDensity.Name = "numericBoxDensity"; - this.numericBoxDensity.RadianValue = 0D; + this.numericBoxDensity.Name = "numericBoxDensity"; this.numericBoxDensity.ReadOnly = true; - this.numericBoxDensity.RestrictLimitValue = true; this.numericBoxDensity.SkipEventDuringInput = false; this.numericBoxDensity.SmartIncrement = true; this.numericBoxDensity.TextBoxBackColor = System.Drawing.SystemColors.Control; - this.numericBoxDensity.ThonsandsSeparator = true; - // + this.numericBoxDensity.ThonsandsSeparator = true; + // // colorControl // this.colorControl.Argb = -986896; @@ -318,12 +356,43 @@ private void InitializeComponent() this.colorControl.Red = 240; this.colorControl.RedF = 0.9411765F; // + // panel1 + // + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Controls.Add(this.textBoxFormula); + this.panel1.Controls.Add(this.numericBoxZnumber); + this.panel1.Controls.Add(this.label90); + this.panel1.Name = "panel1"; + // + // textBoxFormula + // + resources.ApplyResources(this.textBoxFormula, "textBoxFormula"); + this.textBoxFormula.Name = "textBoxFormula"; + this.textBoxFormula.ReadOnly = true; + // + // numericBoxZnumber + // + resources.ApplyResources(this.numericBoxZnumber, "numericBoxZnumber"); + this.numericBoxZnumber.BackColor = System.Drawing.Color.Transparent; + this.numericBoxZnumber.Name = "numericBoxZnumber"; + this.numericBoxZnumber.ReadOnly = true; + this.numericBoxZnumber.SkipEventDuringInput = false; + this.numericBoxZnumber.SmartIncrement = true; + this.numericBoxZnumber.TextBoxBackColor = System.Drawing.SystemColors.Control; + this.numericBoxZnumber.ThonsandsSeparator = true; + // + // label90 + // + resources.ApplyResources(this.label90, "label90"); + this.label90.Name = "label90"; + // // symmetryControl // this.symmetryControl.CellConstants = ((System.ValueTuple)(resources.GetObject("symmetryControl.CellConstants"))); this.symmetryControl.CellConstantsErr = ((System.ValueTuple)(resources.GetObject("symmetryControl.CellConstantsErr"))); resources.ApplyResources(this.symmetryControl, "symmetryControl"); this.symmetryControl.Name = "symmetryControl"; + this.symmetryControl.ShowError = false; this.symmetryControl.SkipEvent = false; this.symmetryControl.SymmetrySeriesNumber = 0; this.symmetryControl.ItemChanged += new System.EventHandler(this.symmetryControl_ItemChanged); @@ -340,6 +409,18 @@ private void InitializeComponent() // this.atomControl.Alpha = 0F; this.atomControl.Ambient = 0F; + this.atomControl.Aniso11 = 0D; + this.atomControl.Aniso11Err = 0D; + this.atomControl.Aniso12 = 0D; + this.atomControl.Aniso12Err = 0D; + this.atomControl.Aniso13 = 0D; + this.atomControl.Aniso13Err = 0D; + this.atomControl.Aniso22 = 0D; + this.atomControl.Aniso22Err = 0D; + this.atomControl.Aniso23 = 0D; + this.atomControl.Aniso23Err = 0D; + this.atomControl.Aniso33 = 0D; + this.atomControl.Aniso33Err = 0D; this.atomControl.AppearanceTabVisible = false; this.atomControl.AtomColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); this.atomControl.AtomicPositionError = false; @@ -347,28 +428,15 @@ private void InitializeComponent() this.atomControl.AtomSubNoElectron = -1; this.atomControl.AtomSubNoXray = -1; resources.ApplyResources(this.atomControl, "atomControl"); - this.atomControl.B11 = 0D; - this.atomControl.B11Err = 0D; - this.atomControl.B12 = 0D; - this.atomControl.B12Err = 0D; - this.atomControl.B13 = 0D; - this.atomControl.B13Err = 0D; - this.atomControl.B22 = 0D; - this.atomControl.B22Err = 0D; - this.atomControl.B23 = 0D; - this.atomControl.B23Err = 0D; - this.atomControl.B33 = 0D; - this.atomControl.B33Err = 0D; - this.atomControl.Biso = 0D; - this.atomControl.BisoErr = 0D; this.atomControl.Crystal = null; this.atomControl.DebyeWallerError = false; this.atomControl.DebyeWallerTabVisible = true; this.atomControl.Diffusion = 0F; this.atomControl.ElementAndPositionTabVisible = true; this.atomControl.Emission = 0F; + this.atomControl.Iso = 0D; + this.atomControl.IsoErr = 0D; this.atomControl.IsotopicComposition = null; - this.atomControl.Istoropy = false; this.atomControl.Label = ""; this.atomControl.Name = "atomControl"; this.atomControl.Occ = 0D; @@ -378,8 +446,11 @@ private void InitializeComponent() this.atomControl.ScatteringFactorTabVisible = true; this.atomControl.SelectedTabIndex = 0; this.atomControl.Shininess = 0F; + this.atomControl.ShowLabel = false; this.atomControl.SkipEvent = false; this.atomControl.Specular = 0F; + this.atomControl.UseIsotropy = false; + this.atomControl.UseTypeU = false; this.atomControl.X = 0D; this.atomControl.XErr = 0D; this.atomControl.Y = 0D; @@ -561,27 +632,27 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxEOS_C, "numericBoxEOS_C"); this.numericBoxEOS_C.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_C.DecimalPlaces = -1; - this.numericBoxEOS_C.Name = "numericBoxEOS_C"; - this.numericBoxEOS_C.RadianValue = 0D; + this.numericBoxEOS_C.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_C.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_C.Name = "numericBoxEOS_C"; this.numericBoxEOS_C.RestrictLimitValue = false; this.numericBoxEOS_C.SkipEventDuringInput = false; this.numericBoxEOS_C.SmartIncrement = true; this.numericBoxEOS_C.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_C.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); + this.numericBoxEOS_C.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // numericBoxEOS_B // resources.ApplyResources(this.numericBoxEOS_B, "numericBoxEOS_B"); this.numericBoxEOS_B.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_B.DecimalPlaces = -1; - this.numericBoxEOS_B.Name = "numericBoxEOS_B"; - this.numericBoxEOS_B.RadianValue = 0D; + this.numericBoxEOS_B.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_B.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_B.Name = "numericBoxEOS_B"; this.numericBoxEOS_B.RestrictLimitValue = false; this.numericBoxEOS_B.SkipEventDuringInput = false; this.numericBoxEOS_B.SmartIncrement = true; this.numericBoxEOS_B.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_B.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); + this.numericBoxEOS_B.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // textBox1 // @@ -601,40 +672,40 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxEOS_A, "numericBoxEOS_A"); this.numericBoxEOS_A.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_A.DecimalPlaces = -1; - this.numericBoxEOS_A.Name = "numericBoxEOS_A"; - this.numericBoxEOS_A.RadianValue = 0D; + this.numericBoxEOS_A.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_A.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_A.Name = "numericBoxEOS_A"; this.numericBoxEOS_A.RestrictLimitValue = false; this.numericBoxEOS_A.SkipEventDuringInput = false; this.numericBoxEOS_A.SmartIncrement = true; this.numericBoxEOS_A.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_A.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); + this.numericBoxEOS_A.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // numericBoxEOS_KperT // resources.ApplyResources(this.numericBoxEOS_KperT, "numericBoxEOS_KperT"); this.numericBoxEOS_KperT.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_KperT.DecimalPlaces = -1; - this.numericBoxEOS_KperT.Name = "numericBoxEOS_KperT"; - this.numericBoxEOS_KperT.RadianValue = 0D; + this.numericBoxEOS_KperT.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_KperT.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_KperT.Name = "numericBoxEOS_KperT"; this.numericBoxEOS_KperT.RestrictLimitValue = false; this.numericBoxEOS_KperT.SkipEventDuringInput = false; this.numericBoxEOS_KperT.SmartIncrement = true; this.numericBoxEOS_KperT.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_KperT.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); + this.numericBoxEOS_KperT.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // numericBoxEOS_Gamma0 // resources.ApplyResources(this.numericBoxEOS_Gamma0, "numericBoxEOS_Gamma0"); this.numericBoxEOS_Gamma0.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_Gamma0.DecimalPlaces = -1; - this.numericBoxEOS_Gamma0.Name = "numericBoxEOS_Gamma0"; - this.numericBoxEOS_Gamma0.RadianValue = 0D; + this.numericBoxEOS_Gamma0.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_Gamma0.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_Gamma0.Name = "numericBoxEOS_Gamma0"; this.numericBoxEOS_Gamma0.RestrictLimitValue = false; this.numericBoxEOS_Gamma0.SkipEventDuringInput = false; this.numericBoxEOS_Gamma0.SmartIncrement = true; this.numericBoxEOS_Gamma0.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_Gamma0.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); + this.numericBoxEOS_Gamma0.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // label76 // @@ -730,28 +801,29 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxEOS_Theta0, "numericBoxEOS_Theta0"); this.numericBoxEOS_Theta0.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_Theta0.DecimalPlaces = -1; - this.numericBoxEOS_Theta0.Name = "numericBoxEOS_Theta0"; + this.numericBoxEOS_Theta0.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_Theta0.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_Theta0.Name = "numericBoxEOS_Theta0"; this.numericBoxEOS_Theta0.RadianValue = 5.2359877559829888D; this.numericBoxEOS_Theta0.RestrictLimitValue = false; this.numericBoxEOS_Theta0.SkipEventDuringInput = false; this.numericBoxEOS_Theta0.SmartIncrement = true; this.numericBoxEOS_Theta0.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_Theta0.Value = 300D; + this.numericBoxEOS_Theta0.Value = 300D; this.numericBoxEOS_Theta0.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // numericBoxEOS_Q // resources.ApplyResources(this.numericBoxEOS_Q, "numericBoxEOS_Q"); this.numericBoxEOS_Q.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_Q.DecimalPlaces = -1; - this.numericBoxEOS_Q.Name = "numericBoxEOS_Q"; - this.numericBoxEOS_Q.RadianValue = 0D; + this.numericBoxEOS_Q.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_Q.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_Q.Name = "numericBoxEOS_Q"; this.numericBoxEOS_Q.RestrictLimitValue = false; this.numericBoxEOS_Q.SkipEventDuringInput = false; this.numericBoxEOS_Q.SmartIncrement = true; this.numericBoxEOS_Q.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_Q.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); + this.numericBoxEOS_Q.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // label3 // @@ -830,23 +902,17 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxEOS_V0perMol, "numericBoxEOS_V0perMol"); this.numericBoxEOS_V0perMol.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_V0perMol.DecimalPlaces = -1; - - - - - this.numericBoxEOS_V0perMol.Name = "numericBoxEOS_V0perMol"; + this.numericBoxEOS_V0perMol.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_V0perMol.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_V0perMol.Name = "numericBoxEOS_V0perMol"; this.numericBoxEOS_V0perMol.RadianValue = 5.2359877559829888D; this.numericBoxEOS_V0perMol.ReadOnly = true; this.numericBoxEOS_V0perMol.RestrictLimitValue = false; - this.numericBoxEOS_V0perMol.SkipEventDuringInput = false; this.numericBoxEOS_V0perMol.SmartIncrement = true; this.numericBoxEOS_V0perMol.TextBoxBackColor = System.Drawing.SystemColors.Control; this.numericBoxEOS_V0perMol.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_V0perMol.UpDown_Increment = 1D; this.numericBoxEOS_V0perMol.Value = 300D; - this.numericBoxEOS_V0perMol.WordWrap = true; this.numericBoxEOS_V0perMol.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_V0perMol_ValueChanged); this.numericBoxEOS_V0perMol.Click2 += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_V0perMol_Click2); // @@ -854,14 +920,15 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxEOS_V0perCell, "numericBoxEOS_V0perCell"); this.numericBoxEOS_V0perCell.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_V0perCell.DecimalPlaces = -1; - this.numericBoxEOS_V0perCell.Name = "numericBoxEOS_V0perCell"; + this.numericBoxEOS_V0perCell.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_V0perCell.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_V0perCell.Name = "numericBoxEOS_V0perCell"; this.numericBoxEOS_V0perCell.RadianValue = 5.2359877559829888D; this.numericBoxEOS_V0perCell.RestrictLimitValue = false; this.numericBoxEOS_V0perCell.SkipEventDuringInput = false; this.numericBoxEOS_V0perCell.SmartIncrement = true; this.numericBoxEOS_V0perCell.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_V0perCell.Value = 300D; + this.numericBoxEOS_V0perCell.Value = 300D; this.numericBoxEOS_V0perCell.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); this.numericBoxEOS_V0perCell.Click2 += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_V0perCell_Click2); // @@ -869,14 +936,14 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxEOS_KT0, "numericBoxEOS_KT0"); this.numericBoxEOS_KT0.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_KT0.DecimalPlaces = -1; - this.numericBoxEOS_KT0.Name = "numericBoxEOS_KT0"; - this.numericBoxEOS_KT0.RadianValue = 0D; + this.numericBoxEOS_KT0.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_KT0.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_KT0.Name = "numericBoxEOS_KT0"; this.numericBoxEOS_KT0.RestrictLimitValue = false; this.numericBoxEOS_KT0.SkipEventDuringInput = false; this.numericBoxEOS_KT0.SmartIncrement = true; this.numericBoxEOS_KT0.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_KT0.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); + this.numericBoxEOS_KT0.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // label70 // @@ -907,14 +974,15 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxEOS_KprimeT0, "numericBoxEOS_KprimeT0"); this.numericBoxEOS_KprimeT0.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_KprimeT0.DecimalPlaces = -1; - this.numericBoxEOS_KprimeT0.Name = "numericBoxEOS_KprimeT0"; + this.numericBoxEOS_KprimeT0.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_KprimeT0.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_KprimeT0.Name = "numericBoxEOS_KprimeT0"; this.numericBoxEOS_KprimeT0.RadianValue = 0.069813170079773182D; this.numericBoxEOS_KprimeT0.RestrictLimitValue = false; this.numericBoxEOS_KprimeT0.SkipEventDuringInput = false; this.numericBoxEOS_KprimeT0.SmartIncrement = true; this.numericBoxEOS_KprimeT0.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxEOS_KprimeT0.Value = 4D; + this.numericBoxEOS_KprimeT0.Value = 4D; this.numericBoxEOS_KprimeT0.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // radioButtonVinet @@ -937,34 +1005,28 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxEOS_T0, "numericBoxEOS_T0"); this.numericBoxEOS_T0.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxEOS_T0.DecimalPlaces = -1; - this.numericBoxEOS_T0.Name = "numericBoxEOS_T0"; + this.numericBoxEOS_T0.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_T0.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxEOS_T0.Name = "numericBoxEOS_T0"; this.numericBoxEOS_T0.RadianValue = 5.2359877559829888D; this.numericBoxEOS_T0.RestrictLimitValue = false; this.numericBoxEOS_T0.SkipEventDuringInput = false; this.numericBoxEOS_T0.SmartIncrement = true; - this.numericBoxEOS_T0.Value = 300D; + this.numericBoxEOS_T0.Value = 300D; this.numericBoxEOS_T0.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // numericBoxTemperature // resources.ApplyResources(this.numericBoxTemperature, "numericBoxTemperature"); this.numericBoxTemperature.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxTemperature.DecimalPlaces = -1; - - - - - this.numericBoxTemperature.Name = "numericBoxTemperature"; + this.numericBoxTemperature.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxTemperature.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxTemperature.Name = "numericBoxTemperature"; this.numericBoxTemperature.RadianValue = 5.2359877559829888D; - this.numericBoxTemperature.RestrictLimitValue = false; - this.numericBoxTemperature.SkipEventDuringInput = false; this.numericBoxTemperature.SmartIncrement = true; - this.numericBoxTemperature.UpDown_Increment = 1D; this.numericBoxTemperature.Value = 300D; - this.numericBoxTemperature.WordWrap = true; this.numericBoxTemperature.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxEOS_State_ValueChanged); // // numericBoxPressure @@ -972,14 +1034,15 @@ private void InitializeComponent() resources.ApplyResources(this.numericBoxPressure, "numericBoxPressure"); this.numericBoxPressure.BackColor = System.Drawing.SystemColors.Control; this.numericBoxPressure.DecimalPlaces = 5; - this.numericBoxPressure.Name = "numericBoxPressure"; - this.numericBoxPressure.RadianValue = 0D; + this.numericBoxPressure.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxPressure.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxPressure.Name = "numericBoxPressure"; this.numericBoxPressure.ReadOnly = true; this.numericBoxPressure.RestrictLimitValue = false; this.numericBoxPressure.SkipEventDuringInput = false; this.numericBoxPressure.SmartIncrement = true; this.numericBoxPressure.TextBoxBackColor = System.Drawing.SystemColors.Control; - // + // // tabPageElasticity // this.tabPageElasticity.BackColor = System.Drawing.SystemColors.Control; @@ -1034,22 +1097,15 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxHill, "numericBoxHill"); this.numericBoxHill.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxHill.DecimalPlaces = -1; - - - - - this.numericBoxHill.Name = "numericBoxHill"; + this.numericBoxHill.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxHill.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxHill.Name = "numericBoxHill"; this.numericBoxHill.RadianValue = 0.017453292519943295D; - this.numericBoxHill.RestrictLimitValue = false; - this.numericBoxHill.SkipEventDuringInput = false; this.numericBoxHill.SmartIncrement = true; this.numericBoxHill.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxHill.UpDown_Increment = 1D; this.numericBoxHill.Value = 1D; - this.numericBoxHill.WordWrap = true; // // label116 // @@ -1135,241 +1191,145 @@ private void InitializeComponent() // resources.ApplyResources(this.numericBoxStress33, "numericBoxStress33"); this.numericBoxStress33.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStress33.DecimalPlaces = -1; - - - - - this.numericBoxStress33.Name = "numericBoxStress33"; - this.numericBoxStress33.RadianValue = 0D; - + this.numericBoxStress33.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress33.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress33.Name = "numericBoxStress33"; this.numericBoxStress33.RestrictLimitValue = false; - this.numericBoxStress33.SkipEventDuringInput = false; this.numericBoxStress33.SmartIncrement = true; this.numericBoxStress33.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStress33.UpDown_Increment = 1D; - this.numericBoxStress33.WordWrap = true; // // numericBoxStress22 // resources.ApplyResources(this.numericBoxStress22, "numericBoxStress22"); this.numericBoxStress22.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStress22.DecimalPlaces = -1; - - - - - this.numericBoxStress22.Name = "numericBoxStress22"; - this.numericBoxStress22.RadianValue = 0D; - + this.numericBoxStress22.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress22.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress22.Name = "numericBoxStress22"; this.numericBoxStress22.RestrictLimitValue = false; - this.numericBoxStress22.SkipEventDuringInput = false; this.numericBoxStress22.SmartIncrement = true; this.numericBoxStress22.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStress22.UpDown_Increment = 1D; - this.numericBoxStress22.WordWrap = true; // // numericBoxStress11 // resources.ApplyResources(this.numericBoxStress11, "numericBoxStress11"); this.numericBoxStress11.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStress11.DecimalPlaces = -1; - - - - - this.numericBoxStress11.Name = "numericBoxStress11"; - this.numericBoxStress11.RadianValue = 0D; - + this.numericBoxStress11.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress11.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress11.Name = "numericBoxStress11"; this.numericBoxStress11.RestrictLimitValue = false; - this.numericBoxStress11.SkipEventDuringInput = false; this.numericBoxStress11.SmartIncrement = true; this.numericBoxStress11.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStress11.UpDown_Increment = 1D; - this.numericBoxStress11.WordWrap = true; // // numericBoxStress23 // resources.ApplyResources(this.numericBoxStress23, "numericBoxStress23"); this.numericBoxStress23.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStress23.DecimalPlaces = -1; - - - - - this.numericBoxStress23.Name = "numericBoxStress23"; - this.numericBoxStress23.RadianValue = 0D; - + this.numericBoxStress23.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress23.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress23.Name = "numericBoxStress23"; this.numericBoxStress23.RestrictLimitValue = false; - this.numericBoxStress23.SkipEventDuringInput = false; this.numericBoxStress23.SmartIncrement = true; this.numericBoxStress23.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStress23.UpDown_Increment = 1D; - this.numericBoxStress23.WordWrap = true; // // numericBoxStress13 // resources.ApplyResources(this.numericBoxStress13, "numericBoxStress13"); this.numericBoxStress13.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStress13.DecimalPlaces = -1; - - - - - this.numericBoxStress13.Name = "numericBoxStress13"; - this.numericBoxStress13.RadianValue = 0D; - + this.numericBoxStress13.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress13.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress13.Name = "numericBoxStress13"; this.numericBoxStress13.RestrictLimitValue = false; - this.numericBoxStress13.SkipEventDuringInput = false; this.numericBoxStress13.SmartIncrement = true; this.numericBoxStress13.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStress13.UpDown_Increment = 1D; - this.numericBoxStress13.WordWrap = true; // // numericBoxStress12 // resources.ApplyResources(this.numericBoxStress12, "numericBoxStress12"); this.numericBoxStress12.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStress12.DecimalPlaces = -1; - - - - - this.numericBoxStress12.Name = "numericBoxStress12"; - this.numericBoxStress12.RadianValue = 0D; - + this.numericBoxStress12.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress12.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStress12.Name = "numericBoxStress12"; this.numericBoxStress12.RestrictLimitValue = false; - this.numericBoxStress12.SkipEventDuringInput = false; this.numericBoxStress12.SmartIncrement = true; this.numericBoxStress12.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStress12.UpDown_Increment = 1D; - this.numericBoxStress12.WordWrap = true; // // numericBoxStrain33 // resources.ApplyResources(this.numericBoxStrain33, "numericBoxStrain33"); this.numericBoxStrain33.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStrain33.DecimalPlaces = -1; - - - - - this.numericBoxStrain33.Name = "numericBoxStrain33"; - this.numericBoxStrain33.RadianValue = 0D; - + this.numericBoxStrain33.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain33.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain33.Name = "numericBoxStrain33"; this.numericBoxStrain33.RestrictLimitValue = false; - this.numericBoxStrain33.SkipEventDuringInput = false; this.numericBoxStrain33.SmartIncrement = true; this.numericBoxStrain33.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStrain33.UpDown_Increment = 1D; - this.numericBoxStrain33.WordWrap = true; // // numericBoxStrain11 // resources.ApplyResources(this.numericBoxStrain11, "numericBoxStrain11"); this.numericBoxStrain11.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStrain11.DecimalPlaces = -1; - - - - - this.numericBoxStrain11.Name = "numericBoxStrain11"; - this.numericBoxStrain11.RadianValue = 0D; - + this.numericBoxStrain11.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain11.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain11.Name = "numericBoxStrain11"; this.numericBoxStrain11.RestrictLimitValue = false; - this.numericBoxStrain11.SkipEventDuringInput = false; this.numericBoxStrain11.SmartIncrement = true; this.numericBoxStrain11.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStrain11.UpDown_Increment = 1D; - this.numericBoxStrain11.WordWrap = true; // // numericBoxStrain22 // resources.ApplyResources(this.numericBoxStrain22, "numericBoxStrain22"); this.numericBoxStrain22.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStrain22.DecimalPlaces = -1; - - - - - this.numericBoxStrain22.Name = "numericBoxStrain22"; - this.numericBoxStrain22.RadianValue = 0D; - + this.numericBoxStrain22.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain22.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain22.Name = "numericBoxStrain22"; this.numericBoxStrain22.RestrictLimitValue = false; - this.numericBoxStrain22.SkipEventDuringInput = false; this.numericBoxStrain22.SmartIncrement = true; this.numericBoxStrain22.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStrain22.UpDown_Increment = 1D; - this.numericBoxStrain22.WordWrap = true; // // numericBoxStrain12 // resources.ApplyResources(this.numericBoxStrain12, "numericBoxStrain12"); this.numericBoxStrain12.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStrain12.DecimalPlaces = -1; - - - - - this.numericBoxStrain12.Name = "numericBoxStrain12"; - this.numericBoxStrain12.RadianValue = 0D; - + this.numericBoxStrain12.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain12.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain12.Name = "numericBoxStrain12"; this.numericBoxStrain12.RestrictLimitValue = false; - this.numericBoxStrain12.SkipEventDuringInput = false; this.numericBoxStrain12.SmartIncrement = true; this.numericBoxStrain12.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStrain12.UpDown_Increment = 1D; - this.numericBoxStrain12.WordWrap = true; // // numericBoxStrain23 // resources.ApplyResources(this.numericBoxStrain23, "numericBoxStrain23"); this.numericBoxStrain23.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStrain23.DecimalPlaces = -1; - - - - - this.numericBoxStrain23.Name = "numericBoxStrain23"; - this.numericBoxStrain23.RadianValue = 0D; - + this.numericBoxStrain23.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain23.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain23.Name = "numericBoxStrain23"; this.numericBoxStrain23.RestrictLimitValue = false; - this.numericBoxStrain23.SkipEventDuringInput = false; this.numericBoxStrain23.SmartIncrement = true; this.numericBoxStrain23.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStrain23.UpDown_Increment = 1D; - this.numericBoxStrain23.WordWrap = true; // // numericBoxStrain13 // resources.ApplyResources(this.numericBoxStrain13, "numericBoxStrain13"); this.numericBoxStrain13.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxStrain13.DecimalPlaces = -1; - - - - - this.numericBoxStrain13.Name = "numericBoxStrain13"; - this.numericBoxStrain13.RadianValue = 0D; - + this.numericBoxStrain13.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain13.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxStrain13.Name = "numericBoxStrain13"; this.numericBoxStrain13.RestrictLimitValue = false; - this.numericBoxStrain13.SkipEventDuringInput = false; this.numericBoxStrain13.SmartIncrement = true; this.numericBoxStrain13.TextFont = new System.Drawing.Font("Arial Narrow", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericBoxStrain13.UpDown_Increment = 1D; - this.numericBoxStrain13.WordWrap = true; // // tabPagePolycrystalline // @@ -1659,17 +1619,6 @@ private void InitializeComponent() resources.ApplyResources(this.strainControlToolStripMenuItem, "strainControlToolStripMenuItem"); this.strainControlToolStripMenuItem.Click += new System.EventHandler(this.strainControlToolStripMenuItem_Click); // - // textBoxFormula - // - resources.ApplyResources(this.textBoxFormula, "textBoxFormula"); - this.textBoxFormula.Name = "textBoxFormula"; - this.textBoxFormula.ReadOnly = true; - // - // label90 - // - resources.ApplyResources(this.label90, "label90"); - this.label90.Name = "label90"; - // // textBoxName // resources.ApplyResources(this.textBoxName, "textBoxName"); @@ -1701,8 +1650,6 @@ private void InitializeComponent() // // panel4 // - this.panel4.Controls.Add(this.textBoxFormula); - this.panel4.Controls.Add(this.label90); this.panel4.Controls.Add(this.textBoxName); this.panel4.Controls.Add(this.label22); this.panel4.Controls.Add(this.buttonReset); @@ -1727,8 +1674,11 @@ private void InitializeComponent() this.tabControl.ResumeLayout(false); this.tabPageBasicInfo.ResumeLayout(false); this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); this.flowLayoutPanel4.ResumeLayout(false); this.flowLayoutPanel4.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.tabPageAtom.ResumeLayout(false); this.tabPageAtom.PerformLayout(); this.panelAtom.ResumeLayout(false); @@ -1933,5 +1883,9 @@ private void InitializeComponent() private NumericBox numericBoxZnumber; private NumericBox numericBoxDensity; public SymmetryControl symmetryControl; + private System.Windows.Forms.Panel panel1; + private NumericBox numericBoxMolarVolume; + private NumericBox numericBoxCellMass; + private NumericBox numericBoxMolarMass; } } \ No newline at end of file diff --git a/Crystallography.Controls/Crystal/CrystalControl.cs b/Crystallography.Controls/Crystal/CrystalControl.cs index 195fed3..ab5cc1d 100644 --- a/Crystallography.Controls/Crystal/CrystalControl.cs +++ b/Crystallography.Controls/Crystal/CrystalControl.cs @@ -1,6 +1,5 @@ サソusing MathNet.Numerics.LinearAlgebra.Double; using System; -using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.IO; @@ -246,8 +245,12 @@ public void SetToInterface(bool ChangeCellParameter = true) numericBoxDensity.Value = Crystal.Density; numericBoxVolume.Value = Crystal.Volume * 1000; + numericBoxMolarVolume.Value = Crystal.Volume * UniversalConstants.A / Crystal.ChemicalFormulaZ * 1E-21; numericBoxZnumber.Value = Crystal.ChemicalFormulaZ; + numericBoxMolarMass.Value = numericBoxDensity.Value * numericBoxMolarVolume.Value; + numericBoxCellMass.Value = numericBoxDensity.Value * numericBoxVolume.Value; + SymmetrySeriesNumber = Crystal.SymmetrySeriesNumber;//SymmetrySeriesNumber繧偵ヵ繧」繝シ繝ォ繝峨°繧峨励Ο繝代ユ繧」縺ォ螟画峩縲Tet{}縺ョ謇縺ァ繧ウ繝ウ繝懊懊ャ繧ッ繧ケ繧偵そ繝繝医☆繧九(20170526) if (ChangeCellParameter) @@ -313,8 +316,16 @@ public void FormCrystal_DragDrop(object sender, DragEventArgs e) string[] fileName = (string[])e.Data.GetData(DataFormats.FileDrop, false); if (fileName.Length == 1) { - try { Crystal = ConvertCrystalData.ConvertToCrystal(fileName[0]); } - catch { return; } + try { + Crystal = ConvertCrystalData.ConvertToCrystal(fileName[0]); + } + catch (Exception ex) + { +#if DEBUG + MessageBox.Show(ex.ToString()); +#endif + return; + } } } @@ -325,7 +336,6 @@ private void FormCrystal_DragEnter(object sender, DragEventArgs e) #endregion 繝峨Λ繝繧ー繝峨Ο繝繝励う繝吶Φ繝 - private void buttonReset_Click(object sender, EventArgs e) => Crystal = new Crystal(); #region 蜿ウ繧ッ繝ェ繝繧ッ繝。繝九Η繝シ @@ -374,7 +384,7 @@ private void sendThisCrystalToOtherSoftwareToolStripMenuItem_Click(object sender private void resetToolStripMenuItem_Click(object sender, EventArgs e) { for (int i = 0; i < crystal.Atoms.Length; i++) - crystal.Atoms[i].Dsf = new DiffuseScatteringFactor(true, 0, 0, 0, 0, 0, 0, 0); + crystal.Atoms[i].Dsf = new DiffuseScatteringFactor(DiffuseScatteringFactor.Type.B, true, 0, 0, null, null, Crystal.CellValue); } #endregion 蜿ウ繧ッ繝ェ繝繧ッ繝。繝九Η繝シ diff --git a/Crystallography.Controls/Crystal/CrystalControl.ja.resx b/Crystallography.Controls/Crystal/CrystalControl.ja.resx index 70443c1..d06cc4d 100644 --- a/Crystallography.Controls/Crystal/CrystalControl.ja.resx +++ b/Crystallography.Controls/Crystal/CrystalControl.ja.resx @@ -118,97 +118,86 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 462, 402 - - - 譬シ蟄/蟇セ遘ー諤ァ - - + 繝。繧、繝ェ繧ェ, 9pt - - - 2, 2, 2, 2 - - - 462, 402 + + 蜊倅ス肴シ蟄蝉ス鍋ゥ - - 蜴溷ュ先ュ蝣ア + + 189, 27 - - 2, 2, 2, 2 + + テ10^-24 g - - 462, 402 + + 繝。繧、繝ェ繧ェ, 9pt - - 螟夐擇菴/邨仙粋謠冗判險ュ螳 + + 蜊倅ス肴シ蟄占ウェ驥 - - 462, 402 + + 209, 4 - - 蠑慕畑譁迪ョ + + 1000, 27 - - 462, 402 + + 239, 27 - - 迥カ諷区婿遞句シ + + 繝。繧、繝ェ繧ェ, 9pt - - 462, 402 + + 繝「繝ォ菴鍋ゥ - - 蠑セ諤ァ螳壽焚 + + 198, 27 - - 462, 402 + + 繝。繧、繝ェ繧ェ, 9pt - - 462, 348 + + 繝「繝ォ菴鍋ゥ - - 462, 27 + + 218, 31 - - 462, 27 + + 179, 27 - - 462, 402 + + 繝。繧、繝ェ繧ェ, 9pt - - 462, 402 + + 蟇蠎ヲ - - 462, 402 + + 148, 25 - + 繝。繧、繝ェ繧ェ, 9pt - - 0, 22 + + 繝励Ο繝輔ぃ繧、繝ォ縺ョ濶イ - - 0, 24 + + 168, 61 - - 3, 1 + + 124, 20 - - - True + + 0, 178 - - 470, 432 + + 456, 214 - - 456, 396 + + 71, 3 - - 456, 217 + + 286, 39 繝。繧、繝ェ繧ェ, 9pt @@ -219,89 +208,99 @@ Z謨ー - - 1000, 27 + + 363, 0 - 106, 27 - - - 繝。繧、繝ェ繧ェ, 9pt + 93, 25 - - 蜊倅ス肴シ蟄蝉ス鍋ゥ - - - 1000, 27 - - - 189, 27 - - - 繝。繧、繝ェ繧ェ, 9pt - - - 蟇蠎ヲ + + 繝。繧、繝ェ繧ェ, 9.75pt - - 10, 27 + + 6, 3 - - 1000, 27 + + 65, 22 - - 148, 27 + + 蛹門ュヲ邨謌 - - 繝。繧、繝ェ繧ェ, 9pt + + 456, 42 - - 繝励Ο繝輔ぃ繧、繝ォ縺ョ濶イ + + 456, 136 - - 168, 30 + + 456, 392 - - 124, 20 + + 462, 398 - - 456, 179 + + 譬シ蟄/蟇セ遘ー諤ァ 2, 2 - 458, 398 + 458, 394 2, 2 + + 繝。繧、繝ェ繧ェ, 9pt + + + + 2, 2, 2, 2 + + + 462, 398 + + + 蜴溷ュ先ュ蝣ア + 2, 2 - 458, 398 + 458, 394 - - 350, 284 + + 2, 2, 2, 2 - - 繧ソ繧、繝医Ν + + 462, 398 + + + 螟夐擇菴/邨仙粋謠冗判險ュ螳 繝。繧、繝ェ繧ェ, 9pt - 344, 260 + 344, 256 + + + 350, 280 + + + 繧ソ繧、繝医Ν + + + 100, 256 - 106, 284 + 106, 280 闡苓 - - 100, 260 + + 450, 31 456, 55 @@ -309,14 +308,17 @@ 髮題ェ悟錐 - - 450, 31 + + 450, 33 456, 57 - - 450, 33 + + 462, 398 + + + 蠑慕畑譁迪ョ 209, 25 @@ -324,173 +326,32 @@ 77, 22 - - 1000, 24 - - - 54, 24 - - - 1000, 24 - - - 54, 24 - - - 1000, 24 - - - 54, 24 - - - 1000, 24 - - - 62, 24 - - - 1000, 24 - - - 40, 24 - - - 1000, 24 - - - 35, 24 - - - 1000, 24 - - - 38, 24 - - - 1000, 24 - - - 60, 24 - - - 1000, 24 - - - 60, 24 - - - 1000, 24 - - - 57, 24 - 6, 37 - - 1000, 24 - - - 40, 24 - - - 1000, 27 - - - 100, 27 - - - 1000, 27 - - - 88, 27 - - - 1000, 27 - - - 132, 27 - - - 1000, 24 - - - 47, 24 - - - 1000, 24 - - - 47, 24 - - - 1000, 24 - - - 47, 24 - - - 1000, 24 - - - 47, 24 - - - 1000, 24 - - - 47, 24 - - - 1000, 24 + + 462, 398 - - 47, 24 + + 迥カ諷区婿遞句シ - - 1000, 24 + + 462, 398 - - 47, 24 + + 蠑セ諤ァ螳壽焚 120, 123 - - 1000, 24 - - - 47, 24 - - - 1000, 24 - - - 47, 24 - - - 1000, 24 - - - 47, 24 - - - 1000, 24 - - - 47, 24 - - - 1000, 24 - - - 47, 24 + + 462, 398 - - 1000, 24 + + 462, 344 - - 47, 24 + + 462, 27 繝。繧、繝ェ繧ェ, 9pt @@ -513,38 +374,51 @@ 358, 4 + + 462, 27 + + + 462, 398 + - 456, 396 + 456, 392 + + + 462, 398 - 456, 396 + 456, 392 - - Strain control + + 462, 398 - - 257, 0 + + 繝。繧、繝ェ繧ェ, 9pt - - 147, 22 + + 0, 22 - - 繝。繧、繝ェ繧ェ, 9.75pt + + 0, 28 - - 192, 0 + + 3, 1 - - 65, 22 + + + True - - 蛹門ュヲ邨謌 + + 470, 428 + + + Strain control 48, 0 - 144, 25 + 356, 25 繝。繧、繝ェ繧ェ, 9.75pt @@ -565,7 +439,7 @@ 0, 0, 0, 0 - 66, 22 + 66, 26 繝ェ繧サ繝繝 @@ -574,7 +448,7 @@ 470, 0 - 470, 24 + 470, 28 470, 456 diff --git a/Crystallography.Controls/Crystal/CrystalControl.resx b/Crystallography.Controls/Crystal/CrystalControl.resx index 2288aad..a8a65bf 100644 --- a/Crystallography.Controls/Crystal/CrystalControl.resx +++ b/Crystallography.Controls/Crystal/CrystalControl.resx @@ -118,121 +118,187 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + GrowAndShrink - + Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt + + 邃ォ^3 - - 0, 0, 0, 0 + + Cell Volume - - + + 10, 4 - + + 10, 0, 0, 0 + + + 1000, 27 + + + 1, 25 + + + 0, 0, 1, 0 + + + 185, 27 + + + + 90 + + + numericBoxVolume + + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null + + + flowLayoutPanel4 + + + 0 + + + GrowAndShrink + + Segoe UI Symbol, 9.75pt - - Z number + + テ 10^-24 g - - 0, 0 + + Cell Mass - - 0, 0, 0, 0 + + 205, 4 - + + 10, 0, 0, 0 + + 1000, 27 - + 1, 25 - + 0, 0, 1, 0 - - 106, 27 + + 234, 27 - - - 95 + + 90 - - + + numericBoxCellMass - - numericBoxZnumber + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null - - + flowLayoutPanel4 - - 0 + + 1 - + GrowAndShrink - + Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt + + cm^3/mol - - 0, 0, 0, 0 + + Molar Volume - - 邃ォ^3 + + 10, 31 - + + 10, 0, 0, 0 + + + 1000, 27 + + + 1, 25 + + + 0, 0, 1, 0 + + + 233, 27 + + + 90 + + + numericBoxMolarVolume + + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null + + + flowLayoutPanel4 + + + 2 + + + GrowAndShrink + + Segoe UI Symbol, 9.75pt - - Cell Volume + + g/mol - - 116, 0 + + Molar Mass - + + 253, 31 + + 10, 0, 0, 0 - + 1000, 27 - + 1, 25 - + 0, 0, 1, 0 - - 173, 27 + + 194, 27 - + 90 - - + + numericBoxMolarMass - - numericBoxVolume - - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null - + flowLayoutPanel4 - - 1 + + 3 GrowAndShrink @@ -240,29 +306,20 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - g/cm^3 - - Segoe UI Symbol, 9.75pt - Density - 299, 0 + 10, 58 10, 0, 0, 0 - 1000, 27 + 1000, 25 1, 25 @@ -271,25 +328,22 @@ 0, 0, 1, 0 - 163, 27 + 163, 25 95 - - - numericBoxDensity - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null flowLayoutPanel4 - 2 + 4 True @@ -319,7 +373,7 @@ Profile color - 10, 30 + 183, 61 10, 3, 3, 3 @@ -337,25 +391,28 @@ colorControl - Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null flowLayoutPanel4 - 3 + 5 Fill - 0, 179 + 0, 180 4, 4, 4, 4 + + 0, 4, 0, 0 + - 546, 182 + 562, 181 94 @@ -372,6 +429,153 @@ 0 + + True + + + Top, Left, Right + + + Segoe UI Symbol, 9.75pt + + + 59, 3 + + + 0, 3, 0, 0 + + + True + + + Vertical + + + 406, 41 + + + 76 + + + textBoxFormula + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 0 + + + Top, Right + + + GrowAndShrink + + + Segoe UI Symbol, 9.75pt + + + Z number + + + 469, 0 + + + 0, 0, 0, 0 + + + 1000, 25 + + + 1, 25 + + + 0, 0, 1, 0 + + + 89, 25 + + + 95 + + + numericBoxZnumber + + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null + + + panel1 + + + 1 + + + True + + + Segoe UI Symbol, 9.75pt + + + NoControl + + + 0, 3 + + + 0, 0, 0, 0 + + + 4, 2, 0, 0 + + + 59, 19 + + + 85 + + + Formula + + + label90 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 2 + + + Top + + + 0, 136 + + + 562, 44 + + + 98 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel5 + + + 1 + AAEAAAD/////AQAAAAAAAAAMAgAAAOsEbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u @@ -418,7 +622,7 @@ 3, 11, 3, 11 - 546, 179 + 562, 136 93 @@ -427,13 +631,13 @@ symmetryControl - Crystallography.Controls.SymmetryControl, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.SymmetryControl, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null panel5 - 1 + 2 Fill @@ -445,7 +649,7 @@ 2, 2, 2, 2 - 546, 361 + 562, 361 93 @@ -469,7 +673,7 @@ 3, 3, 3, 3 - 552, 367 + 568, 367 4 @@ -511,7 +715,7 @@ 446, 108 - 552, 367 + 568, 367 0 @@ -520,7 +724,7 @@ atomControl - Crystallography.Controls.AtomControl, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.AtomControl, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageAtom @@ -619,7 +823,7 @@ 0, 0, 0, 0 - 552, 367 + 568, 367 0 @@ -658,7 +862,7 @@ 0, 0, 0, 0 - 552, 367 + 568, 367 0 @@ -667,7 +871,7 @@ bondControl - Crystallography.Controls.BondInputControl, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.BondInputControl, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageBondsPolyhedra @@ -679,7 +883,7 @@ 4, 26 - 552, 367 + 568, 367 3 @@ -715,7 +919,7 @@ Vertical - 434, 225 + 450, 225 0 @@ -739,7 +943,7 @@ 109, 115 - 440, 249 + 456, 249 3 @@ -835,7 +1039,7 @@ Vertical - 540, 31 + 556, 31 0 @@ -859,7 +1063,7 @@ 3, 60 - 546, 55 + 562, 55 1 @@ -892,7 +1096,7 @@ True - 540, 33 + 556, 33 0 @@ -916,7 +1120,7 @@ 3, 3 - 546, 57 + 562, 57 0 @@ -943,7 +1147,7 @@ 3, 3, 3, 3 - 552, 367 + 568, 367 1 @@ -1053,21 +1257,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 168, 83 @@ -1089,14 +1278,11 @@ 9 - - - numericBoxEOS_C - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox3 @@ -1110,21 +1296,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 168, 62 @@ -1146,14 +1317,11 @@ 8 - - - numericBoxEOS_B - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox3 @@ -1230,21 +1398,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 168, 41 @@ -1266,14 +1419,11 @@ 7 - - - numericBoxEOS_A - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox3 @@ -1287,21 +1437,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 33, 82 @@ -1323,14 +1458,11 @@ 6 - - - numericBoxEOS_KperT - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox3 @@ -1344,21 +1476,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 125, 15 @@ -1380,14 +1497,11 @@ 2 - - - numericBoxEOS_Gamma0 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox3 @@ -1992,21 +2106,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 187, 15 @@ -2028,14 +2127,11 @@ 3 - - - numericBoxEOS_Theta0 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox3 @@ -2049,21 +2145,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 250, 15 @@ -2085,14 +2166,11 @@ 4 - - - numericBoxEOS_Q - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox3 @@ -2418,21 +2496,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 34, 53 @@ -2454,14 +2517,11 @@ 1 - - - numericBoxEOS_V0perMol - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox2 @@ -2475,21 +2535,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 34, 31 @@ -2511,14 +2556,11 @@ 0 - - - numericBoxEOS_V0perCell - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox2 @@ -2532,21 +2574,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 40, 77 @@ -2568,14 +2595,11 @@ 2 - - - numericBoxEOS_KT0 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox2 @@ -2754,21 +2778,6 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 40, 100 @@ -2790,14 +2799,11 @@ 3 - - - numericBoxEOS_KprimeT0 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null groupBox2 @@ -2898,18 +2904,9 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - K - - Segoe UI Symbol, 9.75pt - T0 @@ -2920,7 +2917,7 @@ 3, 4, 3, 4 - 1000, 27 + 1000, 25 1, 25 @@ -2929,19 +2926,16 @@ 1, 1, 1, 1 - 100, 27 + 100, 25 - 0 - - - + 0 numericBoxEOS_T0 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageEOS @@ -2955,18 +2949,9 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - K - - Segoe UI Symbol, 9.75pt - T @@ -2977,7 +2962,7 @@ 3, 4, 3, 4 - 1000, 27 + 1000, 25 1, 25 @@ -2986,19 +2971,16 @@ 1, 1, 1, 1 - 88, 27 + 88, 25 1 - - - numericBoxTemperature - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageEOS @@ -3012,18 +2994,9 @@ Arial, 9pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - GPa - - Segoe UI Symbol, 9.75pt - P @@ -3034,7 +3007,7 @@ 3, 4, 3, 4 - 1000, 27 + 1000, 25 1, 25 @@ -3043,19 +3016,16 @@ 1, 1, 1, 1 - 132, 27 + 132, 25 0 - - - numericBoxPressure - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageEOS @@ -3070,7 +3040,7 @@ 3, 3, 3, 3 - 552, 367 + 568, 367 5 @@ -3109,7 +3079,7 @@ elasticityControl1 - Crystallography.Controls.ElasticityControl, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ElasticityControl, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageElasticity @@ -3124,7 +3094,7 @@ 3, 3, 3, 3 - 552, 367 + 568, 367 6 @@ -3150,21 +3120,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 306, 159 @@ -3186,14 +3141,11 @@ 13 - - - numericBoxHill - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -3784,21 +3736,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 305, 125 @@ -3820,14 +3757,11 @@ 11 - - - numericBoxStress33 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -3841,21 +3775,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 257, 84 @@ -3877,14 +3796,11 @@ 9 - - - numericBoxStress22 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -3898,21 +3814,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 209, 46 @@ -3934,14 +3835,11 @@ 6 - - - numericBoxStress11 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -3955,21 +3853,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 307, 84 @@ -3991,14 +3874,11 @@ 10 - - - numericBoxStress23 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4012,21 +3892,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 307, 46 @@ -4048,14 +3913,11 @@ 8 - - - numericBoxStress13 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4069,21 +3931,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 258, 46 @@ -4105,14 +3952,11 @@ 7 - - - numericBoxStress12 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4126,21 +3970,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 120, 121 @@ -4162,14 +3991,11 @@ 5 - - - numericBoxStrain33 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4183,21 +4009,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 22, 46 @@ -4219,14 +4030,11 @@ 0 - - - numericBoxStrain11 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4240,21 +4048,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 71, 84 @@ -4276,14 +4069,11 @@ 3 - - - numericBoxStrain22 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4297,21 +4087,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 71, 46 @@ -4333,14 +4108,11 @@ 1 - - - numericBoxStrain12 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4354,21 +4126,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 120, 84 @@ -4390,14 +4147,11 @@ 4 - - - numericBoxStrain23 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4411,21 +4165,6 @@ Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9.75pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9.75pt - - - - 120, 46 @@ -4447,14 +4186,11 @@ 2 - - - numericBoxStrain13 - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageStrainStress @@ -4469,7 +4205,7 @@ 3, 3, 3, 3 - 552, 367 + 568, 367 7 @@ -4550,7 +4286,7 @@ 4, 2, 4, 2 - 552, 313 + 568, 313 133 @@ -4559,7 +4295,7 @@ poleFigureControl - Crystallography.Controls.PoleFigureControl, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.PoleFigureControl, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPagePolycrystalline @@ -4616,7 +4352,7 @@ 0, 27 - 552, 27 + 568, 27 149 @@ -4877,7 +4613,7 @@ 0, 2, 0, 0 - 552, 27 + 568, 27 148 @@ -4901,7 +4637,7 @@ 4, 26 - 552, 367 + 568, 367 8 @@ -4934,7 +4670,7 @@ 3, 4, 3, 4 - 546, 361 + 562, 361 0 @@ -4943,7 +4679,7 @@ boundControl - Crystallography.Controls.BoundControl, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.BoundControl, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageBounds @@ -4958,7 +4694,7 @@ 3, 3, 3, 3 - 552, 367 + 568, 367 9 @@ -4991,7 +4727,7 @@ 3, 4, 3, 4 - 546, 361 + 562, 361 0 @@ -5000,7 +4736,7 @@ latticePlaneControl - Crystallography.Controls.LatticePlaneControl, Crystallography.Controls, Version=2020.5.16.1450, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.LatticePlaneControl, Crystallography.Controls, Version=2020.7.28.918, Culture=neutral, PublicKeyToken=null tabPageLatticePlane @@ -5015,7 +4751,7 @@ 3, 3, 3, 3 - 552, 367 + 568, 367 10 @@ -5048,7 +4784,7 @@ 0, 2, 0, 0 - 560, 397 + 576, 397 0 @@ -5134,86 +4870,8 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Fill - - - Segoe UI Symbol, 9.75pt - - - 201, 0 - - - 0, 3, 0, 0 - - - True - - - Vertical - - - 301, 25 - - - 76 - - - textBoxFormula - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel4 - - - 0 - - - True - - - Left - - - Segoe UI Symbol, 9.75pt - - - NoControl - - - 142, 0 - - - 3, 5, 3, 0 - - - 4, 2, 0, 0 - - - 59, 19 - - - 85 - - - Formula - - - label90 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel4 - - - 1 - - Left + Fill Segoe UI Symbol, 9.75pt @@ -5225,7 +4883,7 @@ 0, 3, 0, 0 - 99, 25 + 475, 25 0 @@ -5240,7 +4898,7 @@ panel4 - 2 + 0 True @@ -5282,7 +4940,7 @@ panel4 - 3 + 1 17, 17 @@ -5303,7 +4961,7 @@ NoControl - 502, 0 + 518, 0 58, 25 @@ -5327,7 +4985,7 @@ panel4 - 4 + 2 True @@ -5342,7 +5000,7 @@ 0, 0 - 560, 0 + 576, 0 86 @@ -5369,7 +5027,7 @@ 0, 0, 0, 2 - 560, 27 + 576, 27 87 @@ -5402,7 +5060,7 @@ 0, 0, 0, 0 - 560, 424 + 576, 424 resetToolStripMenuItem diff --git a/Crystallography.Controls/Crystal/SymmetryControl.Designer.cs b/Crystallography.Controls/Crystal/SymmetryControl.Designer.cs index 7a29384..5e2ff37 100644 --- a/Crystallography.Controls/Crystal/SymmetryControl.Designer.cs +++ b/Crystallography.Controls/Crystal/SymmetryControl.Designer.cs @@ -29,19 +29,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SymmetryControl)); - this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.numericBoxGammaErr = new Crystallography.Controls.NumericBox(); - this.numericBoxBetaErr = new Crystallography.Controls.NumericBox(); - this.numericBoxAlphaErr = new Crystallography.Controls.NumericBox(); - this.label7 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.numericBoxAlpha = new Crystallography.Controls.NumericBox(); - this.numericBoxGamma = new Crystallography.Controls.NumericBox(); - this.numericBoxBeta = new Crystallography.Controls.NumericBox(); this.label28 = new System.Windows.Forms.Label(); this.label27 = new System.Windows.Forms.Label(); this.label26 = new System.Windows.Forms.Label(); @@ -50,20 +38,11 @@ private void InitializeComponent() this.label48 = new System.Windows.Forms.Label(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.label45 = new System.Windows.Forms.Label(); - this.numericBoxAErr = new Crystallography.Controls.NumericBox(); this.label44 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); this.label24 = new System.Windows.Forms.Label(); - this.numericBoxCErr = new Crystallography.Controls.NumericBox(); - this.numericBoxBErr = new Crystallography.Controls.NumericBox(); this.label25 = new System.Windows.Forms.Label(); - this.numericBoxA = new Crystallography.Controls.NumericBox(); - this.numericBoxB = new Crystallography.Controls.NumericBox(); - this.label6 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.numericBoxC = new Crystallography.Controls.NumericBox(); this.groupBoxSymmetry = new System.Windows.Forms.GroupBox(); this.comboBoxSpaceGroup = new System.Windows.Forms.ComboBox(); this.comboBoxPointGroup = new System.Windows.Forms.ComboBox(); @@ -74,154 +53,32 @@ private void InitializeComponent() this.textBoxSearch = new System.Windows.Forms.TextBox(); this.label21 = new System.Windows.Forms.Label(); this.comboBoxSearchResult = new System.Windows.Forms.ComboBox(); - this.tableLayoutPanel.SuspendLayout(); + this.checkBoxShowError = new System.Windows.Forms.CheckBox(); + this.numericBoxBeta = new Crystallography.Controls.NumericBox(); + this.numericBoxAlpha = new Crystallography.Controls.NumericBox(); + this.numericBoxGammaErr = new Crystallography.Controls.NumericBox(); + this.numericBoxAlphaErr = new Crystallography.Controls.NumericBox(); + this.numericBoxBetaErr = new Crystallography.Controls.NumericBox(); + this.numericBoxA = new Crystallography.Controls.NumericBox(); + this.numericBoxGamma = new Crystallography.Controls.NumericBox(); + this.numericBoxBErr = new Crystallography.Controls.NumericBox(); + this.numericBoxB = new Crystallography.Controls.NumericBox(); + this.numericBoxC = new Crystallography.Controls.NumericBox(); + this.numericBoxCErr = new Crystallography.Controls.NumericBox(); + this.numericBoxAErr = new Crystallography.Controls.NumericBox(); this.groupBox4.SuspendLayout(); - this.tableLayoutPanel4.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.groupBoxSymmetry.SuspendLayout(); this.SuspendLayout(); // - // tableLayoutPanel - // - resources.ApplyResources(this.tableLayoutPanel, "tableLayoutPanel"); - this.tableLayoutPanel.Controls.Add(this.groupBox4, 0, 0); - this.tableLayoutPanel.Controls.Add(this.groupBoxSymmetry, 1, 0); - this.tableLayoutPanel.Name = "tableLayoutPanel"; - // // groupBox4 // - this.groupBox4.Controls.Add(this.tableLayoutPanel4); + this.groupBox4.Controls.Add(this.checkBoxShowError); + this.groupBox4.Controls.Add(this.tableLayoutPanel1); resources.ApplyResources(this.groupBox4, "groupBox4"); this.groupBox4.Name = "groupBox4"; this.groupBox4.TabStop = false; // - // tableLayoutPanel4 - // - resources.ApplyResources(this.tableLayoutPanel4, "tableLayoutPanel4"); - this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel2, 0, 1); - this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel1, 0, 0); - this.tableLayoutPanel4.Name = "tableLayoutPanel4"; - // - // tableLayoutPanel2 - // - resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2"); - this.tableLayoutPanel2.Controls.Add(this.numericBoxGammaErr, 3, 2); - this.tableLayoutPanel2.Controls.Add(this.numericBoxBetaErr, 3, 1); - this.tableLayoutPanel2.Controls.Add(this.numericBoxAlphaErr, 3, 0); - this.tableLayoutPanel2.Controls.Add(this.label7, 2, 2); - this.tableLayoutPanel2.Controls.Add(this.label10, 2, 1); - this.tableLayoutPanel2.Controls.Add(this.label11, 2, 0); - this.tableLayoutPanel2.Controls.Add(this.numericBoxAlpha, 1, 0); - this.tableLayoutPanel2.Controls.Add(this.numericBoxGamma, 1, 2); - this.tableLayoutPanel2.Controls.Add(this.numericBoxBeta, 1, 1); - this.tableLayoutPanel2.Controls.Add(this.label28, 0, 2); - this.tableLayoutPanel2.Controls.Add(this.label27, 0, 1); - this.tableLayoutPanel2.Controls.Add(this.label26, 0, 0); - this.tableLayoutPanel2.Controls.Add(this.label46, 4, 0); - this.tableLayoutPanel2.Controls.Add(this.label47, 4, 1); - this.tableLayoutPanel2.Controls.Add(this.label48, 4, 2); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - // - // numericBoxGammaErr - // - resources.ApplyResources(this.numericBoxGammaErr, "numericBoxGammaErr"); - this.numericBoxGammaErr.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxGammaErr.DecimalPlaces = -1; - this.numericBoxGammaErr.Name = "numericBoxGammaErr"; - this.numericBoxGammaErr.RadianValue = 0D; - this.numericBoxGammaErr.RestrictLimitValue = false; - this.numericBoxGammaErr.ShowUpDown = false; - this.numericBoxGammaErr.SkipEventDuringInput = false; - this.numericBoxGammaErr.SmartIncrement = true; - this.numericBoxGammaErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxGammaErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // - // numericBoxBetaErr - // - resources.ApplyResources(this.numericBoxBetaErr, "numericBoxBetaErr"); - this.numericBoxBetaErr.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxBetaErr.DecimalPlaces = -1; - this.numericBoxBetaErr.Name = "numericBoxBetaErr"; - this.numericBoxBetaErr.RadianValue = 0D; - this.numericBoxBetaErr.RestrictLimitValue = false; - this.numericBoxBetaErr.ShowUpDown = false; - this.numericBoxBetaErr.SkipEventDuringInput = false; - this.numericBoxBetaErr.SmartIncrement = true; - this.numericBoxBetaErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxBetaErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // - // numericBoxAlphaErr - // - resources.ApplyResources(this.numericBoxAlphaErr, "numericBoxAlphaErr"); - this.numericBoxAlphaErr.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxAlphaErr.DecimalPlaces = -1; - this.numericBoxAlphaErr.Name = "numericBoxAlphaErr"; - this.numericBoxAlphaErr.RadianValue = 0D; - this.numericBoxAlphaErr.RestrictLimitValue = false; - this.numericBoxAlphaErr.ShowUpDown = false; - this.numericBoxAlphaErr.SkipEventDuringInput = false; - this.numericBoxAlphaErr.SmartIncrement = true; - this.numericBoxAlphaErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxAlphaErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // - // label7 - // - resources.ApplyResources(this.label7, "label7"); - this.label7.Name = "label7"; - // - // label10 - // - resources.ApplyResources(this.label10, "label10"); - this.label10.Name = "label10"; - // - // label11 - // - resources.ApplyResources(this.label11, "label11"); - this.label11.Name = "label11"; - // - // numericBoxAlpha - // - resources.ApplyResources(this.numericBoxAlpha, "numericBoxAlpha"); - this.numericBoxAlpha.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxAlpha.DecimalPlaces = -1; - this.numericBoxAlpha.Name = "numericBoxAlpha"; - this.numericBoxAlpha.RadianValue = 0D; - this.numericBoxAlpha.RestrictLimitValue = false; - this.numericBoxAlpha.ShowUpDown = false; - this.numericBoxAlpha.SkipEventDuringInput = false; - this.numericBoxAlpha.SmartIncrement = true; - this.numericBoxAlpha.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxAlpha.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // - // numericBoxGamma - // - resources.ApplyResources(this.numericBoxGamma, "numericBoxGamma"); - this.numericBoxGamma.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxGamma.DecimalPlaces = -1; - this.numericBoxGamma.Name = "numericBoxGamma"; - this.numericBoxGamma.RadianValue = 0D; - this.numericBoxGamma.RestrictLimitValue = false; - this.numericBoxGamma.ShowUpDown = false; - this.numericBoxGamma.SkipEventDuringInput = false; - this.numericBoxGamma.SmartIncrement = true; - this.numericBoxGamma.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxGamma.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // - // numericBoxBeta - // - resources.ApplyResources(this.numericBoxBeta, "numericBoxBeta"); - this.numericBoxBeta.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxBeta.DecimalPlaces = -1; - this.numericBoxBeta.Name = "numericBoxBeta"; - this.numericBoxBeta.RadianValue = 0D; - this.numericBoxBeta.RestrictLimitValue = false; - this.numericBoxBeta.ShowUpDown = false; - this.numericBoxBeta.SkipEventDuringInput = false; - this.numericBoxBeta.SmartIncrement = true; - this.numericBoxBeta.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxBeta.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // // label28 // resources.ApplyResources(this.label28, "label28"); @@ -255,21 +112,30 @@ private void InitializeComponent() // tableLayoutPanel1 // resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); - this.tableLayoutPanel1.Controls.Add(this.label45, 4, 1); - this.tableLayoutPanel1.Controls.Add(this.numericBoxAErr, 3, 0); - this.tableLayoutPanel1.Controls.Add(this.label44, 4, 2); + this.tableLayoutPanel1.Controls.Add(this.label48, 7, 2); + this.tableLayoutPanel1.Controls.Add(this.label46, 7, 1); + this.tableLayoutPanel1.Controls.Add(this.numericBoxBeta, 5, 1); + this.tableLayoutPanel1.Controls.Add(this.numericBoxAlpha, 5, 0); + this.tableLayoutPanel1.Controls.Add(this.label47, 7, 0); + this.tableLayoutPanel1.Controls.Add(this.numericBoxGammaErr, 6, 2); this.tableLayoutPanel1.Controls.Add(this.label23, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.label18, 4, 0); - this.tableLayoutPanel1.Controls.Add(this.label24, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.numericBoxCErr, 3, 2); - this.tableLayoutPanel1.Controls.Add(this.numericBoxBErr, 3, 1); - this.tableLayoutPanel1.Controls.Add(this.label25, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.numericBoxAlphaErr, 6, 0); + this.tableLayoutPanel1.Controls.Add(this.numericBoxBetaErr, 6, 1); this.tableLayoutPanel1.Controls.Add(this.numericBoxA, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.label26, 4, 0); + this.tableLayoutPanel1.Controls.Add(this.label45, 3, 2); + this.tableLayoutPanel1.Controls.Add(this.numericBoxGamma, 5, 2); + this.tableLayoutPanel1.Controls.Add(this.label18, 3, 1); + this.tableLayoutPanel1.Controls.Add(this.numericBoxBErr, 2, 1); this.tableLayoutPanel1.Controls.Add(this.numericBoxB, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.label6, 2, 0); - this.tableLayoutPanel1.Controls.Add(this.label1, 2, 2); - this.tableLayoutPanel1.Controls.Add(this.label2, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.label24, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.label25, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.label28, 4, 2); + this.tableLayoutPanel1.Controls.Add(this.label27, 4, 1); this.tableLayoutPanel1.Controls.Add(this.numericBoxC, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.numericBoxCErr, 2, 2); + this.tableLayoutPanel1.Controls.Add(this.numericBoxAErr, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.label44, 3, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; // // label45 @@ -277,20 +143,6 @@ private void InitializeComponent() resources.ApplyResources(this.label45, "label45"); this.label45.Name = "label45"; // - // numericBoxAErr - // - resources.ApplyResources(this.numericBoxAErr, "numericBoxAErr"); - this.numericBoxAErr.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxAErr.DecimalPlaces = -1; - this.numericBoxAErr.Name = "numericBoxAErr"; - this.numericBoxAErr.RadianValue = 0D; - this.numericBoxAErr.RestrictLimitValue = false; - this.numericBoxAErr.ShowUpDown = false; - this.numericBoxAErr.SkipEventDuringInput = false; - this.numericBoxAErr.SmartIncrement = true; - this.numericBoxAErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxAErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // // label44 // resources.ApplyResources(this.label44, "label44"); @@ -311,96 +163,11 @@ private void InitializeComponent() resources.ApplyResources(this.label24, "label24"); this.label24.Name = "label24"; // - // numericBoxCErr - // - resources.ApplyResources(this.numericBoxCErr, "numericBoxCErr"); - this.numericBoxCErr.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxCErr.DecimalPlaces = -1; - this.numericBoxCErr.Name = "numericBoxCErr"; - this.numericBoxCErr.RadianValue = 0D; - this.numericBoxCErr.RestrictLimitValue = false; - this.numericBoxCErr.ShowUpDown = false; - this.numericBoxCErr.SkipEventDuringInput = false; - this.numericBoxCErr.SmartIncrement = true; - this.numericBoxCErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxCErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // - // numericBoxBErr - // - resources.ApplyResources(this.numericBoxBErr, "numericBoxBErr"); - this.numericBoxBErr.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxBErr.DecimalPlaces = -1; - this.numericBoxBErr.Name = "numericBoxBErr"; - this.numericBoxBErr.RadianValue = 0D; - this.numericBoxBErr.RestrictLimitValue = false; - this.numericBoxBErr.ShowUpDown = false; - this.numericBoxBErr.SkipEventDuringInput = false; - this.numericBoxBErr.SmartIncrement = true; - this.numericBoxBErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxBErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // // label25 // resources.ApplyResources(this.label25, "label25"); this.label25.Name = "label25"; // - // numericBoxA - // - resources.ApplyResources(this.numericBoxA, "numericBoxA"); - this.numericBoxA.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxA.DecimalPlaces = -1; - this.numericBoxA.Name = "numericBoxA"; - this.numericBoxA.RadianValue = 0D; - this.numericBoxA.RestrictLimitValue = false; - this.numericBoxA.ShowUpDown = false; - this.numericBoxA.SkipEventDuringInput = false; - this.numericBoxA.SmartIncrement = true; - this.numericBoxA.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxA.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // - // numericBoxB - // - resources.ApplyResources(this.numericBoxB, "numericBoxB"); - this.numericBoxB.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxB.DecimalPlaces = -1; - this.numericBoxB.Name = "numericBoxB"; - this.numericBoxB.RadianValue = 0D; - this.numericBoxB.RestrictLimitValue = false; - this.numericBoxB.ShowUpDown = false; - this.numericBoxB.SkipEventDuringInput = false; - this.numericBoxB.SmartIncrement = true; - this.numericBoxB.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxB.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // - // label6 - // - resources.ApplyResources(this.label6, "label6"); - this.label6.Name = "label6"; - // - // label1 - // - resources.ApplyResources(this.label1, "label1"); - this.label1.Name = "label1"; - // - // label2 - // - resources.ApplyResources(this.label2, "label2"); - this.label2.Name = "label2"; - // - // numericBoxC - // - resources.ApplyResources(this.numericBoxC, "numericBoxC"); - this.numericBoxC.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxC.DecimalPlaces = -1; - this.numericBoxC.Name = "numericBoxC"; - this.numericBoxC.RadianValue = 0D; - this.numericBoxC.RestrictLimitValue = false; - this.numericBoxC.ShowUpDown = false; - this.numericBoxC.SkipEventDuringInput = false; - this.numericBoxC.SmartIncrement = true; - this.numericBoxC.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); - this.numericBoxC.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); - // // groupBoxSymmetry // this.groupBoxSymmetry.Controls.Add(this.comboBoxSpaceGroup); @@ -487,17 +254,178 @@ private void InitializeComponent() this.comboBoxSearchResult.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.comboBoxSpaceGroup_DrawItem); this.comboBoxSearchResult.SelectedIndexChanged += new System.EventHandler(this.comboBoxSearchResult_SelectedIndexChanged); // + // checkBoxShowError + // + resources.ApplyResources(this.checkBoxShowError, "checkBoxShowError"); + this.checkBoxShowError.Name = "checkBoxShowError"; + this.checkBoxShowError.UseVisualStyleBackColor = true; + this.checkBoxShowError.CheckedChanged += new System.EventHandler(this.checkBoxShowError_CheckedChanged); + // + // numericBoxBeta + // + resources.ApplyResources(this.numericBoxBeta, "numericBoxBeta"); + this.numericBoxBeta.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxBeta.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxBeta.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxBeta.Name = "numericBoxBeta"; + this.numericBoxBeta.RestrictLimitValue = false; + this.numericBoxBeta.SkipEventDuringInput = false; + this.numericBoxBeta.SmartIncrement = true; + this.numericBoxBeta.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxBeta.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxAlpha + // + resources.ApplyResources(this.numericBoxAlpha, "numericBoxAlpha"); + this.numericBoxAlpha.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxAlpha.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxAlpha.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxAlpha.Name = "numericBoxAlpha"; + this.numericBoxAlpha.RestrictLimitValue = false; + this.numericBoxAlpha.SkipEventDuringInput = false; + this.numericBoxAlpha.SmartIncrement = true; + this.numericBoxAlpha.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxAlpha.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxGammaErr + // + resources.ApplyResources(this.numericBoxGammaErr, "numericBoxGammaErr"); + this.numericBoxGammaErr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxGammaErr.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxGammaErr.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxGammaErr.Name = "numericBoxGammaErr"; + this.numericBoxGammaErr.RestrictLimitValue = false; + this.numericBoxGammaErr.SkipEventDuringInput = false; + this.numericBoxGammaErr.SmartIncrement = true; + this.numericBoxGammaErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxGammaErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxAlphaErr + // + resources.ApplyResources(this.numericBoxAlphaErr, "numericBoxAlphaErr"); + this.numericBoxAlphaErr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxAlphaErr.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxAlphaErr.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxAlphaErr.Name = "numericBoxAlphaErr"; + this.numericBoxAlphaErr.RestrictLimitValue = false; + this.numericBoxAlphaErr.SkipEventDuringInput = false; + this.numericBoxAlphaErr.SmartIncrement = true; + this.numericBoxAlphaErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxAlphaErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxBetaErr + // + resources.ApplyResources(this.numericBoxBetaErr, "numericBoxBetaErr"); + this.numericBoxBetaErr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxBetaErr.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxBetaErr.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxBetaErr.Name = "numericBoxBetaErr"; + this.numericBoxBetaErr.RestrictLimitValue = false; + this.numericBoxBetaErr.SkipEventDuringInput = false; + this.numericBoxBetaErr.SmartIncrement = true; + this.numericBoxBetaErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxBetaErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxA + // + resources.ApplyResources(this.numericBoxA, "numericBoxA"); + this.numericBoxA.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxA.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxA.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxA.Name = "numericBoxA"; + this.numericBoxA.RestrictLimitValue = false; + this.numericBoxA.SkipEventDuringInput = false; + this.numericBoxA.SmartIncrement = true; + this.numericBoxA.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxA.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxGamma + // + resources.ApplyResources(this.numericBoxGamma, "numericBoxGamma"); + this.numericBoxGamma.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxGamma.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxGamma.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxGamma.Name = "numericBoxGamma"; + this.numericBoxGamma.RestrictLimitValue = false; + this.numericBoxGamma.SkipEventDuringInput = false; + this.numericBoxGamma.SmartIncrement = true; + this.numericBoxGamma.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxGamma.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxBErr + // + resources.ApplyResources(this.numericBoxBErr, "numericBoxBErr"); + this.numericBoxBErr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxBErr.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxBErr.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxBErr.Name = "numericBoxBErr"; + this.numericBoxBErr.RestrictLimitValue = false; + this.numericBoxBErr.SkipEventDuringInput = false; + this.numericBoxBErr.SmartIncrement = true; + this.numericBoxBErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxBErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxB + // + resources.ApplyResources(this.numericBoxB, "numericBoxB"); + this.numericBoxB.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxB.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxB.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxB.Name = "numericBoxB"; + this.numericBoxB.RestrictLimitValue = false; + this.numericBoxB.SkipEventDuringInput = false; + this.numericBoxB.SmartIncrement = true; + this.numericBoxB.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxB.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxC + // + resources.ApplyResources(this.numericBoxC, "numericBoxC"); + this.numericBoxC.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxC.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxC.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxC.Name = "numericBoxC"; + this.numericBoxC.RestrictLimitValue = false; + this.numericBoxC.SkipEventDuringInput = false; + this.numericBoxC.SmartIncrement = true; + this.numericBoxC.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxC.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxCErr + // + resources.ApplyResources(this.numericBoxCErr, "numericBoxCErr"); + this.numericBoxCErr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxCErr.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxCErr.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxCErr.Name = "numericBoxCErr"; + this.numericBoxCErr.RestrictLimitValue = false; + this.numericBoxCErr.SkipEventDuringInput = false; + this.numericBoxCErr.SmartIncrement = true; + this.numericBoxCErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxCErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // + // numericBoxAErr + // + resources.ApplyResources(this.numericBoxAErr, "numericBoxAErr"); + this.numericBoxAErr.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxAErr.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxAErr.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxAErr.Name = "numericBoxAErr"; + this.numericBoxAErr.RestrictLimitValue = false; + this.numericBoxAErr.SkipEventDuringInput = false; + this.numericBoxAErr.SmartIncrement = true; + this.numericBoxAErr.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxAErr.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxCellConstants_ValueChanged); + // // SymmetryControl // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.tableLayoutPanel); + this.Controls.Add(this.groupBox4); + this.Controls.Add(this.groupBoxSymmetry); this.Name = "SymmetryControl"; - this.tableLayoutPanel.ResumeLayout(false); this.groupBox4.ResumeLayout(false); - this.tableLayoutPanel4.ResumeLayout(false); - this.tableLayoutPanel2.ResumeLayout(false); - this.tableLayoutPanel2.PerformLayout(); + this.groupBox4.PerformLayout(); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.groupBoxSymmetry.ResumeLayout(false); @@ -507,17 +435,10 @@ private void InitializeComponent() } #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; private System.Windows.Forms.GroupBox groupBox4; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private NumericBox numericBoxGammaErr; private NumericBox numericBoxBetaErr; private NumericBox numericBoxAlphaErr; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label11; private NumericBox numericBoxAlpha; private NumericBox numericBoxGamma; private NumericBox numericBoxBeta; @@ -539,9 +460,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label25; private NumericBox numericBoxA; private NumericBox numericBoxB; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; private NumericBox numericBoxC; private System.Windows.Forms.GroupBox groupBoxSymmetry; public System.Windows.Forms.ComboBox comboBoxSpaceGroup; @@ -553,5 +471,6 @@ private void InitializeComponent() public System.Windows.Forms.TextBox textBoxSearch; private System.Windows.Forms.Label label21; public System.Windows.Forms.ComboBox comboBoxSearchResult; + private System.Windows.Forms.CheckBox checkBoxShowError; } -} +} \ No newline at end of file diff --git a/Crystallography.Controls/Crystal/SymmetryControl.cs b/Crystallography.Controls/Crystal/SymmetryControl.cs index 0a48902..0f86bf7 100644 --- a/Crystallography.Controls/Crystal/SymmetryControl.cs +++ b/Crystallography.Controls/Crystal/SymmetryControl.cs @@ -1,11 +1,7 @@ サソusing System; -using System.Collections.Generic; -using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace Crystallography.Controls @@ -15,9 +11,9 @@ public partial class SymmetryControl : UserControl #region 繝励Ο繝代ユ繧」縲√ヵ繧」繝シ繝ォ繝峨√う繝吶Φ繝医ワ繝ウ繝峨Λ public bool SkipEvent { get; set; } = false; - public int CrystalSystemIndex { get => comboBoxCrystalSystem.SelectedIndex; } - public int PointGroupIndex { get => comboBoxPointGroup.SelectedIndex; } - public int SpaceGroupIndex { get => comboBoxSpaceGroup.SelectedIndex; } + public int CrystalSystemIndex => comboBoxCrystalSystem.SelectedIndex; + public int PointGroupIndex => comboBoxPointGroup.SelectedIndex; + public int SpaceGroupIndex => comboBoxSpaceGroup.SelectedIndex; public int SymmetrySeriesNumber @@ -64,7 +60,6 @@ public int SymmetrySeriesNumber numericBoxBeta.RadianValue = value.Beta; numericBoxGamma.RadianValue = value.Gamma; SkipEvent = false; - } } @@ -86,6 +81,18 @@ public int SymmetrySeriesNumber } } + public bool ShowError + { + get => checkBoxShowError.Checked; + set + { + SkipEvent = true; + checkBoxShowError.Checked = value; + SkipEvent = false; + tableLayoutPanel1.ColumnStyles[2].Width = tableLayoutPanel1.ColumnStyles[6].Width = checkBoxShowError.Checked ? 25 : 0; + } + } + public event EventHandler ItemChanged; #endregion @@ -96,6 +103,7 @@ public SymmetryControl() { InitializeComponent(); SymmetrySeriesNumber = 0; + tableLayoutPanel1.ColumnStyles[2].Width = tableLayoutPanel1.ColumnStyles[6].Width= 0; } #endregion @@ -392,9 +400,17 @@ private void numericBoxCellConstants_ValueChanged(object sender, EventArgs e) if (SkipEvent) return; if (!(sender as NumericBox).ReadOnly)//閾ェ蛻縺瑚ェュ縺ソ霎シ縺ソ蟆ら畑縺ァ縺ェ縺代l縺ー SetCellConstantsBySymmetry(); - } - #endregion + } + #endregion + #region 繧ィ繝ゥ繝シ陦ィ遉コ/髱櫁。ィ遉コ + private void checkBoxShowError_CheckedChanged(object sender, EventArgs e) + { + if (SkipEvent) + return; + ShowError = checkBoxShowError.Checked; + } + #endregion } } diff --git a/Crystallography.Controls/Crystal/SymmetryControl.resx b/Crystallography.Controls/Crystal/SymmetryControl.resx index d4642b8..600daa9 100644 --- a/Crystallography.Controls/Crystal/SymmetryControl.resx +++ b/Crystallography.Controls/Crystal/SymmetryControl.resx @@ -117,305 +117,170 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 2 - - - 1 - - - 5 - - - GrowAndShrink + + Bottom, Right - - Fill + + + True - - Segoe UI Symbol, 9.75pt - - - Segoe UI Symbol, 9pt - - - 0, 0, 0, 0 - - - - - + Segoe UI Symbol, 9pt - - - - - 112, 50 - - - 0, 0, 0, 0 - - - 1000, 25 - - - 1, 23 + + NoControl - - 0, 0, 1, 0 + + 249, 111 - - 65, 25 + + 80, 19 - - 5 + + 2 - - + + ShowError - - numericBoxGammaErr + + checkBoxShowError - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tableLayoutPanel2 + + groupBox4 - + 0 - - GrowAndShrink + + 8 - - Fill + + True - + Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9pt - - - + + NoControl - - 112, 25 + + 314, 52 - + 0, 0, 0, 0 - - 1000, 25 - - - 1, 23 - - - 0, 0, 1, 0 - - - 65, 25 - - - 4 - - - - - - numericBoxBetaErr - - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null - - - tableLayoutPanel2 + + 13, 17 - + 1 - - GrowAndShrink - - - Fill - - - Segoe UI Symbol, 9.75pt - - - Segoe UI Symbol, 9pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9pt - - - - - - 112, 0 - - - 0, 0, 0, 0 - - - 1000, 25 - - - 1, 23 - - - 0, 0, 1, 0 - - - 65, 25 - - - 3 - - - + + ツー - - numericBoxAlphaErr + + label48 - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tableLayoutPanel2 + + tableLayoutPanel1 - - 2 + + 0 - + True - + Segoe UI Symbol, 9.75pt - + NoControl - - 95, 50 + + 314, 26 - + 0, 0, 0, 0 - - 17, 17 + + 13, 17 - + 1 - - ツア + + ツー - - label7 + + label46 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tableLayoutPanel2 - - - 3 - - - True - - - Segoe UI Symbol, 9.75pt - - - NoControl - - - 95, 25 - - - 0, 0, 0, 0 - - - 17, 17 + + tableLayoutPanel1 - + 1 - - ツア + + GrowAndShrink - - label10 + + Fill - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Segoe UI Symbol, 9.75pt - - tableLayoutPanel2 + + Segoe UI Symbol, 9pt - - 4 + + Segoe UI Symbol, 9pt - - True + + 184, 26 - - Segoe UI Symbol, 9.75pt + + 0, 0, 0, 0 - - NoControl + + 1000, 23 - - 95, 0 + + 1, 23 - - 0, 0, 0, 0 + + 0, 0, 1, 0 - - 17, 17 + + 65, 23 - + 1 - - ツア + + Beta in degree - - label11 + + numericBoxBeta - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - - tableLayoutPanel2 + + tableLayoutPanel1 - - 5 + + 2 GrowAndShrink @@ -429,26 +294,17 @@ Segoe UI Symbol, 9pt - - 0, 0, 0, 0 - - - - Segoe UI Symbol, 9pt - - - - 16, 0 + 184, 0 0, 0, 0, 0 - 1000, 25 + 1000, 23 1, 23 @@ -457,7 +313,7 @@ 0, 0, 1, 0 - 79, 25 + 65, 23 0 @@ -469,685 +325,448 @@ numericBoxAlpha - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - tableLayoutPanel2 + tableLayoutPanel1 - 6 - - - GrowAndShrink + 3 - - Fill + + True - + Segoe UI Symbol, 9.75pt - - Segoe UI Symbol, 9pt + + NoControl - + + 314, 0 + + 0, 0, 0, 0 - - + + 13, 17 - - Segoe UI Symbol, 9pt + + 1 - - + + ツー - - 16, 50 + + label47 - - 0, 0, 0, 0 - - - 1000, 25 - - - 1, 23 - - - 0, 0, 1, 0 - - - 79, 25 - - - 2 - - - Gamma in degree - - - numericBoxGamma - - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tableLayoutPanel2 + + tableLayoutPanel1 - - 7 + + 4 - + GrowAndShrink - + Fill - + Segoe UI Symbol, 9.75pt - + Segoe UI Symbol, 9pt - - 0, 0, 0, 0 - - - - - + Segoe UI Symbol, 9pt - - + + ツア - - 16, 25 + + 249, 52 - + 0, 0, 0, 0 - - 1000, 25 + + 1000, 23 - + 1, 23 - + 0, 0, 1, 0 - - 79, 25 - - - 1 - - - Beta in degree - - - numericBoxBeta - - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null - - - tableLayoutPanel2 - - - 8 - - - True - - - Times New Roman, 11.25pt, style=Italic - - - NoControl - - - 0, 50 - - - 0, 0, 0, 0 - - - 14, 17 - - - 1 - - - ホウ - - - label28 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 9 - - - True - - - Times New Roman, 11.25pt, style=Italic - - - NoControl - - - 0, 25 - - - 0, 0, 0, 0 - - - 15, 17 - - - 1 + + 65, 23 - - ホイ + + 5 - - label27 + + numericBoxGammaErr - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - - tableLayoutPanel2 + + tableLayoutPanel1 - - 10 + + 5 - + True - + Times New Roman, 11.25pt, style=Italic - + NoControl - + 0, 0 - + 0, 0, 0, 0 - + 16, 17 - - 1 + + 0 - - ホア + + a - - label26 + + label23 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tableLayoutPanel2 - - - 11 - - - True - - - Segoe UI Symbol, 9.75pt - - - NoControl - - - 177, 0 - - - 0, 0, 0, 0 - - - 13, 17 - - - 1 - - - ツー - - - label46 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tableLayoutPanel1 - - tableLayoutPanel2 + + 6 - - 12 + + GrowAndShrink - - True + + Fill - + Segoe UI Symbol, 9.75pt - - NoControl - - - 177, 25 - - - 0, 0, 0, 0 - - - 13, 17 - - - 1 - - - ツー - - - label47 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 13 - - - True + + Segoe UI Symbol, 9pt - - Segoe UI Symbol, 9.75pt + + Segoe UI Symbol, 9pt - - NoControl + + ツア - - 177, 50 + + 249, 0 - + 0, 0, 0, 0 - - 13, 17 - - - 1 - - - ツー - - - label48 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 14 + + 1000, 23 - - Fill + + 1, 23 - - 1, 78 + + 0, 0, 1, 0 - - 1, 1, 1, 1 + + 65, 23 - + 3 - - 191, 75 - - - 1 - - - tableLayoutPanel2 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="numericBoxGammaErr" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="numericBoxBetaErr" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="numericBoxAlphaErr" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="label7" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="label10" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="label11" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="numericBoxAlpha" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="numericBoxGamma" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="numericBoxBeta" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="label28" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label27" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label26" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label46" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="label47" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="label48" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,55,AutoSize,0,Percent,45,AutoSize,0" /><Rows Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333" /></TableLayoutSettings> - - - 5 - - - True - - - Segoe UI Symbol, 9.75pt - - - NoControl - - - 174, 25 - - - 0, 0, 0, 0 - - - 16, 17 - - - 1 - - - 邃ォ - - - label45 + + numericBoxAlphaErr - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - + tableLayoutPanel1 - - 0 + + 7 - + GrowAndShrink - + Fill - + Segoe UI Symbol, 9.75pt - + Segoe UI Symbol, 9pt - - 0, 0, 0, 0 - - - - - + Segoe UI Symbol, 9pt - - + + ツア - - 111, 0 + + 249, 26 - + 0, 0, 0, 0 - - 1000, 25 + + 1000, 23 - + 1, 23 - + 0, 0, 1, 0 - - 63, 25 - - - 3 + + 65, 23 - - + + 4 - - numericBoxAErr + + numericBoxBetaErr - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - + tableLayoutPanel1 - - 1 - - - True - - - Segoe UI Symbol, 9.75pt - - - NoControl - - - 174, 50 - - - 0, 0, 0, 0 - - - 16, 17 - - - 1 + + 8 - - 邃ォ + + GrowAndShrink - - label44 + + Fill - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Segoe UI Symbol, 9.75pt - - tableLayoutPanel1 + + Segoe UI Symbol, 9pt - - 2 + + Segoe UI Symbol, 9pt - - True + + 16, 0 - - Times New Roman, 11.25pt, style=Italic + + 0, 0, 0, 0 - - NoControl + + 1000, 23 - - 0, 0 + + 1, 23 - - 0, 0, 0, 0 + + 0, 0, 1, 0 - - 16, 17 + + 65, 23 - + 0 - - a + + A in angstrom - - label23 + + numericBoxA - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - + tableLayoutPanel1 - - 3 + + 9 - + True - - Segoe UI Symbol, 9.75pt + + Times New Roman, 11.25pt, style=Italic - + NoControl - - 174, 0 + + 168, 0 - - 0, 0, 0, 0 + + 6, 0, 0, 0 - + 16, 17 - + 1 - - 邃ォ + + ホア - - label18 + + label26 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tableLayoutPanel1 - - 4 + + 10 - + True - - Times New Roman, 11.25pt, style=Italic + + Segoe UI Symbol, 9.75pt - + NoControl - - 0, 25 + + 146, 52 - + 0, 0, 0, 0 - + 16, 17 - + 1 - - b + + 邃ォ - - label24 + + label45 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tableLayoutPanel1 - - 5 + + 11 - + GrowAndShrink - + Fill - + Segoe UI Symbol, 9.75pt - + Segoe UI Symbol, 9pt - - 0, 0, 0, 0 - - - - - + Segoe UI Symbol, 9pt - - - - - 111, 50 + + 184, 52 - + 0, 0, 0, 0 - - 1000, 25 + + 1000, 23 - + 1, 23 - + 0, 0, 1, 0 - - 63, 25 + + 65, 23 - - 5 + + 2 - - + + Gamma in degree - - numericBoxCErr + + numericBoxGamma - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - + tableLayoutPanel1 - - 6 + + 12 + + + True + + + Segoe UI Symbol, 9.75pt + + + NoControl + + + 146, 26 + + + 0, 0, 0, 0 + + + 16, 17 + + + 1 + + + 邃ォ + + + label18 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 13 GrowAndShrink @@ -1161,26 +780,20 @@ Segoe UI Symbol, 9pt - - 0, 0, 0, 0 - - - - Segoe UI Symbol, 9pt - + ツア - 111, 25 + 81, 26 0, 0, 0, 0 - 1000, 25 + 1000, 23 1, 23 @@ -1189,289 +802,217 @@ 0, 0, 1, 0 - 63, 25 + 65, 23 4 - - - numericBoxBErr - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 - 7 - - - True - - - Times New Roman, 11.25pt, style=Italic - - - NoControl - - - 0, 50 - - - 0, 0, 0, 0 - - - 15, 17 - - - 1 - - - c - - - label25 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel1 - - - 8 + 14 - + GrowAndShrink - + Fill - + Segoe UI Symbol, 9.75pt - + Segoe UI Symbol, 9pt - - 0, 0, 0, 0 - - - - - + Segoe UI Symbol, 9pt - - - - - 16, 0 + + 16, 26 - + 0, 0, 0, 0 - - 1000, 25 + + 1000, 23 - + 1, 23 - + 0, 0, 1, 0 - - 78, 25 + + 65, 23 - - 0 + + 1 - - A in angstrom + + B in angstrom - - numericBoxA + + numericBoxB - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - + tableLayoutPanel1 - - 9 - - - GrowAndShrink - - - Fill - - - Segoe UI Symbol, 9.75pt - - - Segoe UI Symbol, 9pt - - - 0, 0, 0, 0 - - - - - - Segoe UI Symbol, 9pt - - - + + 15 - - 16, 25 + + True - - 0, 0, 0, 0 + + Times New Roman, 11.25pt, style=Italic - - 1000, 25 + + NoControl - - 1, 23 + + 0, 26 - - 0, 0, 1, 0 + + 0, 0, 0, 0 - - 78, 25 + + 16, 17 - + 1 - - B in angstrom + + b - - numericBoxB + + label24 - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tableLayoutPanel1 - - 10 + + 16 - + True - - Segoe UI Symbol, 9.75pt + + Times New Roman, 11.25pt, style=Italic - + NoControl - - 94, 0 + + 0, 52 - + 0, 0, 0, 0 - - 17, 17 + + 15, 17 - + 1 - - ツア + + c - - label6 + + label25 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tableLayoutPanel1 - - 11 + + 17 - + True - - Segoe UI Symbol, 9.75pt + + Times New Roman, 11.25pt, style=Italic - + NoControl - - 94, 50 + + 168, 52 - - 0, 0, 0, 0 + + 6, 0, 0, 0 - - 17, 17 + + 14, 17 - + 1 - - ツア + + ホウ - - label1 + + label28 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tableLayoutPanel1 - - 12 + + 18 - + True - - Segoe UI Symbol, 9.75pt + + Times New Roman, 11.25pt, style=Italic - + NoControl - - 94, 25 + + 168, 26 - - 0, 0, 0, 0 + + 6, 0, 0, 0 - - 17, 17 + + 15, 17 - + 1 - - ツア + + ホイ - - label2 + + label27 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tableLayoutPanel1 - - 13 + + 19 GrowAndShrink @@ -1485,26 +1026,17 @@ Segoe UI Symbol, 9pt - - 0, 0, 0, 0 - - - - Segoe UI Symbol, 9pt - - - - 16, 50 + 16, 52 0, 0, 0, 0 - 1000, 25 + 1000, 23 1, 23 @@ -1513,7 +1045,7 @@ 0, 0, 1, 0 - 78, 25 + 65, 23 2 @@ -1525,91 +1057,196 @@ numericBoxC - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.3.357, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 - 14 + 20 - + + GrowAndShrink + + Fill - - 1, 1 + + Segoe UI Symbol, 9.75pt - - 1, 1, 1, 1 + + Segoe UI Symbol, 9pt - + + Segoe UI Symbol, 9pt + + + ツア + + + 81, 52 + + + 0, 0, 0, 0 + + + 1000, 23 + + + 1, 23 + + + 0, 0, 1, 0 + + + 65, 23 + + + 5 + + + numericBoxCErr + + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel1 + + + 21 + + + GrowAndShrink + + + Fill + + + Segoe UI Symbol, 9.75pt + + + Segoe UI Symbol, 9pt + + + Segoe UI Symbol, 9pt + + + ツア + + + 81, 0 + + + 0, 0, 0, 0 + + + 1000, 23 + + + 1, 23 + + + 0, 0, 1, 0 + + + 65, 23 + + 3 - - 191, 75 + + numericBoxAErr - - 0 + + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.6.6.635, Culture=neutral, PublicKeyToken=null - + tableLayoutPanel1 - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 22 - - tableLayoutPanel4 + + True - + + Segoe UI Symbol, 9.75pt + + + NoControl + + + 146, 0 + + + 0, 0, 0, 0 + + + 16, 17 + + 1 - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="label45" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="numericBoxAErr" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="label44" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="label23" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label18" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="label24" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numericBoxCErr" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="numericBoxBErr" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="label25" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numericBoxA" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="numericBoxB" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="label6" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="label1" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="label2" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="numericBoxC" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,55,AutoSize,0,Percent,45,AutoSize,0" /><Rows Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333" /></TableLayoutSettings> + + 邃ォ - - Fill + + label44 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 23 + + + Top - - 3, 17 + + 3, 21 - + 1, 1, 1, 1 - - 2 + + 3 - - 193, 154 + + 329, 79 - + 0 - - tableLayoutPanel4 + + tableLayoutPanel1 - + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + groupBox4 - - 0 + + 1 - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="tableLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableLayoutPanel1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,50" /><Rows Styles="Percent,50,Percent,50" /></TableLayoutSettings> + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="label48" Row="2" RowSpan="1" Column="7" ColumnSpan="1" /><Control Name="label46" Row="1" RowSpan="1" Column="7" ColumnSpan="1" /><Control Name="numericBoxBeta" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="numericBoxAlpha" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="label47" Row="0" RowSpan="1" Column="7" ColumnSpan="1" /><Control Name="numericBoxGammaErr" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="label23" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numericBoxAlphaErr" Row="0" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="numericBoxBetaErr" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="numericBoxA" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="label26" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="label45" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="numericBoxGamma" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="label18" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="numericBoxBErr" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="numericBoxB" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="label24" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label25" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label28" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="label27" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="numericBoxC" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="numericBoxCErr" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="numericBoxAErr" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="label44" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,25,Percent,25,AutoSize,0,AutoSize,0,Percent,25,Percent,25,AutoSize,0" /><Rows Styles="Percent,33.33333,Percent,33.33334,Percent,33.33334" /></TableLayoutSettings> Fill - Arial, 9pt + Segoe UI Symbol, 9.75pt - 3, 3 + 0, 0 - 199, 174 + 335, 136 0 @@ -1624,7 +1261,7 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tableLayoutPanel + $this 0 @@ -1648,7 +1285,7 @@ 30 - 99, 26 + 138, 26 2 @@ -1681,7 +1318,7 @@ 0, 0, 0, 0 - 99, 26 + 138, 26 1 @@ -1738,7 +1375,7 @@ 0, 0, 0, 0 - 99, 25 + 138, 25 0 @@ -1798,7 +1435,7 @@ NoControl - 6, 112 + 6, 109 47, 17 @@ -1858,7 +1495,7 @@ Times New Roman, 9pt - 54, 110 + 54, 107 64, 21 @@ -1924,13 +1561,13 @@ Disable - 120, 109 + 120, 104 40 - 74, 26 + 113, 26 4 @@ -1948,16 +1585,16 @@ 8 - Fill + Right Segoe UI Symbol, 9.75pt - 208, 3 + 335, 0 - 200, 174 + 241, 136 1 @@ -1972,41 +1609,11 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tableLayoutPanel + $this 1 - - Fill - - - 0, 0 - - - 1 - - - 411, 180 - - - 93 - - - tableLayoutPanel - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="groupBox4" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="groupBoxSymmetry" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,50,Percent,50" /><Rows Styles="Percent,50" /></TableLayoutSettings> - True @@ -2014,7 +1621,7 @@ 96, 96 - 411, 180 + 576, 136 SymmetryControl diff --git a/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.Designer.cs b/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.Designer.cs new file mode 100644 index 0000000..bb20c7e --- /dev/null +++ b/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.Designer.cs @@ -0,0 +1,471 @@ +サソnamespace Crystallography.Controls +{ + partial class CrystalDatabaseControl + { + /// + /// 蠢隕√↑繝繧カ繧、繝翫シ螟画焚縺ァ縺吶 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 菴ソ逕ィ荳ュ縺ョ繝ェ繧ス繝シ繧ケ繧偵☆縺ケ縺ヲ繧ッ繝ェ繝シ繝ウ繧「繝繝励@縺セ縺吶 + /// + /// 繝槭ロ繝シ繧ク繝 繝ェ繧ス繝シ繧ケ繧堤エ譽縺吶k蝣エ蜷医ッ true 繧呈欠螳壹@縲√◎縺ョ莉悶ョ蝣エ蜷医ッ false 繧呈欠螳壹@縺セ縺吶 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 繧ウ繝ウ繝昴シ繝阪Φ繝 繝繧カ繧、繝翫シ縺ァ逕滓舌&繧後◆繧ウ繝シ繝 + + /// + /// 繝繧カ繧、繝翫シ 繧オ繝昴シ繝医↓蠢隕√↑繝。繧ス繝繝峨〒縺吶ゅ%縺ョ繝。繧ス繝繝峨ョ蜀螳ケ繧 + /// 繧ウ繝シ繝 繧ィ繝繧」繧ソ繝シ縺ァ螟画峩縺励↑縺縺ァ縺上□縺輔>縲 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CrystalDatabaseControl)); + this.ReadDatabaseWorker = new System.ComponentModel.BackgroundWorker(); + this.dataGridView = new System.Windows.Forms.DataGridView(); + this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.densityDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.formulaDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.aDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.bDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.cDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.alphaDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.betaDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.gammaDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.crystalSystemDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.pointGroupDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.spaceGroupDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.authorsDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.titleDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.journalDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.bindingSource = new System.Windows.Forms.BindingSource(this.components); + this.dataSet = new Crystallography.Controls.DataSet(); + this.SaveDatabaseWorker = new System.ComponentModel.BackgroundWorker(); + this.bindingNavigator = new System.Windows.Forms.BindingNavigator(this.components); + this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); + this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox(); + this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButtonDelete = new System.Windows.Forms.ToolStripButton(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataSet)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingNavigator)).BeginInit(); + this.bindingNavigator.SuspendLayout(); + this.SuspendLayout(); + // + // ReadDatabaseWorker + // + this.ReadDatabaseWorker.WorkerReportsProgress = true; + this.ReadDatabaseWorker.WorkerSupportsCancellation = true; + this.ReadDatabaseWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.ReadDatabaseWorker_DoWork); + this.ReadDatabaseWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.ReadDatabaseWorker_ProgressChanged); + this.ReadDatabaseWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.ReadDatabaseWorker_RunWorkerCompleted); + // + // dataGridView + // + this.dataGridView.AllowUserToAddRows = false; + this.dataGridView.AllowUserToDeleteRows = false; + this.dataGridView.AllowUserToResizeRows = false; + this.dataGridView.AutoGenerateColumns = false; + this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.nameDataGridViewTextBoxColumn, + this.densityDataGridViewTextBoxColumn, + this.formulaDataGridViewTextBoxColumn, + this.aDataGridViewTextBoxColumn, + this.bDataGridViewTextBoxColumn, + this.cDataGridViewTextBoxColumn, + this.alphaDataGridViewTextBoxColumn, + this.betaDataGridViewTextBoxColumn, + this.gammaDataGridViewTextBoxColumn, + this.crystalSystemDataGridViewTextBoxColumn, + this.pointGroupDataGridViewTextBoxColumn, + this.spaceGroupDataGridViewTextBoxColumn, + this.authorsDataGridViewTextBoxColumn, + this.titleDataGridViewTextBoxColumn, + this.journalDataGridViewTextBoxColumn}); + this.dataGridView.DataSource = this.bindingSource; + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle9.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView.DefaultCellStyle = dataGridViewCellStyle9; + this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridView.Location = new System.Drawing.Point(0, 24); + this.dataGridView.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.dataGridView.MultiSelect = false; + this.dataGridView.Name = "dataGridView"; + this.dataGridView.ReadOnly = true; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter; + dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle10.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle10; + this.dataGridView.RowHeadersVisible = false; + this.dataGridView.RowHeadersWidth = 44; + this.dataGridView.RowTemplate.Height = 21; + this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView.Size = new System.Drawing.Size(1191, 130); + this.dataGridView.TabIndex = 76; + // + // nameDataGridViewTextBoxColumn + // + this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name"; + this.nameDataGridViewTextBoxColumn.HeaderText = "Name"; + this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn"; + this.nameDataGridViewTextBoxColumn.ReadOnly = true; + // + // densityDataGridViewTextBoxColumn + // + this.densityDataGridViewTextBoxColumn.DataPropertyName = "Density"; + dataGridViewCellStyle2.Format = "N4"; + dataGridViewCellStyle2.NullValue = null; + this.densityDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2; + this.densityDataGridViewTextBoxColumn.HeaderText = "Density"; + this.densityDataGridViewTextBoxColumn.Name = "densityDataGridViewTextBoxColumn"; + this.densityDataGridViewTextBoxColumn.ReadOnly = true; + this.densityDataGridViewTextBoxColumn.Width = 65; + // + // formulaDataGridViewTextBoxColumn + // + this.formulaDataGridViewTextBoxColumn.DataPropertyName = "Formula"; + this.formulaDataGridViewTextBoxColumn.HeaderText = "Formula"; + this.formulaDataGridViewTextBoxColumn.Name = "formulaDataGridViewTextBoxColumn"; + this.formulaDataGridViewTextBoxColumn.ReadOnly = true; + // + // aDataGridViewTextBoxColumn + // + this.aDataGridViewTextBoxColumn.DataPropertyName = "A"; + dataGridViewCellStyle3.Format = "#.######"; + dataGridViewCellStyle3.NullValue = null; + this.aDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3; + this.aDataGridViewTextBoxColumn.HeaderText = "a"; + this.aDataGridViewTextBoxColumn.Name = "aDataGridViewTextBoxColumn"; + this.aDataGridViewTextBoxColumn.ReadOnly = true; + this.aDataGridViewTextBoxColumn.Width = 60; + // + // bDataGridViewTextBoxColumn + // + this.bDataGridViewTextBoxColumn.DataPropertyName = "B"; + dataGridViewCellStyle4.Format = "#.######"; + dataGridViewCellStyle4.NullValue = null; + this.bDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4; + this.bDataGridViewTextBoxColumn.HeaderText = "b"; + this.bDataGridViewTextBoxColumn.Name = "bDataGridViewTextBoxColumn"; + this.bDataGridViewTextBoxColumn.ReadOnly = true; + this.bDataGridViewTextBoxColumn.Width = 60; + // + // cDataGridViewTextBoxColumn + // + this.cDataGridViewTextBoxColumn.DataPropertyName = "C"; + dataGridViewCellStyle5.Format = "#.######"; + dataGridViewCellStyle5.NullValue = null; + this.cDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5; + this.cDataGridViewTextBoxColumn.HeaderText = "c"; + this.cDataGridViewTextBoxColumn.Name = "cDataGridViewTextBoxColumn"; + this.cDataGridViewTextBoxColumn.ReadOnly = true; + this.cDataGridViewTextBoxColumn.Width = 60; + // + // alphaDataGridViewTextBoxColumn + // + this.alphaDataGridViewTextBoxColumn.DataPropertyName = "Alpha"; + dataGridViewCellStyle6.Format = "#.######"; + dataGridViewCellStyle6.NullValue = null; + this.alphaDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle6; + this.alphaDataGridViewTextBoxColumn.HeaderText = "ホア"; + this.alphaDataGridViewTextBoxColumn.Name = "alphaDataGridViewTextBoxColumn"; + this.alphaDataGridViewTextBoxColumn.ReadOnly = true; + this.alphaDataGridViewTextBoxColumn.Width = 60; + // + // betaDataGridViewTextBoxColumn + // + this.betaDataGridViewTextBoxColumn.DataPropertyName = "Beta"; + dataGridViewCellStyle7.Format = "#.######"; + dataGridViewCellStyle7.NullValue = null; + this.betaDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle7; + this.betaDataGridViewTextBoxColumn.HeaderText = "ホイ"; + this.betaDataGridViewTextBoxColumn.Name = "betaDataGridViewTextBoxColumn"; + this.betaDataGridViewTextBoxColumn.ReadOnly = true; + this.betaDataGridViewTextBoxColumn.Width = 60; + // + // gammaDataGridViewTextBoxColumn + // + this.gammaDataGridViewTextBoxColumn.DataPropertyName = "Gamma"; + dataGridViewCellStyle8.Format = "#.######"; + dataGridViewCellStyle8.NullValue = null; + this.gammaDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle8; + this.gammaDataGridViewTextBoxColumn.HeaderText = "ホウ"; + this.gammaDataGridViewTextBoxColumn.Name = "gammaDataGridViewTextBoxColumn"; + this.gammaDataGridViewTextBoxColumn.ReadOnly = true; + this.gammaDataGridViewTextBoxColumn.Width = 60; + // + // crystalSystemDataGridViewTextBoxColumn + // + this.crystalSystemDataGridViewTextBoxColumn.DataPropertyName = "CrystalSystem"; + this.crystalSystemDataGridViewTextBoxColumn.HeaderText = "Crystal System"; + this.crystalSystemDataGridViewTextBoxColumn.Name = "crystalSystemDataGridViewTextBoxColumn"; + this.crystalSystemDataGridViewTextBoxColumn.ReadOnly = true; + this.crystalSystemDataGridViewTextBoxColumn.Width = 115; + // + // pointGroupDataGridViewTextBoxColumn + // + this.pointGroupDataGridViewTextBoxColumn.DataPropertyName = "PointGroup"; + this.pointGroupDataGridViewTextBoxColumn.HeaderText = "Point Group"; + this.pointGroupDataGridViewTextBoxColumn.Name = "pointGroupDataGridViewTextBoxColumn"; + this.pointGroupDataGridViewTextBoxColumn.ReadOnly = true; + this.pointGroupDataGridViewTextBoxColumn.Width = 105; + // + // spaceGroupDataGridViewTextBoxColumn + // + this.spaceGroupDataGridViewTextBoxColumn.DataPropertyName = "SpaceGroup"; + this.spaceGroupDataGridViewTextBoxColumn.HeaderText = "Space Group"; + this.spaceGroupDataGridViewTextBoxColumn.Name = "spaceGroupDataGridViewTextBoxColumn"; + this.spaceGroupDataGridViewTextBoxColumn.ReadOnly = true; + this.spaceGroupDataGridViewTextBoxColumn.Width = 110; + // + // authorsDataGridViewTextBoxColumn + // + this.authorsDataGridViewTextBoxColumn.DataPropertyName = "Authors"; + this.authorsDataGridViewTextBoxColumn.HeaderText = "Authors"; + this.authorsDataGridViewTextBoxColumn.Name = "authorsDataGridViewTextBoxColumn"; + this.authorsDataGridViewTextBoxColumn.ReadOnly = true; + this.authorsDataGridViewTextBoxColumn.Width = 85; + // + // titleDataGridViewTextBoxColumn + // + this.titleDataGridViewTextBoxColumn.DataPropertyName = "Title"; + this.titleDataGridViewTextBoxColumn.HeaderText = "Title"; + this.titleDataGridViewTextBoxColumn.Name = "titleDataGridViewTextBoxColumn"; + this.titleDataGridViewTextBoxColumn.ReadOnly = true; + this.titleDataGridViewTextBoxColumn.Width = 85; + // + // journalDataGridViewTextBoxColumn + // + this.journalDataGridViewTextBoxColumn.DataPropertyName = "Journal"; + this.journalDataGridViewTextBoxColumn.HeaderText = "Journal"; + this.journalDataGridViewTextBoxColumn.Name = "journalDataGridViewTextBoxColumn"; + this.journalDataGridViewTextBoxColumn.ReadOnly = true; + this.journalDataGridViewTextBoxColumn.Width = 85; + // + // bindingSource + // + this.bindingSource.DataMember = "DataTableCrystalDatabase"; + this.bindingSource.DataSource = this.dataSet; + this.bindingSource.CurrentChanged += new System.EventHandler(this.bindingSource_CurrentChanged); + // + // dataSet + // + this.dataSet.DataSetName = "DataSet"; + this.dataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; + // + // SaveDatabaseWorker + // + this.SaveDatabaseWorker.WorkerReportsProgress = true; + this.SaveDatabaseWorker.WorkerSupportsCancellation = true; + this.SaveDatabaseWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.SaveDatabaseWorker_DoWork); + this.SaveDatabaseWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.SaveDatabaseWorker_ProgressChanged); + this.SaveDatabaseWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.SaveDatabaseWorker_RunWorkerCompleted); + // + // bindingNavigator + // + this.bindingNavigator.AddNewItem = null; + this.bindingNavigator.BindingSource = this.bindingSource; + this.bindingNavigator.CountItem = this.bindingNavigatorCountItem; + this.bindingNavigator.DeleteItem = this.toolStripButtonDelete; + this.bindingNavigator.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.bindingNavigator.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bindingNavigatorMoveFirstItem, + this.bindingNavigatorMovePreviousItem, + this.bindingNavigatorSeparator, + this.bindingNavigatorPositionItem, + this.bindingNavigatorCountItem, + this.bindingNavigatorSeparator1, + this.bindingNavigatorMoveNextItem, + this.bindingNavigatorMoveLastItem, + this.bindingNavigatorSeparator2, + this.toolStripButtonDelete}); + this.bindingNavigator.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; + this.bindingNavigator.Location = new System.Drawing.Point(0, 0); + this.bindingNavigator.MoveFirstItem = this.bindingNavigatorMoveFirstItem; + this.bindingNavigator.MoveLastItem = this.bindingNavigatorMoveLastItem; + this.bindingNavigator.MoveNextItem = this.bindingNavigatorMoveNextItem; + this.bindingNavigator.MovePreviousItem = this.bindingNavigatorMovePreviousItem; + this.bindingNavigator.Name = "bindingNavigator"; + this.bindingNavigator.PositionItem = this.bindingNavigatorPositionItem; + this.bindingNavigator.Size = new System.Drawing.Size(1191, 24); + this.bindingNavigator.TabIndex = 77; + this.bindingNavigator.Text = "bindingNavigator"; + // + // bindingNavigatorCountItem + // + this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; + this.bindingNavigatorCountItem.Size = new System.Drawing.Size(32, 17); + this.bindingNavigatorCountItem.Text = "/ {0}"; + this.bindingNavigatorCountItem.ToolTipText = "鬆逶ョ縺ョ邱乗焚"; + // + // bindingNavigatorMoveFirstItem + // + this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image"))); + this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem"; + this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 20); + this.bindingNavigatorMoveFirstItem.Text = "譛蛻昴↓遘サ蜍"; + // + // bindingNavigatorMovePreviousItem + // + this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image"))); + this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem"; + this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 20); + this.bindingNavigatorMovePreviousItem.Text = "蜑阪↓謌サ繧"; + // + // bindingNavigatorSeparator + // + this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator"; + this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 23); + // + // bindingNavigatorPositionItem + // + this.bindingNavigatorPositionItem.AccessibleName = "菴咲スョ"; + this.bindingNavigatorPositionItem.AutoSize = false; + this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem"; + this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23); + this.bindingNavigatorPositionItem.Text = "0"; + this.bindingNavigatorPositionItem.ToolTipText = "迴セ蝨ィ縺ョ蝣エ謇"; + // + // bindingNavigatorSeparator1 + // + this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1"; + this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 23); + // + // bindingNavigatorMoveNextItem + // + this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image"))); + this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem"; + this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 20); + this.bindingNavigatorMoveNextItem.Text = "谺。縺ォ遘サ蜍"; + // + // bindingNavigatorMoveLastItem + // + this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image"))); + this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem"; + this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 20); + this.bindingNavigatorMoveLastItem.Text = "譛蠕後↓遘サ蜍"; + // + // bindingNavigatorSeparator2 + // + this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; + this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 23); + // + // toolStripButtonDelete + // + this.toolStripButtonDelete.BackColor = System.Drawing.Color.IndianRed; + this.toolStripButtonDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButtonDelete.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.toolStripButtonDelete.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonDelete.Image"))); + this.toolStripButtonDelete.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonDelete.Name = "toolStripButtonDelete"; + this.toolStripButtonDelete.Size = new System.Drawing.Size(49, 21); + this.toolStripButtonDelete.Text = "Delete"; + // + // CrystalDatabaseControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.dataGridView); + this.Controls.Add(this.bindingNavigator); + this.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Name = "CrystalDatabaseControl"; + this.Size = new System.Drawing.Size(1191, 154); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataSet)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingNavigator)).EndInit(); + this.bindingNavigator.ResumeLayout(false); + this.bindingNavigator.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.BindingSource bindingSource; + private System.Windows.Forms.DataGridView dataGridView; + private DataSet dataSet; + public System.ComponentModel.BackgroundWorker SaveDatabaseWorker; + public System.ComponentModel.BackgroundWorker ReadDatabaseWorker; + private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn densityDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn formulaDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn aDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn bDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn cDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn alphaDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn betaDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn gammaDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn crystalSystemDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn pointGroupDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn spaceGroupDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn authorsDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn titleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn journalDataGridViewTextBoxColumn; + private System.Windows.Forms.BindingNavigator bindingNavigator; + private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator; + private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2; + private System.Windows.Forms.ToolStripButton toolStripButtonDelete; + } +} diff --git a/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.cs b/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.cs new file mode 100644 index 0000000..a97440a --- /dev/null +++ b/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.cs @@ -0,0 +1,399 @@ +サソusing System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Windows.Forms; +using System.IO; +using System.Security.Cryptography; +using System.Threading; +using System.Diagnostics; +using System.Runtime.Serialization.Formatters.Binary; +using System.ComponentModel; +using System.Drawing; +using MessagePack; +using MessagePack.Resolvers; + +namespace Crystallography.Controls +{ + public partial class CrystalDatabaseControl : UserControl + { + #region 繝輔ぅ繝シ繝ォ繝峨√Γ繧ス繝繝峨√う繝吶Φ繝 + public string Filter { get => bindingSource.Filter; set => bindingSource.Filter = value; } + + public float FontSize + { + get => dataGridView.Font.Size; + set => dataGridView.Font = new Font(dataGridView.Font.FontFamily, value); + } + + readonly Stopwatch sw = new Stopwatch(); + + readonly ReaderWriterLockSlim rwlock = new ReaderWriterLockSlim(); + + readonly MessagePackSerializerOptions msgOptions = StandardResolverAllowPrivate.Options.WithCompression(MessagePackCompression.Lz4BlockArray); + + byte[] serialize(T c) => MessagePackSerializer.Serialize(c, msgOptions); + + T deserialize(ReadOnlyMemory buffer, out int byteRead) => MessagePackSerializer.Deserialize(buffer, msgOptions, out byteRead); + T deserialize(object obj) => MessagePackSerializer.Deserialize((byte[])obj, msgOptions); + + public Crystal Crystal => Crystal2.GetCrystal(Crystal2); + + public Crystal2 Crystal2 => dataSet.DataTableCrystalDatabase.Get(bindingSource.Current); + + + readonly DataSet.DataTableCrystalDatabaseDataTable dataTable; + + public event EventHandler CrystalChanged; + + public delegate void ProgressChangedEventHandler(object sender, double progress, string message); + public event ProgressChangedEventHandler ProgressChanged; + + #endregion + + #region 繧ウ繝ウ繧ケ繝医Λ繧ッ繧ソ + public CrystalDatabaseControl() + { + InitializeComponent(); + dataTable = dataSet.DataTableCrystalDatabase; + } + #endregion + + #region 繝繝シ繧ソ繝吶シ繧ケ隱ュ縺ソ霎シ縺ソ/譖ク縺崎セシ縺ソ髢「騾」 + + #region 繝舌う繝域嶌縺崎セシ縺ソ/隱ュ縺ソ霎シ縺ソ + private int readInt(Stream s) => BitConverter.ToInt32(readBytes(s, 4), 0); + private int readByte(Stream s) => s.ReadByte(); + private long readLong(Stream s) => BitConverter.ToInt64(readBytes(s, 8), 0); + + private byte[] readBytes(Stream s, int length) + { + var bytes = new byte[length]; + s.Read(bytes, 0, bytes.Length); + return bytes; + } + + private void writeInt(Stream s, int v) => s.Write(BitConverter.GetBytes(v), 0, 4); + private void writeLong(Stream s, long v) => s.Write(BitConverter.GetBytes(v), 0, 8); + private void writeByte(Stream s, byte v) => s.WriteByte(v); + private void writeBytes(Stream s, byte[] v) => s.Write(v, 0, v.Length); + + #endregion + + #region 繝繝シ繧ソ繝吶シ繧ケ隱ュ縺ソ霎シ縺ソ + public void ReadDatabase(string filename) + { + bindingSource.DataMember = ""; + this.Enabled = false; + ReadDatabaseWorker.RunWorkerAsync(filename); + } + private void ReadDatabaseWorker_DoWork(object sender, DoWorkEventArgs e) + { + var filename = (string)e.Argument; + try + { + sw.Restart(); + //if (filename.ToLower().EndsWith("cdb2")) + //{ + // var progressStep = 500; + // using var fs = new FileStream(filename, FileMode.Open, FileAccess.Read); + // var formatter = new BinaryFormatter(); + // var total = (int)formatter.Deserialize(fs); + // for (int i = 0; i < total; i++) + // { + // var c = (Crystal2)formatter.Deserialize(fs); + // dataTable.Add(c); + + // if (i > progressStep * 2 && i % progressStep == 0) + // report(i, total, sw.ElapsedMilliseconds, "Loading database..."); + // } + //} + //else + if (filename.ToLower().EndsWith("cdb3")) + { + using var fs = new FileStream(filename, FileMode.Open, FileAccess.Read); + int flag = readByte(fs), total = readInt(fs); + if (flag == 100)//蜊倅ク繝輔ぃ繧、繝ォ縺ョ譎 + { + var b = new ReadOnlyMemory(File.ReadAllBytes(filename)).Slice(5); + while (b.Length != 0) + { + deserialize(b, out var byteRead).AsParallel().Select(c2 => dataTable.CreateRow(c2)) + .ToList().ForEach(r => dataTable.Rows.Add(r)); + ReadDatabaseWorker.ReportProgress(0, report(dataTable.Rows.Count, total, sw.ElapsedMilliseconds, "Loading database...")); + b = b.Slice(byteRead); + } + } + else if (flag == 200)//蛻蜑イ繝輔ぃ繧、繝ォ縺ョ譎 + { + var fileNum = readInt(fs); + var fileNames = Enumerable.Range(0, fileNum).Select(i => + $"{filename.Remove(filename.Length - 5, 5)}\\{Path.GetFileNameWithoutExtension(filename)}.{i:000}").AsParallel(); + + fileNames.ForAll(fn => + { + var b = new ReadOnlyMemory(File.ReadAllBytes(fn)); + while (b.Length != 0) + { + var rows = Array.ConvertAll(deserialize(b, out var byteRead), dataTable.CreateRow); + rwlock.EnterWriteLock(); + try { foreach (var r in rows) dataTable.Rows.Add(r); } + finally { rwlock.ExitWriteLock(); } + ReadDatabaseWorker.ReportProgress(0, report(dataTable.Rows.Count, total, sw.ElapsedMilliseconds, "Loading database...")); + b = b.Slice(byteRead); + } + }); + } + } + else + return; + } + catch + { + MessageBox.Show("Failed to load database. Sorry."); + } + bindingSource.Position = 0; + } + + private void ReadDatabaseWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) + { + (double progress, string message) = ((double Progress, string Message))e.UserState; + ProgressChanged?.Invoke(sender, progress, message); + } + + private void ReadDatabaseWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + this.Enabled = true; + ProgressChanged?.Invoke(sender, 1, $"Toatal loading time: {sw.ElapsedMilliseconds / 1E3:f1} sec."); + bindingSource.DataMember = "DataTableCrystalDatabase"; + } + + #endregion + + #region 繝繝シ繧ソ繝吶シ繧ケ譖ク縺崎セシ縺ソ + public void SaveDatabase(string fn) + { + this.Enabled = false; + SaveDatabaseWorker.RunWorkerAsync(fn); + } + private void SaveDatabaseWorker_DoWork(object sender, DoWorkEventArgs e) + { + sw.Restart(); + + var fn = (string)e.Argument; + + var thresholdBytes = 30000000; + var division = 4000;//蛻蜑イ蜊倅ス 縺溘カ繧薙ヱ繝輔か繝シ繝槭Φ繧ケ縺ォ蜉ケ縺 + + var total = dataTable.Count; + + using var fs = new FileStream(fn, FileMode.Create, FileAccess.Write); + + writeByte(fs, 100);//縺ィ繧翫≠縺医★蜈磯ュ縺ォ100 (蛻蜑イ縺ェ縺)繧呈嶌縺崎セシ繧 + writeInt(fs, total);//繝繝シ繧ソ縺ョ蛟区焚繧呈嶌縺崎セシ繧 + + var byteList = new List(); + var filecounter = 0; + var subDir = fn.Remove(fn.Length - 5, 5) + "\\"; + var header = subDir + Path.GetFileNameWithoutExtension(fn) + "."; + var fileSize = new List(); + for (int i = 0; i < total; i += division) + { + var crystal2List = new List(); + for (int j = i; j < total && j < i + division; j++) + { + var c2 = deserialize(((DataRowView)bindingSource[j]).Row[0]); + c2.jour = Crystal2.GetShortJournal(c2.jour); + c2.sect = Crystal2.GetShortTitle(c2.sect); + crystal2List.Add(c2); + } + byteList.AddRange(serialize(crystal2List.ToArray())); + + //譛蠕後∪縺ァ譚・縺ヲ縺繧区凾縺ァ縲√°縺、髢セ蛟、莉・荳九ョ螳ケ驥上〒縲√°縺、縺薙l縺セ縺ァ荳蠎ヲ繧ょ蜑イ繧ゅ@縺ヲ縺縺ェ縺蝣エ蜷 + if (i + division >= total && byteList.Count <= thresholdBytes && filecounter == 0) + fs.Write(byteList.ToArray(), 0, byteList.Count);//譛蛻昴ョ繝輔ぃ繧、繝ォ縺ォ譖ク縺崎セシ繧薙〒邨ゆコ + + //譛蠕後∪縺ァ譚・縺ヲ縺繧区凾縺九髢セ蛟、莉・荳翫ョ螳ケ驥上ョ蝣エ蜷 + else if (i + division >= total || byteList.Count > thresholdBytes) + { + if (filecounter == 0) + Directory.CreateDirectory(fn.Remove(fn.Length - 5, 5)); + using (var fs1 = new FileStream(header + filecounter.ToString("000"), FileMode.Create, FileAccess.Write)) + fs1.Write(byteList.ToArray(), 0, byteList.Count); + fileSize.Add(byteList.Count); + byteList.Clear(); + + filecounter++; + } + SaveDatabaseWorker.ReportProgress(0, report(i, total, sw.ElapsedMilliseconds, "Saving database...")); + } + + if (filecounter > 0)//蛻蜑イ繝輔ぃ繧、繝ォ縺ォ縺ェ縺」縺溷エ蜷 + { + //蛻蜑イ繝輔ぃ繧、繝ォ謨ー譖ク縺崎セシ縺ソ + writeInt(fs, filecounter); + //繝輔ぃ繧、繝ォ繧オ繧、繧コ譖ク縺崎セシ縺ソ + for (int i = 0; i < filecounter; i++) + writeLong(fs, fileSize[i]); + //繝√ぉ繝繧ッ繧オ繝繧呈嶌縺崎セシ縺ソ + for (int i = 0; i < filecounter; i++) + writeBytes(fs, getMD5(header + i.ToString("000"))); + //譛蠕後↓蜈磯ュ縺ォ謌サ縺」縺ヲ200繧呈嶌縺崎セシ縺ソ + fs.Position = 0; + writeByte(fs, 200); + } + } + + private void SaveDatabaseWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) + { + (double progress, string message) = ((double Progress, string Message))e.UserState; + ProgressChanged?.Invoke(sender, progress, message); + } + + private void SaveDatabaseWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + this.Enabled = true; + ProgressChanged?.Invoke(sender, 1, $"Toatal saving time: {sw.ElapsedMilliseconds / 1E3:f1} sec."); + } + + #endregion + + #region 繝繝シ繧ソ繝吶シ繧ケ縺ョ豁」蠖捺ァ繝√ぉ繝繧ッ + /// + /// 蛻蜑イ繝輔ぃ繧、繝ォ縺後″縺。繧薙→菴懈舌&繧後※縺繧九°繧偵メ繧ァ繝繧ッ + /// + /// + /// + public (bool Valid, int DataNum, int FileNum, long[] FileSizes, byte[][] CheckSums) CheckDatabaseFiles(string filename, bool checkMD5) + { + sw.Restart(); + var nameWithoutExt = Path.GetFileNameWithoutExtension(filename); + var subDir = Path.GetDirectoryName(filename) + "\\" + nameWithoutExt + "\\"; + try + { + int dataNum = 0, fileNum = 0; + var fileSizes = new long[0]; + var checkSums = new byte[0][]; + + if (File.Exists(filename)) + { + //繝繝シ繧ソ蛟区焚縲√ヵ繧。繧、繝ォ謨ー繧貞叙蠕 + using (var fs = new FileStream(filename, FileMode.Open)) + { + var head = readByte(fs); + dataNum = readInt(fs); + fileNum = readInt(fs); + + fileSizes = new long[fileNum]; + for (int i = 0; i < fileNum; i++) + fileSizes[i] = readLong(fs); + + checkSums = new byte[fileNum][]; + for (int i = 0; i < fileNum; i++) + checkSums[i] = readBytes(fs, 16); + } + if (checkMD5) + { + //md5繧偵メ繧ァ繝繧ッ + bool flag = true; + for (int i = 0; i < fileNum && flag; i++) + flag = this.checkMD5($"{subDir}{nameWithoutExt}.{i:000}", checkSums[i]); + return (flag, dataNum, fileNum, fileSizes, checkSums); + } + else + return (false, dataNum, fileNum, fileSizes, checkSums); + } + return (false, 0, 0, null, null); + } + catch + { return (false, 0, 0, null, null); } + } + + + /// + /// MD5繧貞叙蠕励☆繧九ゅヵ繧。繧、繝ォ縺悟ュ伜惠縺励↑縺蝣エ蜷医ッnull繧定ソ斐☆縲 + /// + /// + /// + private byte[] getMD5(string path) + { + if (!File.Exists(path)) + return null; + using (var fs = new FileStream(path, FileMode.Open)) + return MD5.Create().ComputeHash(fs); + } + + /// + /// MD5縺ィ繝輔ぃ繧、繝ォ縺御ク閾エ縺吶k縺九←縺縺玖ェソ縺ケ繧九 + /// + /// + /// + /// + /// + private bool checkMD5(string path, byte[] md5) + { + var _md5 = getMD5(path); + return _md5 != null && md5.Length == _md5.Length && md5.SequenceEqual(_md5); + } + #endregion + + #endregion + + #region 騾イ謐礼憾豕√ョ繝ャ繝昴シ繝 + /// + /// 騾イ謐礼憾豕 + /// + /// + /// + /// 邨碁℃譎る俣 + /// 繝。繝繧サ繝シ繧ク + /// + /// + /// + /// + /// + private (double Progress, string Message) report(long current, long total, long elapsedMilliseconds, string message, + bool showPercentage = true, bool showEllapsedTime = true, bool showRemainTime = true, int digit = 1) + { + var ratio = Math.Min(1, (double)current / total); + var ellapsedSec = elapsedMilliseconds / 1E3; + var format = $"f{digit}"; + + if (showPercentage) message += $" Completed: {(ratio * 100).ToString(format)} %."; + if (showEllapsedTime) message += $" Elappsed time: {ellapsedSec.ToString(format)} sec."; + if (showRemainTime) message += $" Remaining time: {(ellapsedSec / current * (total - current)).ToString(format)} sec."; + + return (ratio, message); + } + #endregion + + #region 邨先匕縺ョ霑ス蜉縲∝炎髯、縲∝、画峩 + public void AddCrystal(Crystal2 crystal2) + { + + dataTable.Add(crystal2); + } + + public void ChangeCrystal(Crystal2 crystal2) + { + int i = bindingSource.IndexOf(bindingSource.Current); + if (i < 0) + AddCrystal(crystal2); + else + dataTable.Replace(bindingSource.Current, crystal2); + } + + public void DeleteCurrentCrystal() => bindingSource.RemoveCurrent(); + + public void ClearAll() => dataTable.Clear(); + #endregion + + #region 驕ク謚樒オ先匕縺悟、画峩縺輔l縺溘→縺 + private void bindingSource_CurrentChanged(object sender, EventArgs e) + { + CrystalChanged?.Invoke(sender, e); + } + #endregion + + } +} diff --git a/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.resx b/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.resx new file mode 100644 index 0000000..8ce0795 --- /dev/null +++ b/Crystallography.Controls/CrystalDatabase/CrystalDatabaseControl.resx @@ -0,0 +1,191 @@ +サソ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 16, 17 + + + 374, 18 + + + 526, 22 + + + 193, 19 + + + 619, 22 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 + wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 + v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg + UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA + Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu + lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w + 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f + Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ + 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 + n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI + N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f + oAc0QjgAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// + h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B + twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA + kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG + WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9 + 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/Crystallography.Controls/FormPeriodicTable.Designer.cs b/Crystallography.Controls/CrystalDatabase/FormPeriodicTable.Designer.cs similarity index 96% rename from Crystallography.Controls/FormPeriodicTable.Designer.cs rename to Crystallography.Controls/CrystalDatabase/FormPeriodicTable.Designer.cs index 0bbf395..6bce018 100644 --- a/Crystallography.Controls/FormPeriodicTable.Designer.cs +++ b/Crystallography.Controls/CrystalDatabase/FormPeriodicTable.Designer.cs @@ -121,7 +121,7 @@ private void InitializeComponent() // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Segoe UI Symbol", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(277, 9); + this.label3.Location = new System.Drawing.Point(274, 9); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(76, 15); @@ -166,7 +166,7 @@ private void InitializeComponent() // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonOK.Font = new System.Drawing.Font("Segoe UI Symbol", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonOK.Location = new System.Drawing.Point(530, 233); + this.buttonOK.Location = new System.Drawing.Point(476, 257); this.buttonOK.Margin = new System.Windows.Forms.Padding(0); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(118, 28); @@ -179,9 +179,7 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.AutoSize = true; - this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.ClientSize = new System.Drawing.Size(648, 261); + this.ClientSize = new System.Drawing.Size(595, 286); this.Controls.Add(this.buttonLa); this.Controls.Add(this.buttonMayInclude); this.Controls.Add(this.buttonMustInclude); @@ -199,7 +197,6 @@ private void InitializeComponent() this.Name = "FormPeriodicTable"; this.Text = "Periodic Table"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormPeriodicTable_FormClosing); - this.Load += new System.EventHandler(this.FormPeriodicTable_Load); this.ResumeLayout(false); this.PerformLayout(); diff --git a/Crystallography.Controls/FormPeriodicTable.cs b/Crystallography.Controls/CrystalDatabase/FormPeriodicTable.cs similarity index 93% rename from Crystallography.Controls/FormPeriodicTable.cs rename to Crystallography.Controls/CrystalDatabase/FormPeriodicTable.cs index 5d6c366..47347ca 100644 --- a/Crystallography.Controls/FormPeriodicTable.cs +++ b/Crystallography.Controls/CrystalDatabase/FormPeriodicTable.cs @@ -21,9 +21,6 @@ public partial class FormPeriodicTable : Form private Color IncludeColor = Color.LightBlue; private Color NeutralColor = Color.LightYellow; - - - public FormPeriodicTable() { InitializeComponent(); @@ -197,6 +194,14 @@ public FormPeriodicTable() labelAc.Location = new Point(14, height * 8 + 4); for (int i = 89; i <= 103; i++) button[i].Location = new Point((i - 89 + 3) * width, height * 8);//Ac~Lr + + // buttonOK.Location = new Point(button[103].Location.X + width - buttonOK.Width, + // button[103].Location.Y + height + 4); + + //Size = new Size(buttonOK.Location.X + buttonOK.Width + 4, buttonOK.Location.Y + buttonOK.Height + 4); + + + ; } private void button_Click(object sender, EventArgs e) @@ -242,6 +247,11 @@ private void buttonMustExclude_Click(object sender, EventArgs e) private void FormPeriodicTable_Load(object sender, EventArgs e) { + // buttonOK.Location = new Point(button[103].Location.X + button[103].Width - buttonOK.Width, + // button[103].Location.Y + button[103].Height + 4); + + // Size = new Size(buttonOK.Location.X + buttonOK.Width + 4, buttonOK.Location.Y + buttonOK.Height + 4); + // buttonOK.BringToFront(); } } } \ No newline at end of file diff --git a/Crystallography.Controls/FormPeriodicTable.resx b/Crystallography.Controls/CrystalDatabase/FormPeriodicTable.resx similarity index 100% rename from Crystallography.Controls/FormPeriodicTable.resx rename to Crystallography.Controls/CrystalDatabase/FormPeriodicTable.resx diff --git a/Crystallography.Controls/CrystalDatabase/SearchCrystalControl.Designer.cs b/Crystallography.Controls/CrystalDatabase/SearchCrystalControl.Designer.cs new file mode 100644 index 0000000..d9f4324 --- /dev/null +++ b/Crystallography.Controls/CrystalDatabase/SearchCrystalControl.Designer.cs @@ -0,0 +1,769 @@ +サソnamespace Crystallography.Controls +{ + partial class SearchCrystalControl + { + /// + /// 蠢隕√↑繝繧カ繧、繝翫シ螟画焚縺ァ縺吶 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 菴ソ逕ィ荳ュ縺ョ繝ェ繧ス繝シ繧ケ繧偵☆縺ケ縺ヲ繧ッ繝ェ繝シ繝ウ繧「繝繝励@縺セ縺吶 + /// + /// 繝槭ロ繝シ繧ク繝 繝ェ繧ス繝シ繧ケ繧堤エ譽縺吶k蝣エ蜷医ッ true 繧呈欠螳壹@縲√◎縺ョ莉悶ョ蝣エ蜷医ッ false 繧呈欠螳壹@縺セ縺吶 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 繧ウ繝ウ繝昴シ繝阪Φ繝 繝繧カ繧、繝翫シ縺ァ逕滓舌&繧後◆繧ウ繝シ繝 + + /// + /// 繝繧カ繧、繝翫シ 繧オ繝昴シ繝医↓蠢隕√↑繝。繧ス繝繝峨〒縺吶ゅ%縺ョ繝。繧ス繝繝峨ョ蜀螳ケ繧 + /// 繧ウ繝シ繝 繧ィ繝繧」繧ソ繝シ縺ァ螟画峩縺励↑縺縺ァ縺上□縺輔>縲 + /// + private void InitializeComponent() + { + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.checkBoxSearchName = new System.Windows.Forms.CheckBox(); + this.textBoxSearchName = new System.Windows.Forms.TextBox(); + this.checkBoxSearchElements = new System.Windows.Forms.CheckBox(); + this.buttonPeriodicTable = new System.Windows.Forms.Button(); + this.checkBoxSearchRefference = new System.Windows.Forms.CheckBox(); + this.textBoxSearchRefference = new System.Windows.Forms.TextBox(); + this.checkBoxSearchCrystalSystem = new System.Windows.Forms.CheckBox(); + this.comboBoxSearchCrystalSystem = new System.Windows.Forms.ComboBox(); + this.checkBoxSearchCellParameter = new System.Windows.Forms.CheckBox(); + this.groupBoxCellParameter = new System.Windows.Forms.GroupBox(); + this.numericBoxCellGamma = new Crystallography.Controls.NumericBox(); + this.numericBoxCellAngleErr = new Crystallography.Controls.NumericBox(); + this.numericBoxCellLengthErr = new Crystallography.Controls.NumericBox(); + this.numericBoxCellC = new Crystallography.Controls.NumericBox(); + this.numericBoxCellBeta = new Crystallography.Controls.NumericBox(); + this.numericBoxCellAlpha = new Crystallography.Controls.NumericBox(); + this.numericBoxCellB = new Crystallography.Controls.NumericBox(); + this.numericBoxCellA = new Crystallography.Controls.NumericBox(); + this.checkBoxDspacing = new System.Windows.Forms.CheckBox(); + this.groupBoxDspacing = new System.Windows.Forms.GroupBox(); + this.checkBoxD3 = new System.Windows.Forms.CheckBox(); + this.numericBoxD3Err = new Crystallography.Controls.NumericBox(); + this.numericBoxD2Err = new Crystallography.Controls.NumericBox(); + this.numericBoxD1Err = new Crystallography.Controls.NumericBox(); + this.checkBoxD2 = new System.Windows.Forms.CheckBox(); + this.checkBoxD1 = new System.Windows.Forms.CheckBox(); + this.numericBoxD3 = new Crystallography.Controls.NumericBox(); + this.numericBoxD2 = new Crystallography.Controls.NumericBox(); + this.numericBoxD1 = new Crystallography.Controls.NumericBox(); + this.checkBoxDensity = new System.Windows.Forms.CheckBox(); + this.groupBoxDensity = new System.Windows.Forms.GroupBox(); + this.numericBoxDensity = new Crystallography.Controls.NumericBox(); + this.numericBoxDensityErr = new Crystallography.Controls.NumericBox(); + this.flowLayoutPanel1.SuspendLayout(); + this.groupBoxCellParameter.SuspendLayout(); + this.groupBoxDspacing.SuspendLayout(); + this.groupBoxDensity.SuspendLayout(); + this.SuspendLayout(); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.AutoScroll = true; + this.flowLayoutPanel1.Controls.Add(this.checkBoxSearchName); + this.flowLayoutPanel1.Controls.Add(this.textBoxSearchName); + this.flowLayoutPanel1.Controls.Add(this.checkBoxSearchElements); + this.flowLayoutPanel1.Controls.Add(this.buttonPeriodicTable); + this.flowLayoutPanel1.Controls.Add(this.checkBoxSearchRefference); + this.flowLayoutPanel1.Controls.Add(this.textBoxSearchRefference); + this.flowLayoutPanel1.Controls.Add(this.checkBoxSearchCrystalSystem); + this.flowLayoutPanel1.Controls.Add(this.comboBoxSearchCrystalSystem); + this.flowLayoutPanel1.Controls.Add(this.checkBoxSearchCellParameter); + this.flowLayoutPanel1.Controls.Add(this.groupBoxCellParameter); + this.flowLayoutPanel1.Controls.Add(this.checkBoxDspacing); + this.flowLayoutPanel1.Controls.Add(this.groupBoxDspacing); + this.flowLayoutPanel1.Controls.Add(this.checkBoxDensity); + this.flowLayoutPanel1.Controls.Add(this.groupBoxDensity); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(188, 563); + this.flowLayoutPanel1.TabIndex = 78; + this.flowLayoutPanel1.WrapContents = false; + // + // checkBoxSearchName + // + this.checkBoxSearchName.AutoSize = true; + this.checkBoxSearchName.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.checkBoxSearchName.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxSearchName.Location = new System.Drawing.Point(0, 0); + this.checkBoxSearchName.Margin = new System.Windows.Forms.Padding(0); + this.checkBoxSearchName.Name = "checkBoxSearchName"; + this.checkBoxSearchName.Size = new System.Drawing.Size(62, 21); + this.checkBoxSearchName.TabIndex = 64; + this.checkBoxSearchName.Text = "Name"; + this.checkBoxSearchName.UseVisualStyleBackColor = true; + this.checkBoxSearchName.CheckedChanged += new System.EventHandler(this.checkBoxSearch_CheckedChanged); + // + // textBoxSearchName + // + this.textBoxSearchName.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.textBoxSearchName.Location = new System.Drawing.Point(10, 21); + this.textBoxSearchName.Margin = new System.Windows.Forms.Padding(10, 0, 0, 6); + this.textBoxSearchName.Name = "textBoxSearchName"; + this.textBoxSearchName.Size = new System.Drawing.Size(174, 25); + this.textBoxSearchName.TabIndex = 0; + this.textBoxSearchName.Visible = false; + // + // checkBoxSearchElements + // + this.checkBoxSearchElements.AutoSize = true; + this.checkBoxSearchElements.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.checkBoxSearchElements.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxSearchElements.Location = new System.Drawing.Point(0, 52); + this.checkBoxSearchElements.Margin = new System.Windows.Forms.Padding(0); + this.checkBoxSearchElements.Name = "checkBoxSearchElements"; + this.checkBoxSearchElements.Size = new System.Drawing.Size(73, 21); + this.checkBoxSearchElements.TabIndex = 64; + this.checkBoxSearchElements.Text = "Element"; + this.checkBoxSearchElements.UseVisualStyleBackColor = true; + this.checkBoxSearchElements.CheckedChanged += new System.EventHandler(this.checkBoxSearch_CheckedChanged); + // + // buttonPeriodicTable + // + this.buttonPeriodicTable.AutoSize = true; + this.buttonPeriodicTable.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.buttonPeriodicTable.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonPeriodicTable.Location = new System.Drawing.Point(10, 73); + this.buttonPeriodicTable.Margin = new System.Windows.Forms.Padding(10, 0, 0, 6); + this.buttonPeriodicTable.Name = "buttonPeriodicTable"; + this.buttonPeriodicTable.Size = new System.Drawing.Size(174, 30); + this.buttonPeriodicTable.TabIndex = 65; + this.buttonPeriodicTable.Text = "Periodic Table"; + this.buttonPeriodicTable.UseVisualStyleBackColor = true; + this.buttonPeriodicTable.Visible = false; + this.buttonPeriodicTable.Click += new System.EventHandler(this.buttonPeriodicTable_Click); + // + // checkBoxSearchRefference + // + this.checkBoxSearchRefference.AutoSize = true; + this.checkBoxSearchRefference.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.checkBoxSearchRefference.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxSearchRefference.Location = new System.Drawing.Point(0, 109); + this.checkBoxSearchRefference.Margin = new System.Windows.Forms.Padding(0); + this.checkBoxSearchRefference.Name = "checkBoxSearchRefference"; + this.checkBoxSearchRefference.Size = new System.Drawing.Size(89, 21); + this.checkBoxSearchRefference.TabIndex = 64; + this.checkBoxSearchRefference.Text = "Refference"; + this.checkBoxSearchRefference.UseVisualStyleBackColor = true; + this.checkBoxSearchRefference.CheckedChanged += new System.EventHandler(this.checkBoxSearch_CheckedChanged); + // + // textBoxSearchRefference + // + this.textBoxSearchRefference.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.textBoxSearchRefference.Location = new System.Drawing.Point(10, 130); + this.textBoxSearchRefference.Margin = new System.Windows.Forms.Padding(10, 0, 0, 6); + this.textBoxSearchRefference.Name = "textBoxSearchRefference"; + this.textBoxSearchRefference.Size = new System.Drawing.Size(173, 25); + this.textBoxSearchRefference.TabIndex = 0; + this.textBoxSearchRefference.Visible = false; + // + // checkBoxSearchCrystalSystem + // + this.checkBoxSearchCrystalSystem.AutoSize = true; + this.checkBoxSearchCrystalSystem.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.checkBoxSearchCrystalSystem.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxSearchCrystalSystem.Location = new System.Drawing.Point(0, 161); + this.checkBoxSearchCrystalSystem.Margin = new System.Windows.Forms.Padding(0); + this.checkBoxSearchCrystalSystem.Name = "checkBoxSearchCrystalSystem"; + this.checkBoxSearchCrystalSystem.Size = new System.Drawing.Size(111, 21); + this.checkBoxSearchCrystalSystem.TabIndex = 64; + this.checkBoxSearchCrystalSystem.Text = "Crystal System"; + this.checkBoxSearchCrystalSystem.UseVisualStyleBackColor = true; + this.checkBoxSearchCrystalSystem.CheckedChanged += new System.EventHandler(this.checkBoxSearch_CheckedChanged); + // + // comboBoxSearchCrystalSystem + // + this.comboBoxSearchCrystalSystem.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxSearchCrystalSystem.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.comboBoxSearchCrystalSystem.ImeMode = System.Windows.Forms.ImeMode.Disable; + this.comboBoxSearchCrystalSystem.Items.AddRange(new object[] { + "Unknown", + "triclinic", + "monoclinic", + "orthorhombic", + "tetragonal", + "trigonal", + "hexagonal", + "cubic"}); + this.comboBoxSearchCrystalSystem.Location = new System.Drawing.Point(10, 182); + this.comboBoxSearchCrystalSystem.Margin = new System.Windows.Forms.Padding(10, 0, 0, 6); + this.comboBoxSearchCrystalSystem.Name = "comboBoxSearchCrystalSystem"; + this.comboBoxSearchCrystalSystem.Size = new System.Drawing.Size(174, 25); + this.comboBoxSearchCrystalSystem.TabIndex = 3; + this.comboBoxSearchCrystalSystem.Visible = false; + // + // checkBoxSearchCellParameter + // + this.checkBoxSearchCellParameter.AutoSize = true; + this.checkBoxSearchCellParameter.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.checkBoxSearchCellParameter.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxSearchCellParameter.Location = new System.Drawing.Point(0, 213); + this.checkBoxSearchCellParameter.Margin = new System.Windows.Forms.Padding(0); + this.checkBoxSearchCellParameter.Name = "checkBoxSearchCellParameter"; + this.checkBoxSearchCellParameter.Size = new System.Drawing.Size(89, 21); + this.checkBoxSearchCellParameter.TabIndex = 64; + this.checkBoxSearchCellParameter.Text = "Cell Param"; + this.checkBoxSearchCellParameter.UseVisualStyleBackColor = true; + this.checkBoxSearchCellParameter.CheckedChanged += new System.EventHandler(this.checkBoxSearch_CheckedChanged); + // + // groupBoxCellParameter + // + this.groupBoxCellParameter.Controls.Add(this.numericBoxCellGamma); + this.groupBoxCellParameter.Controls.Add(this.numericBoxCellAngleErr); + this.groupBoxCellParameter.Controls.Add(this.numericBoxCellLengthErr); + this.groupBoxCellParameter.Controls.Add(this.numericBoxCellC); + this.groupBoxCellParameter.Controls.Add(this.numericBoxCellBeta); + this.groupBoxCellParameter.Controls.Add(this.numericBoxCellAlpha); + this.groupBoxCellParameter.Controls.Add(this.numericBoxCellB); + this.groupBoxCellParameter.Controls.Add(this.numericBoxCellA); + this.groupBoxCellParameter.Font = new System.Drawing.Font("Arial", 9F); + this.groupBoxCellParameter.Location = new System.Drawing.Point(10, 234); + this.groupBoxCellParameter.Margin = new System.Windows.Forms.Padding(10, 0, 0, 6); + this.groupBoxCellParameter.Name = "groupBoxCellParameter"; + this.groupBoxCellParameter.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.groupBoxCellParameter.Size = new System.Drawing.Size(174, 125); + this.groupBoxCellParameter.TabIndex = 56; + this.groupBoxCellParameter.TabStop = false; + this.groupBoxCellParameter.Visible = false; + // + // numericBoxCellGamma + // + this.numericBoxCellGamma.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxCellGamma.BackColor = System.Drawing.Color.Transparent; + this.numericBoxCellGamma.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxCellGamma.FooterText = "ツー"; + this.numericBoxCellGamma.HeaderText = "ホウ"; + this.numericBoxCellGamma.Location = new System.Drawing.Point(99, 63); + this.numericBoxCellGamma.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxCellGamma.Maximum = 179D; + this.numericBoxCellGamma.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxCellGamma.Minimum = 1D; + this.numericBoxCellGamma.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxCellGamma.Name = "numericBoxCellGamma"; + this.numericBoxCellGamma.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxCellGamma.RadianValue = 1.5707963267948966D; + this.numericBoxCellGamma.Size = new System.Drawing.Size(70, 25); + this.numericBoxCellGamma.SkipEventDuringInput = false; + this.numericBoxCellGamma.SmartIncrement = true; + this.numericBoxCellGamma.TabIndex = 66; + this.numericBoxCellGamma.ThonsandsSeparator = true; + this.numericBoxCellGamma.Value = 90D; + // + // numericBoxCellAngleErr + // + this.numericBoxCellAngleErr.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxCellAngleErr.BackColor = System.Drawing.Color.Transparent; + this.numericBoxCellAngleErr.DecimalPlaces = 1; + this.numericBoxCellAngleErr.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxCellAngleErr.FooterFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxCellAngleErr.FooterText = "%"; + this.numericBoxCellAngleErr.HeaderFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxCellAngleErr.HeaderText = "ツア"; + this.numericBoxCellAngleErr.Location = new System.Drawing.Point(94, 93); + this.numericBoxCellAngleErr.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxCellAngleErr.Maximum = 50D; + this.numericBoxCellAngleErr.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxCellAngleErr.Minimum = 0D; + this.numericBoxCellAngleErr.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxCellAngleErr.Name = "numericBoxCellAngleErr"; + this.numericBoxCellAngleErr.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxCellAngleErr.RadianValue = 0.052359877559829883D; + this.numericBoxCellAngleErr.ShowUpDown = true; + this.numericBoxCellAngleErr.Size = new System.Drawing.Size(78, 25); + this.numericBoxCellAngleErr.SkipEventDuringInput = false; + this.numericBoxCellAngleErr.TabIndex = 66; + this.numericBoxCellAngleErr.ThonsandsSeparator = true; + this.numericBoxCellAngleErr.UpDown_Increment = 0.5D; + this.numericBoxCellAngleErr.Value = 3D; + // + // numericBoxCellLengthErr + // + this.numericBoxCellLengthErr.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxCellLengthErr.BackColor = System.Drawing.Color.Transparent; + this.numericBoxCellLengthErr.DecimalPlaces = 1; + this.numericBoxCellLengthErr.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxCellLengthErr.FooterFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxCellLengthErr.FooterText = "%"; + this.numericBoxCellLengthErr.HeaderFont = new System.Drawing.Font("Segoe UI Symbol", 9F); + this.numericBoxCellLengthErr.HeaderText = "ツア"; + this.numericBoxCellLengthErr.Location = new System.Drawing.Point(7, 93); + this.numericBoxCellLengthErr.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxCellLengthErr.Maximum = 50D; + this.numericBoxCellLengthErr.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxCellLengthErr.Minimum = 0D; + this.numericBoxCellLengthErr.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxCellLengthErr.Name = "numericBoxCellLengthErr"; + this.numericBoxCellLengthErr.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxCellLengthErr.RadianValue = 0.052359877559829883D; + this.numericBoxCellLengthErr.ShowUpDown = true; + this.numericBoxCellLengthErr.Size = new System.Drawing.Size(78, 25); + this.numericBoxCellLengthErr.SkipEventDuringInput = false; + this.numericBoxCellLengthErr.TabIndex = 66; + this.numericBoxCellLengthErr.ThonsandsSeparator = true; + this.numericBoxCellLengthErr.UpDown_Increment = 0.5D; + this.numericBoxCellLengthErr.Value = 3D; + // + // numericBoxCellC + // + this.numericBoxCellC.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxCellC.BackColor = System.Drawing.Color.Transparent; + this.numericBoxCellC.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxCellC.FooterText = "邃ォ"; + this.numericBoxCellC.HeaderText = "c"; + this.numericBoxCellC.Location = new System.Drawing.Point(4, 64); + this.numericBoxCellC.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxCellC.Maximum = 100D; + this.numericBoxCellC.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxCellC.Minimum = 0D; + this.numericBoxCellC.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxCellC.Name = "numericBoxCellC"; + this.numericBoxCellC.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxCellC.Size = new System.Drawing.Size(87, 25); + this.numericBoxCellC.SkipEventDuringInput = false; + this.numericBoxCellC.SmartIncrement = true; + this.numericBoxCellC.TabIndex = 66; + this.numericBoxCellC.ThonsandsSeparator = true; + // + // numericBoxCellBeta + // + this.numericBoxCellBeta.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxCellBeta.BackColor = System.Drawing.Color.Transparent; + this.numericBoxCellBeta.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxCellBeta.FooterText = "ツー"; + this.numericBoxCellBeta.HeaderText = "ホイ"; + this.numericBoxCellBeta.Location = new System.Drawing.Point(99, 37); + this.numericBoxCellBeta.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxCellBeta.Maximum = 179D; + this.numericBoxCellBeta.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxCellBeta.Minimum = 1D; + this.numericBoxCellBeta.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxCellBeta.Name = "numericBoxCellBeta"; + this.numericBoxCellBeta.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxCellBeta.RadianValue = 1.5707963267948966D; + this.numericBoxCellBeta.Size = new System.Drawing.Size(70, 25); + this.numericBoxCellBeta.SkipEventDuringInput = false; + this.numericBoxCellBeta.SmartIncrement = true; + this.numericBoxCellBeta.TabIndex = 66; + this.numericBoxCellBeta.ThonsandsSeparator = true; + this.numericBoxCellBeta.Value = 90D; + // + // numericBoxCellAlpha + // + this.numericBoxCellAlpha.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxCellAlpha.BackColor = System.Drawing.Color.Transparent; + this.numericBoxCellAlpha.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxCellAlpha.FooterText = "ツー"; + this.numericBoxCellAlpha.HeaderText = "ホア"; + this.numericBoxCellAlpha.Location = new System.Drawing.Point(98, 11); + this.numericBoxCellAlpha.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxCellAlpha.Maximum = 179D; + this.numericBoxCellAlpha.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxCellAlpha.Minimum = 1D; + this.numericBoxCellAlpha.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxCellAlpha.Name = "numericBoxCellAlpha"; + this.numericBoxCellAlpha.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxCellAlpha.RadianValue = 1.5707963267948966D; + this.numericBoxCellAlpha.Size = new System.Drawing.Size(71, 25); + this.numericBoxCellAlpha.SkipEventDuringInput = false; + this.numericBoxCellAlpha.SmartIncrement = true; + this.numericBoxCellAlpha.TabIndex = 66; + this.numericBoxCellAlpha.ThonsandsSeparator = true; + this.numericBoxCellAlpha.Value = 90D; + // + // numericBoxCellB + // + this.numericBoxCellB.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxCellB.BackColor = System.Drawing.Color.Transparent; + this.numericBoxCellB.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxCellB.FooterText = "邃ォ"; + this.numericBoxCellB.HeaderText = "b"; + this.numericBoxCellB.Location = new System.Drawing.Point(2, 38); + this.numericBoxCellB.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxCellB.Maximum = 100D; + this.numericBoxCellB.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxCellB.Minimum = 0D; + this.numericBoxCellB.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxCellB.Name = "numericBoxCellB"; + this.numericBoxCellB.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxCellB.Size = new System.Drawing.Size(89, 25); + this.numericBoxCellB.SkipEventDuringInput = false; + this.numericBoxCellB.SmartIncrement = true; + this.numericBoxCellB.TabIndex = 66; + this.numericBoxCellB.ThonsandsSeparator = true; + // + // numericBoxCellA + // + this.numericBoxCellA.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxCellA.BackColor = System.Drawing.Color.Transparent; + this.numericBoxCellA.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxCellA.FooterText = "邃ォ"; + this.numericBoxCellA.HeaderText = "a"; + this.numericBoxCellA.Location = new System.Drawing.Point(3, 12); + this.numericBoxCellA.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxCellA.Maximum = 100D; + this.numericBoxCellA.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxCellA.Minimum = 0D; + this.numericBoxCellA.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxCellA.Name = "numericBoxCellA"; + this.numericBoxCellA.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxCellA.Size = new System.Drawing.Size(88, 25); + this.numericBoxCellA.SkipEventDuringInput = false; + this.numericBoxCellA.SmartIncrement = true; + this.numericBoxCellA.TabIndex = 66; + this.numericBoxCellA.ThonsandsSeparator = true; + // + // checkBoxDspacing + // + this.checkBoxDspacing.AutoSize = true; + this.checkBoxDspacing.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.checkBoxDspacing.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxDspacing.Location = new System.Drawing.Point(0, 365); + this.checkBoxDspacing.Margin = new System.Windows.Forms.Padding(0); + this.checkBoxDspacing.Name = "checkBoxDspacing"; + this.checkBoxDspacing.Size = new System.Drawing.Size(85, 21); + this.checkBoxDspacing.TabIndex = 64; + this.checkBoxDspacing.Text = "d-spacing"; + this.checkBoxDspacing.UseVisualStyleBackColor = true; + this.checkBoxDspacing.CheckedChanged += new System.EventHandler(this.checkBoxSearch_CheckedChanged); + // + // groupBoxDspacing + // + this.groupBoxDspacing.Controls.Add(this.checkBoxD3); + this.groupBoxDspacing.Controls.Add(this.numericBoxD3Err); + this.groupBoxDspacing.Controls.Add(this.numericBoxD2Err); + this.groupBoxDspacing.Controls.Add(this.numericBoxD1Err); + this.groupBoxDspacing.Controls.Add(this.checkBoxD2); + this.groupBoxDspacing.Controls.Add(this.checkBoxD1); + this.groupBoxDspacing.Controls.Add(this.numericBoxD3); + this.groupBoxDspacing.Controls.Add(this.numericBoxD2); + this.groupBoxDspacing.Controls.Add(this.numericBoxD1); + this.groupBoxDspacing.Font = new System.Drawing.Font("Arial", 9F); + this.groupBoxDspacing.Location = new System.Drawing.Point(10, 386); + this.groupBoxDspacing.Margin = new System.Windows.Forms.Padding(10, 0, 0, 4); + this.groupBoxDspacing.Name = "groupBoxDspacing"; + this.groupBoxDspacing.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.groupBoxDspacing.Size = new System.Drawing.Size(174, 100); + this.groupBoxDspacing.TabIndex = 56; + this.groupBoxDspacing.TabStop = false; + this.groupBoxDspacing.Visible = false; + // + // checkBoxD3 + // + this.checkBoxD3.AutoSize = true; + this.checkBoxD3.Font = new System.Drawing.Font("Arial", 8.25F); + this.checkBoxD3.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxD3.Location = new System.Drawing.Point(9, 74); + this.checkBoxD3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.checkBoxD3.Name = "checkBoxD3"; + this.checkBoxD3.Size = new System.Drawing.Size(15, 14); + this.checkBoxD3.TabIndex = 64; + this.checkBoxD3.UseVisualStyleBackColor = true; + this.checkBoxD3.CheckedChanged += new System.EventHandler(this.checkBoxD3_CheckedChanged); + // + // numericBoxD3Err + // + this.numericBoxD3Err.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxD3Err.BackColor = System.Drawing.Color.Transparent; + this.numericBoxD3Err.DecimalPlaces = 1; + this.numericBoxD3Err.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxD3Err.FooterText = "%"; + this.numericBoxD3Err.HeaderText = "ツア"; + this.numericBoxD3Err.Location = new System.Drawing.Point(90, 69); + this.numericBoxD3Err.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxD3Err.Maximum = 50D; + this.numericBoxD3Err.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxD3Err.Minimum = 0D; + this.numericBoxD3Err.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxD3Err.Name = "numericBoxD3Err"; + this.numericBoxD3Err.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxD3Err.RadianValue = 0.052359877559829883D; + this.numericBoxD3Err.ShowUpDown = true; + this.numericBoxD3Err.Size = new System.Drawing.Size(81, 25); + this.numericBoxD3Err.SkipEventDuringInput = false; + this.numericBoxD3Err.TabIndex = 66; + this.numericBoxD3Err.ThonsandsSeparator = true; + this.numericBoxD3Err.UpDown_Increment = 0.5D; + this.numericBoxD3Err.Value = 3D; + // + // numericBoxD2Err + // + this.numericBoxD2Err.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxD2Err.BackColor = System.Drawing.Color.Transparent; + this.numericBoxD2Err.DecimalPlaces = 1; + this.numericBoxD2Err.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxD2Err.FooterText = "%"; + this.numericBoxD2Err.HeaderText = "ツア"; + this.numericBoxD2Err.Location = new System.Drawing.Point(90, 40); + this.numericBoxD2Err.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxD2Err.Maximum = 50D; + this.numericBoxD2Err.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxD2Err.Minimum = 0D; + this.numericBoxD2Err.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxD2Err.Name = "numericBoxD2Err"; + this.numericBoxD2Err.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxD2Err.RadianValue = 0.052359877559829883D; + this.numericBoxD2Err.ShowUpDown = true; + this.numericBoxD2Err.Size = new System.Drawing.Size(81, 25); + this.numericBoxD2Err.SkipEventDuringInput = false; + this.numericBoxD2Err.TabIndex = 66; + this.numericBoxD2Err.ThonsandsSeparator = true; + this.numericBoxD2Err.UpDown_Increment = 0.5D; + this.numericBoxD2Err.Value = 3D; + // + // numericBoxD1Err + // + this.numericBoxD1Err.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxD1Err.BackColor = System.Drawing.Color.Transparent; + this.numericBoxD1Err.DecimalPlaces = 1; + this.numericBoxD1Err.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxD1Err.FooterText = "%"; + this.numericBoxD1Err.HeaderText = "ツア"; + this.numericBoxD1Err.Location = new System.Drawing.Point(90, 10); + this.numericBoxD1Err.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxD1Err.Maximum = 50D; + this.numericBoxD1Err.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxD1Err.Minimum = 0D; + this.numericBoxD1Err.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxD1Err.Name = "numericBoxD1Err"; + this.numericBoxD1Err.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxD1Err.RadianValue = 0.052359877559829883D; + this.numericBoxD1Err.ShowUpDown = true; + this.numericBoxD1Err.Size = new System.Drawing.Size(81, 25); + this.numericBoxD1Err.SkipEventDuringInput = false; + this.numericBoxD1Err.TabIndex = 66; + this.numericBoxD1Err.ThonsandsSeparator = true; + this.numericBoxD1Err.UpDown_Increment = 0.5D; + this.numericBoxD1Err.Value = 3D; + // + // checkBoxD2 + // + this.checkBoxD2.AutoSize = true; + this.checkBoxD2.Font = new System.Drawing.Font("Arial", 8.25F); + this.checkBoxD2.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxD2.Location = new System.Drawing.Point(9, 45); + this.checkBoxD2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.checkBoxD2.Name = "checkBoxD2"; + this.checkBoxD2.Size = new System.Drawing.Size(15, 14); + this.checkBoxD2.TabIndex = 64; + this.checkBoxD2.UseVisualStyleBackColor = true; + this.checkBoxD2.CheckedChanged += new System.EventHandler(this.checkBoxD2_CheckedChanged); + // + // checkBoxD1 + // + this.checkBoxD1.AutoSize = true; + this.checkBoxD1.Checked = true; + this.checkBoxD1.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxD1.Font = new System.Drawing.Font("Arial", 8.25F); + this.checkBoxD1.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxD1.Location = new System.Drawing.Point(9, 16); + this.checkBoxD1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.checkBoxD1.Name = "checkBoxD1"; + this.checkBoxD1.Size = new System.Drawing.Size(15, 14); + this.checkBoxD1.TabIndex = 64; + this.checkBoxD1.UseVisualStyleBackColor = true; + this.checkBoxD1.CheckedChanged += new System.EventHandler(this.checkBoxD1_CheckedChanged); + // + // numericBoxD3 + // + this.numericBoxD3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxD3.BackColor = System.Drawing.Color.Transparent; + this.numericBoxD3.DecimalPlaces = 2; + this.numericBoxD3.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxD3.FooterText = "邃ォ"; + this.numericBoxD3.Location = new System.Drawing.Point(29, 69); + this.numericBoxD3.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxD3.Maximum = 100D; + this.numericBoxD3.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxD3.Minimum = 0D; + this.numericBoxD3.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxD3.Name = "numericBoxD3"; + this.numericBoxD3.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxD3.Size = new System.Drawing.Size(62, 25); + this.numericBoxD3.SkipEventDuringInput = false; + this.numericBoxD3.SmartIncrement = true; + this.numericBoxD3.TabIndex = 66; + this.numericBoxD3.ThonsandsSeparator = true; + // + // numericBoxD2 + // + this.numericBoxD2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxD2.BackColor = System.Drawing.Color.Transparent; + this.numericBoxD2.DecimalPlaces = 2; + this.numericBoxD2.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxD2.FooterText = "邃ォ"; + this.numericBoxD2.Location = new System.Drawing.Point(29, 40); + this.numericBoxD2.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxD2.Maximum = 100D; + this.numericBoxD2.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxD2.Minimum = 0D; + this.numericBoxD2.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxD2.Name = "numericBoxD2"; + this.numericBoxD2.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxD2.Size = new System.Drawing.Size(62, 25); + this.numericBoxD2.SkipEventDuringInput = false; + this.numericBoxD2.SmartIncrement = true; + this.numericBoxD2.TabIndex = 66; + this.numericBoxD2.ThonsandsSeparator = true; + // + // numericBoxD1 + // + this.numericBoxD1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxD1.BackColor = System.Drawing.Color.Transparent; + this.numericBoxD1.DecimalPlaces = 2; + this.numericBoxD1.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxD1.FooterText = "邃ォ"; + this.numericBoxD1.Location = new System.Drawing.Point(29, 10); + this.numericBoxD1.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxD1.Maximum = 100D; + this.numericBoxD1.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxD1.Minimum = 0D; + this.numericBoxD1.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxD1.Name = "numericBoxD1"; + this.numericBoxD1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxD1.Size = new System.Drawing.Size(62, 25); + this.numericBoxD1.SkipEventDuringInput = false; + this.numericBoxD1.SmartIncrement = true; + this.numericBoxD1.TabIndex = 66; + this.numericBoxD1.ThonsandsSeparator = true; + // + // checkBoxDensity + // + this.checkBoxDensity.AutoSize = true; + this.checkBoxDensity.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.checkBoxDensity.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.checkBoxDensity.Location = new System.Drawing.Point(0, 490); + this.checkBoxDensity.Margin = new System.Windows.Forms.Padding(0); + this.checkBoxDensity.Name = "checkBoxDensity"; + this.checkBoxDensity.Size = new System.Drawing.Size(69, 21); + this.checkBoxDensity.TabIndex = 64; + this.checkBoxDensity.Text = "Density"; + this.checkBoxDensity.UseVisualStyleBackColor = true; + this.checkBoxDensity.CheckedChanged += new System.EventHandler(this.checkBoxSearch_CheckedChanged); + // + // groupBoxDensity + // + this.groupBoxDensity.Controls.Add(this.numericBoxDensity); + this.groupBoxDensity.Controls.Add(this.numericBoxDensityErr); + this.groupBoxDensity.Font = new System.Drawing.Font("Arial", 9F); + this.groupBoxDensity.Location = new System.Drawing.Point(10, 511); + this.groupBoxDensity.Margin = new System.Windows.Forms.Padding(10, 0, 0, 4); + this.groupBoxDensity.Name = "groupBoxDensity"; + this.groupBoxDensity.Size = new System.Drawing.Size(174, 44); + this.groupBoxDensity.TabIndex = 67; + this.groupBoxDensity.TabStop = false; + this.groupBoxDensity.Visible = false; + // + // numericBoxDensity + // + this.numericBoxDensity.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxDensity.BackColor = System.Drawing.Color.Transparent; + this.numericBoxDensity.DecimalPlaces = 3; + this.numericBoxDensity.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxDensity.FooterText = "g/cc"; + this.numericBoxDensity.Location = new System.Drawing.Point(7, 13); + this.numericBoxDensity.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.numericBoxDensity.Maximum = 100D; + this.numericBoxDensity.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxDensity.Minimum = 0D; + this.numericBoxDensity.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxDensity.Name = "numericBoxDensity"; + this.numericBoxDensity.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxDensity.Size = new System.Drawing.Size(86, 25); + this.numericBoxDensity.SkipEventDuringInput = false; + this.numericBoxDensity.SmartIncrement = true; + this.numericBoxDensity.TabIndex = 66; + this.numericBoxDensity.ThonsandsSeparator = true; + // + // numericBoxDensityErr + // + this.numericBoxDensityErr.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.numericBoxDensityErr.BackColor = System.Drawing.Color.Transparent; + this.numericBoxDensityErr.DecimalPlaces = 1; + this.numericBoxDensityErr.Font = new System.Drawing.Font("Segoe UI Symbol", 9.75F); + this.numericBoxDensityErr.FooterText = "%"; + this.numericBoxDensityErr.HeaderText = "ツア"; + this.numericBoxDensityErr.Location = new System.Drawing.Point(94, 13); + this.numericBoxDensityErr.Margin = new System.Windows.Forms.Padding(0); + this.numericBoxDensityErr.Maximum = 50D; + this.numericBoxDensityErr.MaximumSize = new System.Drawing.Size(1000, 25); + this.numericBoxDensityErr.Minimum = 0D; + this.numericBoxDensityErr.MinimumSize = new System.Drawing.Size(1, 25); + this.numericBoxDensityErr.Name = "numericBoxDensityErr"; + this.numericBoxDensityErr.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.numericBoxDensityErr.RadianValue = 0.052359877559829883D; + this.numericBoxDensityErr.ShowUpDown = true; + this.numericBoxDensityErr.Size = new System.Drawing.Size(81, 25); + this.numericBoxDensityErr.SkipEventDuringInput = false; + this.numericBoxDensityErr.TabIndex = 66; + this.numericBoxDensityErr.ThonsandsSeparator = true; + this.numericBoxDensityErr.UpDown_Increment = 0.5D; + this.numericBoxDensityErr.Value = 3D; + // + // SearchCrystalControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.flowLayoutPanel1); + this.Name = "SearchCrystalControl"; + this.Size = new System.Drawing.Size(188, 563); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.groupBoxCellParameter.ResumeLayout(false); + this.groupBoxDspacing.ResumeLayout(false); + this.groupBoxDspacing.PerformLayout(); + this.groupBoxDensity.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.CheckBox checkBoxSearchName; + private System.Windows.Forms.TextBox textBoxSearchName; + private System.Windows.Forms.CheckBox checkBoxSearchElements; + private System.Windows.Forms.Button buttonPeriodicTable; + private System.Windows.Forms.CheckBox checkBoxSearchRefference; + private System.Windows.Forms.TextBox textBoxSearchRefference; + private System.Windows.Forms.CheckBox checkBoxSearchCrystalSystem; + public System.Windows.Forms.ComboBox comboBoxSearchCrystalSystem; + private System.Windows.Forms.CheckBox checkBoxSearchCellParameter; + private System.Windows.Forms.GroupBox groupBoxCellParameter; + private NumericBox numericBoxCellGamma; + private NumericBox numericBoxCellAngleErr; + private NumericBox numericBoxCellLengthErr; + private NumericBox numericBoxCellC; + private NumericBox numericBoxCellBeta; + private NumericBox numericBoxCellAlpha; + private NumericBox numericBoxCellB; + private NumericBox numericBoxCellA; + private System.Windows.Forms.CheckBox checkBoxDspacing; + private System.Windows.Forms.GroupBox groupBoxDspacing; + private System.Windows.Forms.CheckBox checkBoxD3; + private NumericBox numericBoxD3Err; + private NumericBox numericBoxD2Err; + private NumericBox numericBoxD1Err; + private System.Windows.Forms.CheckBox checkBoxD2; + private System.Windows.Forms.CheckBox checkBoxD1; + private NumericBox numericBoxD3; + private NumericBox numericBoxD2; + private NumericBox numericBoxD1; + private System.Windows.Forms.CheckBox checkBoxDensity; + private System.Windows.Forms.GroupBox groupBoxDensity; + private NumericBox numericBoxDensity; + private NumericBox numericBoxDensityErr; + } +} diff --git a/Crystallography.Controls/CrystalDatabase/SearchCrystalControl.cs b/Crystallography.Controls/CrystalDatabase/SearchCrystalControl.cs new file mode 100644 index 0000000..0139a1d --- /dev/null +++ b/Crystallography.Controls/CrystalDatabase/SearchCrystalControl.cs @@ -0,0 +1,122 @@ +サソusing System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Windows.Forms; + +namespace Crystallography.Controls +{ + public partial class SearchCrystalControl : UserControl + { + #region 繝輔ぅ繝シ繝ォ繝峨√励Ο繝代ユ繧」 + + public FormPeriodicTable formPeriodicTable; + + public string Filter + { + get + { + var filter = new List(); + + //蜷榊燕 + if (checkBoxSearchName.Checked && textBoxSearchName.Text != "") + filter.Add(string.Join(" AND ", textBoxSearchName.Text.Split().Select(s => $"Name LIKE '*{s}*'"))); + + //Reference + if (checkBoxSearchRefference.Checked && textBoxSearchRefference.Text != "") + filter.Add(string.Join(" AND ", textBoxSearchRefference.Text.Split().Select(s => $"(Authors LIKE '*{s}*' OR Title LIKE '*{s}*' OR Journal LIKE '*{s}*')"))); + + if (checkBoxSearchCrystalSystem.Checked && comboBoxSearchCrystalSystem.SelectedIndex >= 0) + filter.Add($" CrystalSystem = '{comboBoxSearchCrystalSystem.Text}'"); + + //蜈邏縺ョ縺溘a縺ョ繝輔ぅ繝ォ繧ソ繝シ譁蟄怜 + if (checkBoxSearchElements.Checked && formPeriodicTable.IncludesStr.Length != 0) + filter.Add(string.Join(" AND ", formPeriodicTable.IncludesStr.Select(s => $"Elements Like '*{s}*'"))); + + if (checkBoxSearchElements.Checked && formPeriodicTable.ExcludesStr.Length != 0) + filter.Add("NOT(" + string.Join(" OR ", formPeriodicTable.ExcludesStr.Select(s => $"Elements Like '*{s}*'")) + ")");//NOT蜿・繧偵▽縺代k + + //譬シ蟄仙ョ壽焚縺ョ繝輔ぅ繝ォ繧ソ繝シ + if (checkBoxSearchCellParameter.Checked) + { + var lenErr = numericBoxCellLengthErr.Value / 100; + var angErr = numericBoxCellAngleErr.Value / 100; + var func = new Func((symbol, val, err) => val != 0 ? $"{symbol} >{val * (1 - err)} AND {symbol} < {val * (1 + err)}" : ""); + + filter.Add(func("A", numericBoxCellA.Value, lenErr)); + filter.Add(func("B", numericBoxCellB.Value, lenErr)); + filter.Add(func("C", numericBoxCellC.Value, lenErr)); + filter.Add(func("Alpha", numericBoxCellAlpha.Value, angErr)); + filter.Add(func("Beta", numericBoxCellBeta.Value, angErr)); + filter.Add(func("Gamma", numericBoxCellGamma.Value, angErr)); + } + + if (checkBoxDspacing.Checked) + { + var func = new Func((val, err) => + { + if (val == 0) return ""; + var temp = new List(); + for (int j = 1; j < 9; j++) + temp.Add($"( D{j} > {val * (1 - err)} AND D{j} < {val * (1 + err)} )"); + return string.Join(" OR ", temp); + }); + + if (checkBoxD1.Checked) + filter.Add(func(numericBoxD1.Value, numericBoxD1Err.Value / 100)); + if (checkBoxD2.Checked) + filter.Add(func(numericBoxD2.Value, numericBoxD2Err.Value / 100)); + if (checkBoxD3.Checked) + filter.Add(func(numericBoxD3.Value, numericBoxD3Err.Value / 100)); + } + + //譬シ蟄仙ョ壽焚縺ョ繝輔ぅ繝ォ繧ソ繝シ + if (checkBoxDensity.Checked && numericBoxDensity.Value != 0) + { + double val = numericBoxDensity.Value, err = numericBoxDensityErr.Value / 100; + filter.Add($"Density >{val * (1 - err)} AND Density < {val * (1 + err)}"); + } + + return string.Join(" AND ", filter.Where(f => f != "").Select(f => "(" + f + ")")); + } + } + + #endregion + + #region 繧ウ繝ウ繧ケ繝医Λ繧ッ繧ソ + public SearchCrystalControl() + { + InitializeComponent(); + formPeriodicTable = new FormPeriodicTable(); + } + + #endregion + + #region 繝√ぉ繝繧ッ繝懊ャ繧ッ繧ケ + private void checkBoxSearch_CheckedChanged(object sender, EventArgs e) + { + buttonPeriodicTable.Visible = checkBoxSearchElements.Checked; + if (formPeriodicTable.Visible && !checkBoxSearchElements.Checked) + formPeriodicTable.Visible = false; + + textBoxSearchRefference.Visible = checkBoxSearchRefference.Checked; + textBoxSearchName.Visible = checkBoxSearchName.Checked; + comboBoxSearchCrystalSystem.Visible = checkBoxSearchCrystalSystem.Checked; + groupBoxCellParameter.Visible = checkBoxSearchCellParameter.Checked; + groupBoxDspacing.Visible = checkBoxDspacing.Checked; + groupBoxDensity.Visible = checkBoxDensity.Checked; + } + + private void checkBoxD1_CheckedChanged(object sender, EventArgs e) => numericBoxD1.Enabled = numericBoxD1Err.Enabled = checkBoxD1.Checked; + + private void checkBoxD2_CheckedChanged(object sender, EventArgs e) => numericBoxD2.Enabled = numericBoxD2Err.Enabled = checkBoxD2.Checked; + + private void checkBoxD3_CheckedChanged(object sender, EventArgs e) => numericBoxD3.Enabled = numericBoxD3Err.Enabled = checkBoxD3.Checked; + + private void buttonPeriodicTable_Click(object sender, EventArgs e) => formPeriodicTable.Visible = true; + + #endregion + + + } +} diff --git a/Crystallography.Controls/FormElasticity.resx b/Crystallography.Controls/CrystalDatabase/SearchCrystalControl.resx similarity index 100% rename from Crystallography.Controls/FormElasticity.resx rename to Crystallography.Controls/CrystalDatabase/SearchCrystalControl.resx diff --git a/Crystallography.Controls/Crystallography.Controls.csproj b/Crystallography.Controls/Crystallography.Controls.csproj index f554e86..616b3d3 100644 --- a/Crystallography.Controls/Crystallography.Controls.csproj +++ b/Crystallography.Controls/Crystallography.Controls.csproj @@ -70,6 +70,7 @@ false 8.0 true + true true @@ -128,8 +129,17 @@ ..\packages\IronPython.2.7.10\lib\net45\IronPython.Wpf.dll - - ..\packages\MathNet.Numerics.4.9.1\lib\net461\MathNet.Numerics.dll + + ..\packages\MathNet.Numerics.4.11.0\lib\net461\MathNet.Numerics.dll + + + ..\packages\MessagePack.2.1.152\lib\netstandard2.0\MessagePack.dll + + + ..\packages\MessagePack.Annotations.2.1.152\lib\netstandard2.0\MessagePack.Annotations.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.1\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll @@ -152,14 +162,29 @@ 3.0 + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + 3.5 + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0-preview.6.20305.6\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + @@ -188,6 +213,12 @@ ColorControl.cs + + UserControl + + + CrystalDatabaseControl.cs + UserControl @@ -292,12 +323,6 @@ FormCrystalSelection.cs - - Form - - - FormElasticity.cs - Form @@ -316,10 +341,10 @@ FormNumericUpdownControl.cs - + Form - + FormPeriodicTable.cs @@ -359,6 +384,12 @@ ScalablePictureBoxAdvanced.cs + + UserControl + + + SearchCrystalControl.cs + UserControl @@ -423,6 +454,12 @@ ColorControl.cs Designer + + CrystalDatabaseControl.cs + + + FormPeriodicTable.cs + AtomCoordinateTable.cs Designer @@ -496,9 +533,6 @@ FormCrystalSelection.cs Designer - - FormElasticity.cs - FormPDF.cs @@ -508,9 +542,6 @@ FormNumericUpdownControl.cs - - FormPeriodicTable.cs - FormResolution.cs Designer @@ -534,6 +565,9 @@ ScalablePictureBoxAdvanced.cs Designer + + SearchCrystalControl.cs + TrackBarAdvanced.cs diff --git a/Crystallography.Controls/DataSet.Designer.cs b/Crystallography.Controls/DataSet.Designer.cs index bc11e31..2f81f93 100644 --- a/Crystallography.Controls/DataSet.Designer.cs +++ b/Crystallography.Controls/DataSet.Designer.cs @@ -34,6 +34,8 @@ public partial class DataSet : global::System.Data.DataSet { private DataTableLatticePlaneDataTable tableDataTableLatticePlane; + private DataTableCrystalDatabaseDataTable tableDataTableCrystalDatabase; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -77,6 +79,9 @@ protected DataSet(global::System.Runtime.Serialization.SerializationInfo info, g if ((ds.Tables["DataTableLatticePlane"] != null)) { base.Tables.Add(new DataTableLatticePlaneDataTable(ds.Tables["DataTableLatticePlane"])); } + if ((ds.Tables["DataTableCrystalDatabase"] != null)) { + base.Tables.Add(new DataTableCrystalDatabaseDataTable(ds.Tables["DataTableCrystalDatabase"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -145,6 +150,16 @@ public DataTableLatticePlaneDataTable DataTableLatticePlane { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public DataTableCrystalDatabaseDataTable DataTableCrystalDatabase { + get { + return this.tableDataTableCrystalDatabase; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -227,6 +242,9 @@ protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) if ((ds.Tables["DataTableLatticePlane"] != null)) { base.Tables.Add(new DataTableLatticePlaneDataTable(ds.Tables["DataTableLatticePlane"])); } + if ((ds.Tables["DataTableCrystalDatabase"] != null)) { + base.Tables.Add(new DataTableCrystalDatabaseDataTable(ds.Tables["DataTableCrystalDatabase"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -290,6 +308,12 @@ internal void InitVars(bool initTable) { this.tableDataTableLatticePlane.InitVars(); } } + this.tableDataTableCrystalDatabase = ((DataTableCrystalDatabaseDataTable)(base.Tables["DataTableCrystalDatabase"])); + if ((initTable == true)) { + if ((this.tableDataTableCrystalDatabase != null)) { + this.tableDataTableCrystalDatabase.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -310,6 +334,8 @@ private void InitClass() { base.Tables.Add(this.tableDataTableBound); this.tableDataTableLatticePlane = new DataTableLatticePlaneDataTable(); base.Tables.Add(this.tableDataTableLatticePlane); + this.tableDataTableCrystalDatabase = new DataTableCrystalDatabaseDataTable(); + base.Tables.Add(this.tableDataTableCrystalDatabase); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -342,6 +368,12 @@ private bool ShouldSerializeDataTableLatticePlane() { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeDataTableCrystalDatabase() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -412,6 +444,9 @@ private void SchemaChanged(object sender, global::System.ComponentModel.Collecti [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void DataTableLatticePlaneRowChangeEventHandler(object sender, DataTableLatticePlaneRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void DataTableCrystalDatabaseRowChangeEventHandler(object sender, DataTableCrystalDatabaseRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -2262,1421 +2297,2744 @@ public void RemoveDataTableLatticePlaneRow(DataTableLatticePlaneRow row) { } /// - ///Represents strongly named DataRow class. + ///Represents the strongly named DataTable class. /// - public partial class DataTableScatteringFactorRow : global::System.Data.DataRow { + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class DataTableCrystalDatabaseDataTable : global::System.Data.TypedTableBase { - private DataTableScatteringFactorDataTable tableDataTableScatteringFactor; + private global::System.Data.DataColumn columnSerializedCrystal2; + + private global::System.Data.DataColumn columnName; + + private global::System.Data.DataColumn columnFormula; + + private global::System.Data.DataColumn columnDensity; + + private global::System.Data.DataColumn columnA; + + private global::System.Data.DataColumn columnB; + + private global::System.Data.DataColumn columnC; + + private global::System.Data.DataColumn columnAlpha; + + private global::System.Data.DataColumn columnBeta; + + private global::System.Data.DataColumn columnGamma; + + private global::System.Data.DataColumn columnCrystalSystem; + + private global::System.Data.DataColumn columnPointGroup; + + private global::System.Data.DataColumn columnSpaceGroup; + + private global::System.Data.DataColumn columnAuthors; + + private global::System.Data.DataColumn columnTitle; + + private global::System.Data.DataColumn columnJournal; + + private global::System.Data.DataColumn columnElements; + + private global::System.Data.DataColumn columnD1; + + private global::System.Data.DataColumn columnD2; + + private global::System.Data.DataColumn columnD3; + + private global::System.Data.DataColumn columnD4; + + private global::System.Data.DataColumn columnD5; + + private global::System.Data.DataColumn columnD6; + + private global::System.Data.DataColumn columnD7; + + private global::System.Data.DataColumn columnD8; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - internal DataTableScatteringFactorRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tableDataTableScatteringFactor = ((DataTableScatteringFactorDataTable)(this.Table)); + public DataTableCrystalDatabaseDataTable() { + this.TableName = "DataTableCrystalDatabase"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int H { - get { - try { - return ((int)(this[this.tableDataTableScatteringFactor.HColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'H\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } + internal DataTableCrystalDatabaseDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; } - set { - this[this.tableDataTableScatteringFactor.HColumn] = value; + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int K { + protected DataTableCrystalDatabaseDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn SerializedCrystal2Column { get { - try { - return ((int)(this[this.tableDataTableScatteringFactor.KColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'K\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.KColumn] = value; + return this.columnSerializedCrystal2; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int L { + public global::System.Data.DataColumn NameColumn { get { - try { - return ((int)(this[this.tableDataTableScatteringFactor.LColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'L\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.LColumn] = value; + return this.columnName; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int Multi { + public global::System.Data.DataColumn FormulaColumn { get { - try { - return ((int)(this[this.tableDataTableScatteringFactor.MultiColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'Multi\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.MultiColumn] = value; + return this.columnFormula; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double D { + public global::System.Data.DataColumn DensityColumn { get { - try { - return ((double)(this[this.tableDataTableScatteringFactor.DColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'D\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.DColumn] = value; + return this.columnDensity; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double Q { + public global::System.Data.DataColumn AColumn { get { - try { - return ((double)(this[this.tableDataTableScatteringFactor.QColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'Q\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.QColumn] = value; + return this.columnA; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double TwoTheta { + public global::System.Data.DataColumn BColumn { get { - try { - return ((double)(this[this.tableDataTableScatteringFactor.TwoThetaColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'TwoTheta\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.TwoThetaColumn] = value; + return this.columnB; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double F_real { + public global::System.Data.DataColumn CColumn { get { - try { - return ((double)(this[this.tableDataTableScatteringFactor.F_realColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'F_real\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.F_realColumn] = value; + return this.columnC; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double F_inv { + public global::System.Data.DataColumn AlphaColumn { get { - try { - return ((double)(this[this.tableDataTableScatteringFactor.F_invColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'F_inv\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.F_invColumn] = value; + return this.columnAlpha; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double F { + public global::System.Data.DataColumn BetaColumn { get { - try { - return ((double)(this[this.tableDataTableScatteringFactor.FColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'F\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.FColumn] = value; + return this.columnBeta; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double F2 { + public global::System.Data.DataColumn GammaColumn { get { - try { - return ((double)(this[this.tableDataTableScatteringFactor.F2Column])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'F2\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.F2Column] = value; + return this.columnGamma; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double RelInt { + public global::System.Data.DataColumn CrystalSystemColumn { get { - try { - return ((double)(this[this.tableDataTableScatteringFactor.RelIntColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'RelInt\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.RelIntColumn] = value; + return this.columnCrystalSystem; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Condition { + public global::System.Data.DataColumn PointGroupColumn { get { - try { - return ((string)(this[this.tableDataTableScatteringFactor.ConditionColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'Condition\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableScatteringFactor.ConditionColumn] = value; + return this.columnPointGroup; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsHNull() { - return this.IsNull(this.tableDataTableScatteringFactor.HColumn); + public global::System.Data.DataColumn SpaceGroupColumn { + get { + return this.columnSpaceGroup; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetHNull() { - this[this.tableDataTableScatteringFactor.HColumn] = global::System.Convert.DBNull; + public global::System.Data.DataColumn AuthorsColumn { + get { + return this.columnAuthors; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsKNull() { - return this.IsNull(this.tableDataTableScatteringFactor.KColumn); + public global::System.Data.DataColumn TitleColumn { + get { + return this.columnTitle; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetKNull() { - this[this.tableDataTableScatteringFactor.KColumn] = global::System.Convert.DBNull; + public global::System.Data.DataColumn JournalColumn { + get { + return this.columnJournal; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsLNull() { - return this.IsNull(this.tableDataTableScatteringFactor.LColumn); + public global::System.Data.DataColumn ElementsColumn { + get { + return this.columnElements; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetLNull() { - this[this.tableDataTableScatteringFactor.LColumn] = global::System.Convert.DBNull; + public global::System.Data.DataColumn D1Column { + get { + return this.columnD1; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsMultiNull() { - return this.IsNull(this.tableDataTableScatteringFactor.MultiColumn); + public global::System.Data.DataColumn D2Column { + get { + return this.columnD2; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetMultiNull() { - this[this.tableDataTableScatteringFactor.MultiColumn] = global::System.Convert.DBNull; + public global::System.Data.DataColumn D3Column { + get { + return this.columnD3; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsDNull() { - return this.IsNull(this.tableDataTableScatteringFactor.DColumn); + public global::System.Data.DataColumn D4Column { + get { + return this.columnD4; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetDNull() { - this[this.tableDataTableScatteringFactor.DColumn] = global::System.Convert.DBNull; + public global::System.Data.DataColumn D5Column { + get { + return this.columnD5; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsQNull() { - return this.IsNull(this.tableDataTableScatteringFactor.QColumn); + public global::System.Data.DataColumn D6Column { + get { + return this.columnD6; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetQNull() { - this[this.tableDataTableScatteringFactor.QColumn] = global::System.Convert.DBNull; + public global::System.Data.DataColumn D7Column { + get { + return this.columnD7; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsTwoThetaNull() { - return this.IsNull(this.tableDataTableScatteringFactor.TwoThetaColumn); + public global::System.Data.DataColumn D8Column { + get { + return this.columnD8; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetTwoThetaNull() { - this[this.tableDataTableScatteringFactor.TwoThetaColumn] = global::System.Convert.DBNull; + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsF_realNull() { - return this.IsNull(this.tableDataTableScatteringFactor.F_realColumn); + public DataTableCrystalDatabaseRow this[int index] { + get { + return ((DataTableCrystalDatabaseRow)(this.Rows[index])); + } } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event DataTableCrystalDatabaseRowChangeEventHandler DataTableCrystalDatabaseRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event DataTableCrystalDatabaseRowChangeEventHandler DataTableCrystalDatabaseRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event DataTableCrystalDatabaseRowChangeEventHandler DataTableCrystalDatabaseRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event DataTableCrystalDatabaseRowChangeEventHandler DataTableCrystalDatabaseRowDeleted; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetF_realNull() { - this[this.tableDataTableScatteringFactor.F_realColumn] = global::System.Convert.DBNull; + public void AddDataTableCrystalDatabaseRow(DataTableCrystalDatabaseRow row) { + this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsF_invNull() { - return this.IsNull(this.tableDataTableScatteringFactor.F_invColumn); + public DataTableCrystalDatabaseRow AddDataTableCrystalDatabaseRow( + object SerializedCrystal2, + string Name, + string Formula, + double Density, + double A, + double B, + double C, + double Alpha, + double Beta, + double Gamma, + string CrystalSystem, + string PointGroup, + string SpaceGroup, + string Authors, + string Title, + string Journal, + string Elements, + float D1, + float D2, + float D3, + float D4, + float D5, + float D6, + float D7, + float D8) { + DataTableCrystalDatabaseRow rowDataTableCrystalDatabaseRow = ((DataTableCrystalDatabaseRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + SerializedCrystal2, + Name, + Formula, + Density, + A, + B, + C, + Alpha, + Beta, + Gamma, + CrystalSystem, + PointGroup, + SpaceGroup, + Authors, + Title, + Journal, + Elements, + D1, + D2, + D3, + D4, + D5, + D6, + D7, + D8}; + rowDataTableCrystalDatabaseRow.ItemArray = columnValuesArray; + this.Rows.Add(rowDataTableCrystalDatabaseRow); + return rowDataTableCrystalDatabaseRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetF_invNull() { - this[this.tableDataTableScatteringFactor.F_invColumn] = global::System.Convert.DBNull; + public override global::System.Data.DataTable Clone() { + DataTableCrystalDatabaseDataTable cln = ((DataTableCrystalDatabaseDataTable)(base.Clone())); + cln.InitVars(); + return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsFNull() { - return this.IsNull(this.tableDataTableScatteringFactor.FColumn); + protected override global::System.Data.DataTable CreateInstance() { + return new DataTableCrystalDatabaseDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetFNull() { - this[this.tableDataTableScatteringFactor.FColumn] = global::System.Convert.DBNull; + internal void InitVars() { + this.columnSerializedCrystal2 = base.Columns["SerializedCrystal2"]; + this.columnName = base.Columns["Name"]; + this.columnFormula = base.Columns["Formula"]; + this.columnDensity = base.Columns["Density"]; + this.columnA = base.Columns["A"]; + this.columnB = base.Columns["B"]; + this.columnC = base.Columns["C"]; + this.columnAlpha = base.Columns["Alpha"]; + this.columnBeta = base.Columns["Beta"]; + this.columnGamma = base.Columns["Gamma"]; + this.columnCrystalSystem = base.Columns["CrystalSystem"]; + this.columnPointGroup = base.Columns["PointGroup"]; + this.columnSpaceGroup = base.Columns["SpaceGroup"]; + this.columnAuthors = base.Columns["Authors"]; + this.columnTitle = base.Columns["Title"]; + this.columnJournal = base.Columns["Journal"]; + this.columnElements = base.Columns["Elements"]; + this.columnD1 = base.Columns["D1"]; + this.columnD2 = base.Columns["D2"]; + this.columnD3 = base.Columns["D3"]; + this.columnD4 = base.Columns["D4"]; + this.columnD5 = base.Columns["D5"]; + this.columnD6 = base.Columns["D6"]; + this.columnD7 = base.Columns["D7"]; + this.columnD8 = base.Columns["D8"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsF2Null() { - return this.IsNull(this.tableDataTableScatteringFactor.F2Column); + private void InitClass() { + this.columnSerializedCrystal2 = new global::System.Data.DataColumn("SerializedCrystal2", typeof(object), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSerializedCrystal2); + this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnName); + this.columnFormula = new global::System.Data.DataColumn("Formula", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFormula); + this.columnDensity = new global::System.Data.DataColumn("Density", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDensity); + this.columnA = new global::System.Data.DataColumn("A", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnA); + this.columnB = new global::System.Data.DataColumn("B", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnB); + this.columnC = new global::System.Data.DataColumn("C", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnC); + this.columnAlpha = new global::System.Data.DataColumn("Alpha", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAlpha); + this.columnBeta = new global::System.Data.DataColumn("Beta", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnBeta); + this.columnGamma = new global::System.Data.DataColumn("Gamma", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnGamma); + this.columnCrystalSystem = new global::System.Data.DataColumn("CrystalSystem", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCrystalSystem); + this.columnPointGroup = new global::System.Data.DataColumn("PointGroup", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPointGroup); + this.columnSpaceGroup = new global::System.Data.DataColumn("SpaceGroup", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSpaceGroup); + this.columnAuthors = new global::System.Data.DataColumn("Authors", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAuthors); + this.columnTitle = new global::System.Data.DataColumn("Title", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTitle); + this.columnJournal = new global::System.Data.DataColumn("Journal", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnJournal); + this.columnElements = new global::System.Data.DataColumn("Elements", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnElements); + this.columnD1 = new global::System.Data.DataColumn("D1", typeof(float), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnD1); + this.columnD2 = new global::System.Data.DataColumn("D2", typeof(float), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnD2); + this.columnD3 = new global::System.Data.DataColumn("D3", typeof(float), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnD3); + this.columnD4 = new global::System.Data.DataColumn("D4", typeof(float), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnD4); + this.columnD5 = new global::System.Data.DataColumn("D5", typeof(float), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnD5); + this.columnD6 = new global::System.Data.DataColumn("D6", typeof(float), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnD6); + this.columnD7 = new global::System.Data.DataColumn("D7", typeof(float), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnD7); + this.columnD8 = new global::System.Data.DataColumn("D8", typeof(float), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnD8); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public DataTableCrystalDatabaseRow NewDataTableCrystalDatabaseRow() { + return ((DataTableCrystalDatabaseRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetF2Null() { - this[this.tableDataTableScatteringFactor.F2Column] = global::System.Convert.DBNull; + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new DataTableCrystalDatabaseRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsRelIntNull() { - return this.IsNull(this.tableDataTableScatteringFactor.RelIntColumn); + protected override global::System.Type GetRowType() { + return typeof(DataTableCrystalDatabaseRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetRelIntNull() { - this[this.tableDataTableScatteringFactor.RelIntColumn] = global::System.Convert.DBNull; + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.DataTableCrystalDatabaseRowChanged != null)) { + this.DataTableCrystalDatabaseRowChanged(this, new DataTableCrystalDatabaseRowChangeEvent(((DataTableCrystalDatabaseRow)(e.Row)), e.Action)); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsConditionNull() { - return this.IsNull(this.tableDataTableScatteringFactor.ConditionColumn); + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.DataTableCrystalDatabaseRowChanging != null)) { + this.DataTableCrystalDatabaseRowChanging(this, new DataTableCrystalDatabaseRowChangeEvent(((DataTableCrystalDatabaseRow)(e.Row)), e.Action)); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetConditionNull() { - this[this.tableDataTableScatteringFactor.ConditionColumn] = global::System.Convert.DBNull; + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.DataTableCrystalDatabaseRowDeleted != null)) { + this.DataTableCrystalDatabaseRowDeleted(this, new DataTableCrystalDatabaseRowChangeEvent(((DataTableCrystalDatabaseRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.DataTableCrystalDatabaseRowDeleting != null)) { + this.DataTableCrystalDatabaseRowDeleting(this, new DataTableCrystalDatabaseRowChangeEvent(((DataTableCrystalDatabaseRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveDataTableCrystalDatabaseRow(DataTableCrystalDatabaseRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DataSet ds = new DataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "DataTableCrystalDatabaseDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; } } /// ///Represents strongly named DataRow class. /// - public partial class DataTableAtomRow : global::System.Data.DataRow { + public partial class DataTableScatteringFactorRow : global::System.Data.DataRow { - private DataTableAtomDataTable tableDataTableAtom; + private DataTableScatteringFactorDataTable tableDataTableScatteringFactor; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - internal DataTableAtomRow(global::System.Data.DataRowBuilder rb) : + internal DataTableScatteringFactorRow(global::System.Data.DataRowBuilder rb) : base(rb) { - this.tableDataTableAtom = ((DataTableAtomDataTable)(this.Table)); + this.tableDataTableScatteringFactor = ((DataTableScatteringFactorDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public object Atom { + public int H { get { try { - return ((object)(this[this.tableDataTableAtom.AtomColumn])); + return ((int)(this[this.tableDataTableScatteringFactor.HColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Atom\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'H\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom.AtomColumn] = value; + this[this.tableDataTableScatteringFactor.HColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Enabled { + public int K { get { try { - return ((bool)(this[this.tableDataTableAtom.EnabledColumn])); + return ((int)(this[this.tableDataTableScatteringFactor.KColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Enabled\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'K\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom.EnabledColumn] = value; + this[this.tableDataTableScatteringFactor.KColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Label { + public int L { get { try { - return ((string)(this[this.tableDataTableAtom.LabelColumn])); + return ((int)(this[this.tableDataTableScatteringFactor.LColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Label\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'L\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom.LabelColumn] = value; + this[this.tableDataTableScatteringFactor.LColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Element { + public int Multi { get { try { - return ((string)(this[this.tableDataTableAtom.ElementColumn])); + return ((int)(this[this.tableDataTableScatteringFactor.MultiColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Element\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'Multi\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom.ElementColumn] = value; + this[this.tableDataTableScatteringFactor.MultiColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string X { + public double D { get { try { - return ((string)(this[this.tableDataTableAtom.XColumn])); + return ((double)(this[this.tableDataTableScatteringFactor.DColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'X\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'D\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom.XColumn] = value; + this[this.tableDataTableScatteringFactor.DColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Y { + public double Q { get { try { - return ((string)(this[this.tableDataTableAtom.YColumn])); + return ((double)(this[this.tableDataTableScatteringFactor.QColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Y\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'Q\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom.YColumn] = value; + this[this.tableDataTableScatteringFactor.QColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Z { + public double TwoTheta { get { try { - return ((string)(this[this.tableDataTableAtom.ZColumn])); + return ((double)(this[this.tableDataTableScatteringFactor.TwoThetaColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Z\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'TwoTheta\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom.ZColumn] = value; + this[this.tableDataTableScatteringFactor.TwoThetaColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string _Occ_ { + public double F_real { get { try { - return ((string)(this[this.tableDataTableAtom._Occ_Column])); + return ((double)(this[this.tableDataTableScatteringFactor.F_realColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Occ.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'F_real\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom._Occ_Column] = value; + this[this.tableDataTableScatteringFactor.F_realColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string _Multi_ { + public double F_inv { get { try { - return ((string)(this[this.tableDataTableAtom._Multi_Column])); + return ((double)(this[this.tableDataTableScatteringFactor.F_invColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Multi.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'F_inv\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom._Multi_Column] = value; + this[this.tableDataTableScatteringFactor.F_invColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string _Wyck__Let_ { + public double F { get { try { - return ((string)(this[this.tableDataTableAtom._Wyck__Let_Column])); + return ((double)(this[this.tableDataTableScatteringFactor.FColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Wyck. Let.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'F\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom._Wyck__Let_Column] = value; + this[this.tableDataTableScatteringFactor.FColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string _Site_Sym_ { + public double F2 { get { try { - return ((string)(this[this.tableDataTableAtom._Site_Sym_Column])); + return ((double)(this[this.tableDataTableScatteringFactor.F2Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Site Sym.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'F2\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableAtom._Site_Sym_Column] = value; + this[this.tableDataTableScatteringFactor.F2Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsAtomNull() { - return this.IsNull(this.tableDataTableAtom.AtomColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetAtomNull() { - this[this.tableDataTableAtom.AtomColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsEnabledNull() { - return this.IsNull(this.tableDataTableAtom.EnabledColumn); + public double RelInt { + get { + try { + return ((double)(this[this.tableDataTableScatteringFactor.RelIntColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'RelInt\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableScatteringFactor.RelIntColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetEnabledNull() { + public string Condition { + get { + try { + return ((string)(this[this.tableDataTableScatteringFactor.ConditionColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableScatteringFactor\' 縺ォ縺ゅk蛻 \'Condition\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableScatteringFactor.ConditionColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsHNull() { + return this.IsNull(this.tableDataTableScatteringFactor.HColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetHNull() { + this[this.tableDataTableScatteringFactor.HColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsKNull() { + return this.IsNull(this.tableDataTableScatteringFactor.KColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetKNull() { + this[this.tableDataTableScatteringFactor.KColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsLNull() { + return this.IsNull(this.tableDataTableScatteringFactor.LColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetLNull() { + this[this.tableDataTableScatteringFactor.LColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsMultiNull() { + return this.IsNull(this.tableDataTableScatteringFactor.MultiColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetMultiNull() { + this[this.tableDataTableScatteringFactor.MultiColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDNull() { + return this.IsNull(this.tableDataTableScatteringFactor.DColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDNull() { + this[this.tableDataTableScatteringFactor.DColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsQNull() { + return this.IsNull(this.tableDataTableScatteringFactor.QColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetQNull() { + this[this.tableDataTableScatteringFactor.QColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsTwoThetaNull() { + return this.IsNull(this.tableDataTableScatteringFactor.TwoThetaColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetTwoThetaNull() { + this[this.tableDataTableScatteringFactor.TwoThetaColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsF_realNull() { + return this.IsNull(this.tableDataTableScatteringFactor.F_realColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetF_realNull() { + this[this.tableDataTableScatteringFactor.F_realColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsF_invNull() { + return this.IsNull(this.tableDataTableScatteringFactor.F_invColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetF_invNull() { + this[this.tableDataTableScatteringFactor.F_invColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsFNull() { + return this.IsNull(this.tableDataTableScatteringFactor.FColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetFNull() { + this[this.tableDataTableScatteringFactor.FColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsF2Null() { + return this.IsNull(this.tableDataTableScatteringFactor.F2Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetF2Null() { + this[this.tableDataTableScatteringFactor.F2Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsRelIntNull() { + return this.IsNull(this.tableDataTableScatteringFactor.RelIntColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetRelIntNull() { + this[this.tableDataTableScatteringFactor.RelIntColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsConditionNull() { + return this.IsNull(this.tableDataTableScatteringFactor.ConditionColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetConditionNull() { + this[this.tableDataTableScatteringFactor.ConditionColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class DataTableAtomRow : global::System.Data.DataRow { + + private DataTableAtomDataTable tableDataTableAtom; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal DataTableAtomRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableDataTableAtom = ((DataTableAtomDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public object Atom { + get { + try { + return ((object)(this[this.tableDataTableAtom.AtomColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Atom\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom.AtomColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Enabled { + get { + try { + return ((bool)(this[this.tableDataTableAtom.EnabledColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Enabled\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom.EnabledColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Label { + get { + try { + return ((string)(this[this.tableDataTableAtom.LabelColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Label\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom.LabelColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Element { + get { + try { + return ((string)(this[this.tableDataTableAtom.ElementColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Element\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom.ElementColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string X { + get { + try { + return ((string)(this[this.tableDataTableAtom.XColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'X\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom.XColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Y { + get { + try { + return ((string)(this[this.tableDataTableAtom.YColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Y\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom.YColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Z { + get { + try { + return ((string)(this[this.tableDataTableAtom.ZColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Z\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom.ZColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string _Occ_ { + get { + try { + return ((string)(this[this.tableDataTableAtom._Occ_Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Occ.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom._Occ_Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string _Multi_ { + get { + try { + return ((string)(this[this.tableDataTableAtom._Multi_Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Multi.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom._Multi_Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string _Wyck__Let_ { + get { + try { + return ((string)(this[this.tableDataTableAtom._Wyck__Let_Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Wyck. Let.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom._Wyck__Let_Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string _Site_Sym_ { + get { + try { + return ((string)(this[this.tableDataTableAtom._Site_Sym_Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableAtom\' 縺ォ縺ゅk蛻 \'Site Sym.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableAtom._Site_Sym_Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsAtomNull() { + return this.IsNull(this.tableDataTableAtom.AtomColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetAtomNull() { + this[this.tableDataTableAtom.AtomColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsEnabledNull() { + return this.IsNull(this.tableDataTableAtom.EnabledColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetEnabledNull() { this[this.tableDataTableAtom.EnabledColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsLabelNull() { - return this.IsNull(this.tableDataTableAtom.LabelColumn); + public bool IsLabelNull() { + return this.IsNull(this.tableDataTableAtom.LabelColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetLabelNull() { + this[this.tableDataTableAtom.LabelColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsElementNull() { + return this.IsNull(this.tableDataTableAtom.ElementColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetElementNull() { + this[this.tableDataTableAtom.ElementColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsXNull() { + return this.IsNull(this.tableDataTableAtom.XColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetXNull() { + this[this.tableDataTableAtom.XColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsYNull() { + return this.IsNull(this.tableDataTableAtom.YColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetYNull() { + this[this.tableDataTableAtom.YColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsZNull() { + return this.IsNull(this.tableDataTableAtom.ZColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetZNull() { + this[this.tableDataTableAtom.ZColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Is_Occ_Null() { + return this.IsNull(this.tableDataTableAtom._Occ_Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void Set_Occ_Null() { + this[this.tableDataTableAtom._Occ_Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Is_Multi_Null() { + return this.IsNull(this.tableDataTableAtom._Multi_Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void Set_Multi_Null() { + this[this.tableDataTableAtom._Multi_Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Is_Wyck__Let_Null() { + return this.IsNull(this.tableDataTableAtom._Wyck__Let_Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void Set_Wyck__Let_Null() { + this[this.tableDataTableAtom._Wyck__Let_Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Is_Site_Sym_Null() { + return this.IsNull(this.tableDataTableAtom._Site_Sym_Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void Set_Site_Sym_Null() { + this[this.tableDataTableAtom._Site_Sym_Column] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class DataTableBondRow : global::System.Data.DataRow { + + private DataTableBondDataTable tableDataTableBond; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal DataTableBondRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableDataTableBond = ((DataTableBondDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public object Bond { + get { + try { + return ((object)(this[this.tableDataTableBond.BondColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Bond\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBond.BondColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Enabled { + get { + try { + return ((bool)(this[this.tableDataTableBond.EnabledColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Enabled\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBond.EnabledColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Center { + get { + try { + return ((string)(this[this.tableDataTableBond.CenterColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Center\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBond.CenterColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Vertex { + get { + try { + return ((string)(this[this.tableDataTableBond.VertexColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Vertex\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBond.VertexColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string _Max_len_ { + get { + try { + return ((string)(this[this.tableDataTableBond._Max_len_Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Max len.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBond._Max_len_Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string _Min_len_ { + get { + try { + return ((string)(this[this.tableDataTableBond._Min_len_Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Min len.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBond._Min_len_Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Show_bonds { + get { + try { + return ((bool)(this[this.tableDataTableBond.Show_bondsColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Show bonds\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBond.Show_bondsColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Show_Polyhedron { + get { + try { + return ((bool)(this[this.tableDataTableBond.Show_PolyhedronColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Show Polyhedron\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBond.Show_PolyhedronColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsBondNull() { + return this.IsNull(this.tableDataTableBond.BondColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetBondNull() { + this[this.tableDataTableBond.BondColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsEnabledNull() { + return this.IsNull(this.tableDataTableBond.EnabledColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetEnabledNull() { + this[this.tableDataTableBond.EnabledColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsCenterNull() { + return this.IsNull(this.tableDataTableBond.CenterColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetCenterNull() { + this[this.tableDataTableBond.CenterColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsVertexNull() { + return this.IsNull(this.tableDataTableBond.VertexColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetVertexNull() { + this[this.tableDataTableBond.VertexColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Is_Max_len_Null() { + return this.IsNull(this.tableDataTableBond._Max_len_Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void Set_Max_len_Null() { + this[this.tableDataTableBond._Max_len_Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Is_Min_len_Null() { + return this.IsNull(this.tableDataTableBond._Min_len_Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void Set_Min_len_Null() { + this[this.tableDataTableBond._Min_len_Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsShow_bondsNull() { + return this.IsNull(this.tableDataTableBond.Show_bondsColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetShow_bondsNull() { + this[this.tableDataTableBond.Show_bondsColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsShow_PolyhedronNull() { + return this.IsNull(this.tableDataTableBond.Show_PolyhedronColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetShow_PolyhedronNull() { + this[this.tableDataTableBond.Show_PolyhedronColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class DataTableBoundRow : global::System.Data.DataRow { + + private DataTableBoundDataTable tableDataTableBound; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal DataTableBoundRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableDataTableBound = ((DataTableBoundDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public object Bound { + get { + try { + return ((object)(this[this.tableDataTableBound.BoundColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Bound\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.BoundColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Enabled { + get { + try { + return ((bool)(this[this.tableDataTableBound.EnabledColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Enabled\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.EnabledColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int h { + get { + try { + return ((int)(this[this.tableDataTableBound.hColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'h\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.hColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int k { + get { + try { + return ((int)(this[this.tableDataTableBound.kColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'k\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.kColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int l { + get { + try { + return ((int)(this[this.tableDataTableBound.lColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'l\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.lColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Equivalency { + get { + try { + return ((bool)(this[this.tableDataTableBound.EquivalencyColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Equivalency\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.EquivalencyColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Distance { + get { + try { + return ((string)(this[this.tableDataTableBound.DistanceColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Distance\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.DistanceColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string MultipleOfD { + get { + try { + return ((string)(this[this.tableDataTableBound.MultipleOfDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'MultipleOfD\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.MultipleOfDColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetLabelNull() { - this[this.tableDataTableAtom.LabelColumn] = global::System.Convert.DBNull; + public object Color { + get { + try { + return ((object)(this[this.tableDataTableBound.ColorColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Color\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableBound.ColorColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsElementNull() { - return this.IsNull(this.tableDataTableAtom.ElementColumn); + public bool IsBoundNull() { + return this.IsNull(this.tableDataTableBound.BoundColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetBoundNull() { + this[this.tableDataTableBound.BoundColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsEnabledNull() { + return this.IsNull(this.tableDataTableBound.EnabledColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetEnabledNull() { + this[this.tableDataTableBound.EnabledColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IshNull() { + return this.IsNull(this.tableDataTableBound.hColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SethNull() { + this[this.tableDataTableBound.hColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IskNull() { + return this.IsNull(this.tableDataTableBound.kColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetkNull() { + this[this.tableDataTableBound.kColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IslNull() { + return this.IsNull(this.tableDataTableBound.lColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetlNull() { + this[this.tableDataTableBound.lColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsEquivalencyNull() { + return this.IsNull(this.tableDataTableBound.EquivalencyColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetEquivalencyNull() { + this[this.tableDataTableBound.EquivalencyColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDistanceNull() { + return this.IsNull(this.tableDataTableBound.DistanceColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDistanceNull() { + this[this.tableDataTableBound.DistanceColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsMultipleOfDNull() { + return this.IsNull(this.tableDataTableBound.MultipleOfDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetMultipleOfDNull() { + this[this.tableDataTableBound.MultipleOfDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsColorNull() { + return this.IsNull(this.tableDataTableBound.ColorColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetColorNull() { + this[this.tableDataTableBound.ColorColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class DataTableLatticePlaneRow : global::System.Data.DataRow { + + private DataTableLatticePlaneDataTable tableDataTableLatticePlane; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal DataTableLatticePlaneRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableDataTableLatticePlane = ((DataTableLatticePlaneDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public object LatticePlane { + get { + try { + return ((object)(this[this.tableDataTableLatticePlane.LatticePlaneColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'LatticePlane\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableLatticePlane.LatticePlaneColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Enabled { + get { + try { + return ((bool)(this[this.tableDataTableLatticePlane.EnabledColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'Enabled\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableLatticePlane.EnabledColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int h { + get { + try { + return ((int)(this[this.tableDataTableLatticePlane.hColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'h\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableLatticePlane.hColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int k { + get { + try { + return ((int)(this[this.tableDataTableLatticePlane.kColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'k\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableLatticePlane.kColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int l { + get { + try { + return ((int)(this[this.tableDataTableLatticePlane.lColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'l\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableLatticePlane.lColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Translation { + get { + try { + return ((string)(this[this.tableDataTableLatticePlane.TranslationColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'Translation\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableLatticePlane.TranslationColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetElementNull() { - this[this.tableDataTableAtom.ElementColumn] = global::System.Convert.DBNull; + public object Color { + get { + try { + return ((object)(this[this.tableDataTableLatticePlane.ColorColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'Color\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableLatticePlane.ColorColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsXNull() { - return this.IsNull(this.tableDataTableAtom.XColumn); + public bool IsLatticePlaneNull() { + return this.IsNull(this.tableDataTableLatticePlane.LatticePlaneColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetXNull() { - this[this.tableDataTableAtom.XColumn] = global::System.Convert.DBNull; + public void SetLatticePlaneNull() { + this[this.tableDataTableLatticePlane.LatticePlaneColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsYNull() { - return this.IsNull(this.tableDataTableAtom.YColumn); + public bool IsEnabledNull() { + return this.IsNull(this.tableDataTableLatticePlane.EnabledColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetYNull() { - this[this.tableDataTableAtom.YColumn] = global::System.Convert.DBNull; + public void SetEnabledNull() { + this[this.tableDataTableLatticePlane.EnabledColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsZNull() { - return this.IsNull(this.tableDataTableAtom.ZColumn); + public bool IshNull() { + return this.IsNull(this.tableDataTableLatticePlane.hColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetZNull() { - this[this.tableDataTableAtom.ZColumn] = global::System.Convert.DBNull; + public void SethNull() { + this[this.tableDataTableLatticePlane.hColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Is_Occ_Null() { - return this.IsNull(this.tableDataTableAtom._Occ_Column); + public bool IskNull() { + return this.IsNull(this.tableDataTableLatticePlane.kColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void Set_Occ_Null() { - this[this.tableDataTableAtom._Occ_Column] = global::System.Convert.DBNull; + public void SetkNull() { + this[this.tableDataTableLatticePlane.kColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Is_Multi_Null() { - return this.IsNull(this.tableDataTableAtom._Multi_Column); + public bool IslNull() { + return this.IsNull(this.tableDataTableLatticePlane.lColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void Set_Multi_Null() { - this[this.tableDataTableAtom._Multi_Column] = global::System.Convert.DBNull; + public void SetlNull() { + this[this.tableDataTableLatticePlane.lColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Is_Wyck__Let_Null() { - return this.IsNull(this.tableDataTableAtom._Wyck__Let_Column); + public bool IsTranslationNull() { + return this.IsNull(this.tableDataTableLatticePlane.TranslationColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void Set_Wyck__Let_Null() { - this[this.tableDataTableAtom._Wyck__Let_Column] = global::System.Convert.DBNull; + public void SetTranslationNull() { + this[this.tableDataTableLatticePlane.TranslationColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Is_Site_Sym_Null() { - return this.IsNull(this.tableDataTableAtom._Site_Sym_Column); + public bool IsColorNull() { + return this.IsNull(this.tableDataTableLatticePlane.ColorColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void Set_Site_Sym_Null() { - this[this.tableDataTableAtom._Site_Sym_Column] = global::System.Convert.DBNull; + public void SetColorNull() { + this[this.tableDataTableLatticePlane.ColorColumn] = global::System.Convert.DBNull; } } /// ///Represents strongly named DataRow class. /// - public partial class DataTableBondRow : global::System.Data.DataRow { + public partial class DataTableCrystalDatabaseRow : global::System.Data.DataRow { - private DataTableBondDataTable tableDataTableBond; + private DataTableCrystalDatabaseDataTable tableDataTableCrystalDatabase; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - internal DataTableBondRow(global::System.Data.DataRowBuilder rb) : + internal DataTableCrystalDatabaseRow(global::System.Data.DataRowBuilder rb) : base(rb) { - this.tableDataTableBond = ((DataTableBondDataTable)(this.Table)); + this.tableDataTableCrystalDatabase = ((DataTableCrystalDatabaseDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public object Bond { + public object SerializedCrystal2 { get { try { - return ((object)(this[this.tableDataTableBond.BondColumn])); + return ((object)(this[this.tableDataTableCrystalDatabase.SerializedCrystal2Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Bond\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'SerializedCrystal2\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBond.BondColumn] = value; + this[this.tableDataTableCrystalDatabase.SerializedCrystal2Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Enabled { + public string Name { get { try { - return ((bool)(this[this.tableDataTableBond.EnabledColumn])); + return ((string)(this[this.tableDataTableCrystalDatabase.NameColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Enabled\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Name\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBond.EnabledColumn] = value; + this[this.tableDataTableCrystalDatabase.NameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Center { + public string Formula { get { try { - return ((string)(this[this.tableDataTableBond.CenterColumn])); + return ((string)(this[this.tableDataTableCrystalDatabase.FormulaColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Center\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Formula\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBond.CenterColumn] = value; + this[this.tableDataTableCrystalDatabase.FormulaColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Vertex { + public double Density { get { try { - return ((string)(this[this.tableDataTableBond.VertexColumn])); + return ((double)(this[this.tableDataTableCrystalDatabase.DensityColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Vertex\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Density\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBond.VertexColumn] = value; + this[this.tableDataTableCrystalDatabase.DensityColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string _Max_len_ { + public double A { get { try { - return ((string)(this[this.tableDataTableBond._Max_len_Column])); + return ((double)(this[this.tableDataTableCrystalDatabase.AColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Max len.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'A\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBond._Max_len_Column] = value; + this[this.tableDataTableCrystalDatabase.AColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string _Min_len_ { + public double B { get { try { - return ((string)(this[this.tableDataTableBond._Min_len_Column])); + return ((double)(this[this.tableDataTableCrystalDatabase.BColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Min len.\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'B\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBond._Min_len_Column] = value; + this[this.tableDataTableCrystalDatabase.BColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Show_bonds { + public double C { get { try { - return ((bool)(this[this.tableDataTableBond.Show_bondsColumn])); + return ((double)(this[this.tableDataTableCrystalDatabase.CColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Show bonds\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'C\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBond.Show_bondsColumn] = value; + this[this.tableDataTableCrystalDatabase.CColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Show_Polyhedron { + public double Alpha { get { try { - return ((bool)(this[this.tableDataTableBond.Show_PolyhedronColumn])); + return ((double)(this[this.tableDataTableCrystalDatabase.AlphaColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBond\' 縺ォ縺ゅk蛻 \'Show Polyhedron\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Alpha\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBond.Show_PolyhedronColumn] = value; + this[this.tableDataTableCrystalDatabase.AlphaColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsBondNull() { - return this.IsNull(this.tableDataTableBond.BondColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetBondNull() { - this[this.tableDataTableBond.BondColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsEnabledNull() { - return this.IsNull(this.tableDataTableBond.EnabledColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetEnabledNull() { - this[this.tableDataTableBond.EnabledColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsCenterNull() { - return this.IsNull(this.tableDataTableBond.CenterColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetCenterNull() { - this[this.tableDataTableBond.CenterColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsVertexNull() { - return this.IsNull(this.tableDataTableBond.VertexColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetVertexNull() { - this[this.tableDataTableBond.VertexColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Is_Max_len_Null() { - return this.IsNull(this.tableDataTableBond._Max_len_Column); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void Set_Max_len_Null() { - this[this.tableDataTableBond._Max_len_Column] = global::System.Convert.DBNull; + public double Beta { + get { + try { + return ((double)(this[this.tableDataTableCrystalDatabase.BetaColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Beta\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableCrystalDatabase.BetaColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Is_Min_len_Null() { - return this.IsNull(this.tableDataTableBond._Min_len_Column); + public double Gamma { + get { + try { + return ((double)(this[this.tableDataTableCrystalDatabase.GammaColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Gamma\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableCrystalDatabase.GammaColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void Set_Min_len_Null() { - this[this.tableDataTableBond._Min_len_Column] = global::System.Convert.DBNull; + public string CrystalSystem { + get { + try { + return ((string)(this[this.tableDataTableCrystalDatabase.CrystalSystemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'CrystalSystem\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableCrystalDatabase.CrystalSystemColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsShow_bondsNull() { - return this.IsNull(this.tableDataTableBond.Show_bondsColumn); + public string PointGroup { + get { + try { + return ((string)(this[this.tableDataTableCrystalDatabase.PointGroupColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'PointGroup\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableCrystalDatabase.PointGroupColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetShow_bondsNull() { - this[this.tableDataTableBond.Show_bondsColumn] = global::System.Convert.DBNull; + public string SpaceGroup { + get { + try { + return ((string)(this[this.tableDataTableCrystalDatabase.SpaceGroupColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'SpaceGroup\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableCrystalDatabase.SpaceGroupColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsShow_PolyhedronNull() { - return this.IsNull(this.tableDataTableBond.Show_PolyhedronColumn); + public string Authors { + get { + try { + return ((string)(this[this.tableDataTableCrystalDatabase.AuthorsColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Authors\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableCrystalDatabase.AuthorsColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetShow_PolyhedronNull() { - this[this.tableDataTableBond.Show_PolyhedronColumn] = global::System.Convert.DBNull; + public string Title { + get { + try { + return ((string)(this[this.tableDataTableCrystalDatabase.TitleColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Title\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableCrystalDatabase.TitleColumn] = value; + } } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class DataTableBoundRow : global::System.Data.DataRow { - - private DataTableBoundDataTable tableDataTableBound; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - internal DataTableBoundRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tableDataTableBound = ((DataTableBoundDataTable)(this.Table)); + public string Journal { + get { + try { + return ((string)(this[this.tableDataTableCrystalDatabase.JournalColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Journal\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + } + } + set { + this[this.tableDataTableCrystalDatabase.JournalColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public object Bound { + public string Elements { get { try { - return ((object)(this[this.tableDataTableBound.BoundColumn])); + return ((string)(this[this.tableDataTableCrystalDatabase.ElementsColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Bound\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'Elements\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.BoundColumn] = value; + this[this.tableDataTableCrystalDatabase.ElementsColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Enabled { + public float D1 { get { try { - return ((bool)(this[this.tableDataTableBound.EnabledColumn])); + return ((float)(this[this.tableDataTableCrystalDatabase.D1Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Enabled\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'D1\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.EnabledColumn] = value; + this[this.tableDataTableCrystalDatabase.D1Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int h { + public float D2 { get { try { - return ((int)(this[this.tableDataTableBound.hColumn])); + return ((float)(this[this.tableDataTableCrystalDatabase.D2Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'h\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'D2\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.hColumn] = value; + this[this.tableDataTableCrystalDatabase.D2Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int k { + public float D3 { get { try { - return ((int)(this[this.tableDataTableBound.kColumn])); + return ((float)(this[this.tableDataTableCrystalDatabase.D3Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'k\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'D3\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.kColumn] = value; + this[this.tableDataTableCrystalDatabase.D3Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int l { + public float D4 { get { try { - return ((int)(this[this.tableDataTableBound.lColumn])); + return ((float)(this[this.tableDataTableCrystalDatabase.D4Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'l\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'D4\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.lColumn] = value; + this[this.tableDataTableCrystalDatabase.D4Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Equivalency { + public float D5 { get { try { - return ((bool)(this[this.tableDataTableBound.EquivalencyColumn])); + return ((float)(this[this.tableDataTableCrystalDatabase.D5Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Equivalency\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'D5\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.EquivalencyColumn] = value; + this[this.tableDataTableCrystalDatabase.D5Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Distance { + public float D6 { get { try { - return ((string)(this[this.tableDataTableBound.DistanceColumn])); + return ((float)(this[this.tableDataTableCrystalDatabase.D6Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Distance\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'D6\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.DistanceColumn] = value; + this[this.tableDataTableCrystalDatabase.D6Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string MultipleOfD { + public float D7 { get { try { - return ((string)(this[this.tableDataTableBound.MultipleOfDColumn])); + return ((float)(this[this.tableDataTableCrystalDatabase.D7Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'MultipleOfD\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'D7\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.MultipleOfDColumn] = value; + this[this.tableDataTableCrystalDatabase.D7Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public object Color { + public float D8 { get { try { - return ((object)(this[this.tableDataTableBound.ColorColumn])); + return ((float)(this[this.tableDataTableCrystalDatabase.D8Column])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableBound\' 縺ォ縺ゅk蛻 \'Color\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); + throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableCrystalDatabase\' 縺ォ縺ゅk蛻 \'D8\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); } } set { - this[this.tableDataTableBound.ColorColumn] = value; + this[this.tableDataTableCrystalDatabase.D8Column] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsBoundNull() { - return this.IsNull(this.tableDataTableBound.BoundColumn); + public bool IsSerializedCrystal2Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.SerializedCrystal2Column); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetBoundNull() { - this[this.tableDataTableBound.BoundColumn] = global::System.Convert.DBNull; + public void SetSerializedCrystal2Null() { + this[this.tableDataTableCrystalDatabase.SerializedCrystal2Column] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsEnabledNull() { - return this.IsNull(this.tableDataTableBound.EnabledColumn); + public bool IsNameNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.NameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetEnabledNull() { - this[this.tableDataTableBound.EnabledColumn] = global::System.Convert.DBNull; + public void SetNameNull() { + this[this.tableDataTableCrystalDatabase.NameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IshNull() { - return this.IsNull(this.tableDataTableBound.hColumn); + public bool IsFormulaNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.FormulaColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SethNull() { - this[this.tableDataTableBound.hColumn] = global::System.Convert.DBNull; + public void SetFormulaNull() { + this[this.tableDataTableCrystalDatabase.FormulaColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IskNull() { - return this.IsNull(this.tableDataTableBound.kColumn); + public bool IsDensityNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.DensityColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetkNull() { - this[this.tableDataTableBound.kColumn] = global::System.Convert.DBNull; + public void SetDensityNull() { + this[this.tableDataTableCrystalDatabase.DensityColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IslNull() { - return this.IsNull(this.tableDataTableBound.lColumn); + public bool IsANull() { + return this.IsNull(this.tableDataTableCrystalDatabase.AColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetlNull() { - this[this.tableDataTableBound.lColumn] = global::System.Convert.DBNull; + public void SetANull() { + this[this.tableDataTableCrystalDatabase.AColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsEquivalencyNull() { - return this.IsNull(this.tableDataTableBound.EquivalencyColumn); + public bool IsBNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.BColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetEquivalencyNull() { - this[this.tableDataTableBound.EquivalencyColumn] = global::System.Convert.DBNull; + public void SetBNull() { + this[this.tableDataTableCrystalDatabase.BColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsDistanceNull() { - return this.IsNull(this.tableDataTableBound.DistanceColumn); + public bool IsCNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.CColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetDistanceNull() { - this[this.tableDataTableBound.DistanceColumn] = global::System.Convert.DBNull; + public void SetCNull() { + this[this.tableDataTableCrystalDatabase.CColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsMultipleOfDNull() { - return this.IsNull(this.tableDataTableBound.MultipleOfDColumn); + public bool IsAlphaNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.AlphaColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetMultipleOfDNull() { - this[this.tableDataTableBound.MultipleOfDColumn] = global::System.Convert.DBNull; + public void SetAlphaNull() { + this[this.tableDataTableCrystalDatabase.AlphaColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsColorNull() { - return this.IsNull(this.tableDataTableBound.ColorColumn); + public bool IsBetaNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.BetaColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetColorNull() { - this[this.tableDataTableBound.ColorColumn] = global::System.Convert.DBNull; + public void SetBetaNull() { + this[this.tableDataTableCrystalDatabase.BetaColumn] = global::System.Convert.DBNull; } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class DataTableLatticePlaneRow : global::System.Data.DataRow { - private DataTableLatticePlaneDataTable tableDataTableLatticePlane; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsGammaNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.GammaColumn); + } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - internal DataTableLatticePlaneRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tableDataTableLatticePlane = ((DataTableLatticePlaneDataTable)(this.Table)); + public void SetGammaNull() { + this[this.tableDataTableCrystalDatabase.GammaColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public object LatticePlane { - get { - try { - return ((object)(this[this.tableDataTableLatticePlane.LatticePlaneColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'LatticePlane\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableLatticePlane.LatticePlaneColumn] = value; - } + public bool IsCrystalSystemNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.CrystalSystemColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool Enabled { - get { - try { - return ((bool)(this[this.tableDataTableLatticePlane.EnabledColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'Enabled\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableLatticePlane.EnabledColumn] = value; - } + public void SetCrystalSystemNull() { + this[this.tableDataTableCrystalDatabase.CrystalSystemColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int h { - get { - try { - return ((int)(this[this.tableDataTableLatticePlane.hColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'h\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableLatticePlane.hColumn] = value; - } + public bool IsPointGroupNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.PointGroupColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int k { - get { - try { - return ((int)(this[this.tableDataTableLatticePlane.kColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'k\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableLatticePlane.kColumn] = value; - } + public void SetPointGroupNull() { + this[this.tableDataTableCrystalDatabase.PointGroupColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int l { - get { - try { - return ((int)(this[this.tableDataTableLatticePlane.lColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'l\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableLatticePlane.lColumn] = value; - } + public bool IsSpaceGroupNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.SpaceGroupColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public string Translation { - get { - try { - return ((string)(this[this.tableDataTableLatticePlane.TranslationColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'Translation\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableLatticePlane.TranslationColumn] = value; - } + public void SetSpaceGroupNull() { + this[this.tableDataTableCrystalDatabase.SpaceGroupColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public object Color { - get { - try { - return ((object)(this[this.tableDataTableLatticePlane.ColorColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("繝繝シ繝悶Ν \'DataTableLatticePlane\' 縺ォ縺ゅk蛻 \'Color\' 縺ョ蛟、縺ッ DBNull 縺ァ縺吶", e); - } - } - set { - this[this.tableDataTableLatticePlane.ColorColumn] = value; - } + public bool IsAuthorsNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.AuthorsColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsLatticePlaneNull() { - return this.IsNull(this.tableDataTableLatticePlane.LatticePlaneColumn); + public void SetAuthorsNull() { + this[this.tableDataTableCrystalDatabase.AuthorsColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetLatticePlaneNull() { - this[this.tableDataTableLatticePlane.LatticePlaneColumn] = global::System.Convert.DBNull; + public bool IsTitleNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.TitleColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsEnabledNull() { - return this.IsNull(this.tableDataTableLatticePlane.EnabledColumn); + public void SetTitleNull() { + this[this.tableDataTableCrystalDatabase.TitleColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetEnabledNull() { - this[this.tableDataTableLatticePlane.EnabledColumn] = global::System.Convert.DBNull; + public bool IsJournalNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.JournalColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IshNull() { - return this.IsNull(this.tableDataTableLatticePlane.hColumn); + public void SetJournalNull() { + this[this.tableDataTableCrystalDatabase.JournalColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SethNull() { - this[this.tableDataTableLatticePlane.hColumn] = global::System.Convert.DBNull; + public bool IsElementsNull() { + return this.IsNull(this.tableDataTableCrystalDatabase.ElementsColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IskNull() { - return this.IsNull(this.tableDataTableLatticePlane.kColumn); + public void SetElementsNull() { + this[this.tableDataTableCrystalDatabase.ElementsColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetkNull() { - this[this.tableDataTableLatticePlane.kColumn] = global::System.Convert.DBNull; + public bool IsD1Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.D1Column); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IslNull() { - return this.IsNull(this.tableDataTableLatticePlane.lColumn); + public void SetD1Null() { + this[this.tableDataTableCrystalDatabase.D1Column] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetlNull() { - this[this.tableDataTableLatticePlane.lColumn] = global::System.Convert.DBNull; + public bool IsD2Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.D2Column); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsTranslationNull() { - return this.IsNull(this.tableDataTableLatticePlane.TranslationColumn); + public void SetD2Null() { + this[this.tableDataTableCrystalDatabase.D2Column] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetTranslationNull() { - this[this.tableDataTableLatticePlane.TranslationColumn] = global::System.Convert.DBNull; + public bool IsD3Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.D3Column); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsColorNull() { - return this.IsNull(this.tableDataTableLatticePlane.ColorColumn); + public void SetD3Null() { + this[this.tableDataTableCrystalDatabase.D3Column] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetColorNull() { - this[this.tableDataTableLatticePlane.ColorColumn] = global::System.Convert.DBNull; + public bool IsD4Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.D4Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetD4Null() { + this[this.tableDataTableCrystalDatabase.D4Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsD5Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.D5Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetD5Null() { + this[this.tableDataTableCrystalDatabase.D5Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsD6Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.D6Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetD6Null() { + this[this.tableDataTableCrystalDatabase.D6Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsD7Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.D7Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetD7Null() { + this[this.tableDataTableCrystalDatabase.D7Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsD8Null() { + return this.IsNull(this.tableDataTableCrystalDatabase.D8Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetD8Null() { + this[this.tableDataTableCrystalDatabase.D8Column] = global::System.Convert.DBNull; } } @@ -3849,6 +5207,40 @@ public DataTableLatticePlaneRow Row { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class DataTableCrystalDatabaseRowChangeEvent : global::System.EventArgs { + + private DataTableCrystalDatabaseRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public DataTableCrystalDatabaseRowChangeEvent(DataTableCrystalDatabaseRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public DataTableCrystalDatabaseRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } diff --git a/Crystallography.Controls/DataSet.cs b/Crystallography.Controls/DataSet.cs index 9d114ad..e2dfb7d 100644 --- a/Crystallography.Controls/DataSet.cs +++ b/Crystallography.Controls/DataSet.cs @@ -6,6 +6,10 @@ using System.Numerics; using Crystallography; using Microsoft.Scripting.Utils; +using MessagePack.Resolvers; +using MessagePack; +using System.Threading; +using System.Text; namespace Crystallography.Controls { @@ -15,6 +19,7 @@ namespace Crystallography.Controls { public partial class DataSet { + #region 蜈ア騾壹ョ髱咏噪髢「謨ー public static Bitmap ColorImage(int argb) { @@ -138,41 +143,32 @@ private DataTableAtomRow createRow(Atoms atom) dr[this._Site_Sym_Column] = atom.SiteSymmetry; dr[this._Wyck__Let_Column] = atom.WyckoffLeter; dr[this.ElementColumn] = atom.ElementName; - dr[this.XColumn] = GetStringFromDouble(atom.X); - dr[this.YColumn] = GetStringFromDouble(atom.Y); - dr[this.ZColumn] = GetStringFromDouble(atom.Z); + dr[this.XColumn] = GetStringFromDouble(atom.X, 6, true); + dr[this.YColumn] = GetStringFromDouble(atom.Y, 6, true); + dr[this.ZColumn] = GetStringFromDouble(atom.Z, 6, true); dr[this._columnMulti_] = atom.Multiplicity; - dr[this._Occ_Column] = atom.Occ; + dr[this._Occ_Column] = GetStringFromDouble(atom.Occ, 6, false); return dr; } - public static string GetStringFromDouble(double d) + + public static string GetStringFromDouble(double d, int decimalPlaces, bool fraction) { #region - if (Math.Abs(d - 0.125) < 0.000000001) return "1/8"; - else if (Math.Abs(d - 0.375) < 0.000000001) return "3/8"; - else if (Math.Abs(d - 0.625) < 0.000000001) return "5/8"; - else if (Math.Abs(d - 0.875) < 0.000000001) return "7/8"; - else if (Math.Abs(d - 0.25) < 0.000000001) return "1/4"; - else if (Math.Abs(d - 0.75) < 0.000000001) return "3/4"; - else if (Math.Abs(d - 0.5) < 0.000000001) return "1/2"; - else if (Math.Abs(d - 1.0 / 3.0) < 0.000000001) return "1/3"; - else if (Math.Abs(d - 2.0 / 3.0) < 0.000000001) return "2/3"; - else if (Math.Abs(d - 1.0 / 6.0) < 0.000000001) return "1/6"; - else if (Math.Abs(d - 5.0 / 6.0) < 0.000000001) return "5/6"; - else if (Math.Abs(d - 1.0 / 12.0) < 0.000000001) return "1/12"; - else if (Math.Abs(d - 5.0 / 12.0) < 0.000000001) return "5/12"; - else if (Math.Abs(d - 7.0 / 12.0) < 0.000000001) return "7/12"; - else if (Math.Abs(d - 11.0 / 12.0) < 0.000000001) return "11/12"; - else if (Math.Abs(d - 1.0 / 24.0) < 0.000000001) return "1/24"; - else if (Math.Abs(d - 5.0 / 24.0) < 0.000000001) return "5/24"; - else if (Math.Abs(d - 7.0 / 24.0) < 0.000000001) return "7/24"; - else if (Math.Abs(d - 11.0 / 24.0) < 0.000000001) return "11/24"; - else if (Math.Abs(d - 13.0 / 24.0) < 0.000000001) return "13/24"; - else if (Math.Abs(d - 17.0 / 24.0) < 0.000000001) return "17/24"; - else if (Math.Abs(d - 19.0 / 24.0) < 0.000000001) return "19/24"; - else if (Math.Abs(d - 23.0 / 24.0) < 0.000000001) return "23/24"; - else return d.ToString("g6"); + + var threshold = Math.Pow(10, -decimalPlaces); + + var text = ""; + if (d != 0 && fraction) //蛻謨ー縺ァ陦ィ遉コ縺吶k縺ィ縺 + { + int j = (int)Math.Ceiling(d - 1); + foreach (var denom in new[] { 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 16, 24 }) + for (int i = 1; i < denom && text == ""; i++) + if ((i == 1 || denom % i != 0) && Math.Abs(d - j - i / (double)denom) < threshold) + text = $"{i + (denom * j)}/{denom}"; + } + + return text != "" ? text : d.ToString($"g{decimalPlaces}"); #endregion } } @@ -206,6 +202,98 @@ public void Add(int h, int k, int l, int mult, double d, double twoTheta, Comple public new void Clear() => Rows.Clear(); } + + + partial class DataTableCrystalDatabaseDataTable + { + + readonly ReaderWriterLockSlim rwlock = new ReaderWriterLockSlim(); + + readonly MessagePackSerializerOptions msgOptions = StandardResolverAllowPrivate.Options.WithCompression(MessagePackCompression.Lz4BlockArray); + byte[] serialize(T c) => MessagePackSerializer.Serialize(c, msgOptions); + T deserialize(object obj) => MessagePackSerializer.Deserialize((byte[])obj, msgOptions); + + + /// + /// 蠑墓焚縺ッbindingSourceMain.Current繧ェ繝悶ず繧ァ繧ッ繝. + /// + /// + /// + public Crystal2 Get(object o) => o is DataRowView drv && drv.Row is DataTableCrystalDatabaseRow r ? deserialize(r[SerializedCrystal2Column]) : null; + + public void Add(Crystal2 crystal) => Add(CreateRow(crystal)); + public void Add(DataTableCrystalDatabaseRow row) => Rows.Add(row); + + public new void Clear() => Rows.Clear(); + + public void Remove(int i) => Rows.RemoveAt(i); + + /// + /// srcCrystal縺ッbindingSourceMain.Current繧ェ繝悶ず繧ァ繧ッ繝. + /// + /// + /// + public void Replace(object srcCrystal, Crystal2 targetcrystal) + { + if (srcCrystal is DataRowView drv && drv.Row is DataTableCrystalDatabaseRow src) + { + var target = CreateRow(targetcrystal); + for (int j = 0; j < drv.Row.ItemArray.Length; j++) + src[j] = target[j]; + } + } + public DataTableCrystalDatabaseRow CreateRow(Crystal2 c) + { + var elementList = new StringBuilder(); + foreach (var n in c.atoms.Select(a => a.AtomNo).Distinct()) + elementList.Append($"{n:000} "); + + var d = new float[8]; + if (c.d != null) + Array.Copy(c.d, d, c.d.Length); + + DataTableCrystalDatabaseRow dr; + try + { + + rwlock.EnterWriteLock(); + dr = NewDataTableCrystalDatabaseRow(); + } + finally { rwlock.ExitWriteLock(); } + + var (cellValues, _) = c.Cell; + + dr.SerializedCrystal2 = serialize(c); + dr.Name = c.name; + dr.Formula = c.formula; + dr.Density = c.density; + dr.A = cellValues.A; + dr.B = cellValues.B; + dr.C = cellValues.C; + dr.Alpha = cellValues.Alpha; + dr.Beta = cellValues.Beta; + dr.Gamma = cellValues.Gamma; + dr.CrystalSystem = SymmetryStatic.StrArray[c.sym][16];//s.CrystalSystemStr; + dr.PointGroup = SymmetryStatic.StrArray[c.sym][13]; + dr.SpaceGroup = SymmetryStatic.StrArray[c.sym][3]; + dr.Authors = c.auth; + dr.Title = Crystal2.GetFullTitle(c.sect); + dr.Journal = Crystal2.GetFullJournal(c.jour); + dr.Elements = elementList.ToString(); + dr.D1 = d[0]; + dr.D2 = d[1]; + dr.D3 = d[2]; + dr.D4 = d[3]; + dr.D5 = d[4]; + dr.D6 = d[5]; + dr.D7 = d[6]; + dr.D8 = d[7]; + + return dr; + } + + + } } } diff --git a/Crystallography.Controls/DataSet.xsd b/Crystallography.Controls/DataSet.xsd index 5b081f7..eefa712 100644 --- a/Crystallography.Controls/DataSet.xsd +++ b/Crystallography.Controls/DataSet.xsd @@ -12,7 +12,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -90,6 +90,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Crystallography.Controls/FormElasticity.Designer.cs b/Crystallography.Controls/FormElasticity.Designer.cs deleted file mode 100644 index a076457..0000000 --- a/Crystallography.Controls/FormElasticity.Designer.cs +++ /dev/null @@ -1,194 +0,0 @@ -サソnamespace Crystallography.Controls -{ - partial class FormElasticity - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.numericBox9 = new Crystallography.Controls.NumericBox(); - this.numericBox8 = new Crystallography.Controls.NumericBox(); - this.numericBox7 = new Crystallography.Controls.NumericBox(); - this.numericBox6 = new Crystallography.Controls.NumericBox(); - this.numericBox5 = new Crystallography.Controls.NumericBox(); - this.numericBox4 = new Crystallography.Controls.NumericBox(); - this.numericBox3 = new Crystallography.Controls.NumericBox(); - this.numericBox2 = new Crystallography.Controls.NumericBox(); - this.numericBox1 = new Crystallography.Controls.NumericBox(); - this.SuspendLayout(); - // - // numericBox9 - // - this.numericBox9.BackColor = System.Drawing.SystemColors.Control; - this.numericBox9.DecimalPlaces = -1; - this.numericBox9.Location = new System.Drawing.Point(246, 245); - this.numericBox9.Margin = new System.Windows.Forms.Padding(1); - this.numericBox9.Name = "numericBox9"; - this.numericBox9.Padding = new System.Windows.Forms.Padding(1); - this.numericBox9.RadianValue = 0D; - - this.numericBox9.Size = new System.Drawing.Size(61, 21); - this.numericBox9.TabIndex = 0; - // - // numericBox8 - // - this.numericBox8.BackColor = System.Drawing.SystemColors.Control; - this.numericBox8.DecimalPlaces = -1; - this.numericBox8.Location = new System.Drawing.Point(246, 222); - this.numericBox8.Margin = new System.Windows.Forms.Padding(1); - this.numericBox8.Name = "numericBox8"; - this.numericBox8.Padding = new System.Windows.Forms.Padding(1); - this.numericBox8.RadianValue = 0D; - - this.numericBox8.Size = new System.Drawing.Size(61, 21); - this.numericBox8.TabIndex = 0; - // - // numericBox7 - // - this.numericBox7.BackColor = System.Drawing.SystemColors.Control; - this.numericBox7.DecimalPlaces = -1; - this.numericBox7.Enabled = false; - this.numericBox7.Location = new System.Drawing.Point(183, 245); - this.numericBox7.Margin = new System.Windows.Forms.Padding(1); - this.numericBox7.Name = "numericBox7"; - this.numericBox7.Padding = new System.Windows.Forms.Padding(1); - this.numericBox7.RadianValue = 0D; - - this.numericBox7.Size = new System.Drawing.Size(61, 21); - this.numericBox7.TabIndex = 0; - // - // numericBox6 - // - this.numericBox6.BackColor = System.Drawing.SystemColors.Control; - this.numericBox6.DecimalPlaces = -1; - this.numericBox6.Location = new System.Drawing.Point(246, 199); - this.numericBox6.Margin = new System.Windows.Forms.Padding(1); - this.numericBox6.Name = "numericBox6"; - this.numericBox6.Padding = new System.Windows.Forms.Padding(1); - this.numericBox6.RadianValue = 0D; - - this.numericBox6.Size = new System.Drawing.Size(61, 21); - this.numericBox6.TabIndex = 0; - // - // numericBox5 - // - this.numericBox5.BackColor = System.Drawing.SystemColors.Control; - this.numericBox5.DecimalPlaces = -1; - this.numericBox5.Location = new System.Drawing.Point(183, 222); - this.numericBox5.Margin = new System.Windows.Forms.Padding(1); - this.numericBox5.Name = "numericBox5"; - this.numericBox5.Padding = new System.Windows.Forms.Padding(1); - this.numericBox5.RadianValue = 0D; - - this.numericBox5.Size = new System.Drawing.Size(61, 21); - this.numericBox5.TabIndex = 0; - // - // numericBox4 - // - this.numericBox4.BackColor = System.Drawing.SystemColors.Control; - this.numericBox4.DecimalPlaces = -1; - this.numericBox4.Enabled = false; - this.numericBox4.Location = new System.Drawing.Point(120, 245); - this.numericBox4.Margin = new System.Windows.Forms.Padding(1); - this.numericBox4.Name = "numericBox4"; - this.numericBox4.Padding = new System.Windows.Forms.Padding(1); - this.numericBox4.RadianValue = 0D; - - this.numericBox4.Size = new System.Drawing.Size(61, 21); - this.numericBox4.TabIndex = 0; - // - // numericBox3 - // - this.numericBox3.BackColor = System.Drawing.SystemColors.Control; - this.numericBox3.DecimalPlaces = -1; - this.numericBox3.Location = new System.Drawing.Point(183, 199); - this.numericBox3.Margin = new System.Windows.Forms.Padding(1); - this.numericBox3.Name = "numericBox3"; - this.numericBox3.Padding = new System.Windows.Forms.Padding(1); - this.numericBox3.RadianValue = 0D; - - this.numericBox3.Size = new System.Drawing.Size(61, 21); - this.numericBox3.TabIndex = 0; - // - // numericBox2 - // - this.numericBox2.BackColor = System.Drawing.SystemColors.Control; - this.numericBox2.DecimalPlaces = -1; - this.numericBox2.Enabled = false; - this.numericBox2.Location = new System.Drawing.Point(120, 222); - this.numericBox2.Margin = new System.Windows.Forms.Padding(1); - this.numericBox2.Name = "numericBox2"; - this.numericBox2.Padding = new System.Windows.Forms.Padding(1); - this.numericBox2.RadianValue = 0D; - - this.numericBox2.Size = new System.Drawing.Size(61, 21); - this.numericBox2.TabIndex = 0; - // - // numericBox1 - // - this.numericBox1.BackColor = System.Drawing.SystemColors.Control; - this.numericBox1.DecimalPlaces = -1; - this.numericBox1.Location = new System.Drawing.Point(120, 199); - this.numericBox1.Margin = new System.Windows.Forms.Padding(1); - this.numericBox1.Name = "numericBox1"; - this.numericBox1.Padding = new System.Windows.Forms.Padding(1); - this.numericBox1.RadianValue = 0D; - - this.numericBox1.Size = new System.Drawing.Size(61, 21); - this.numericBox1.TabIndex = 0; - // - // FormElasticity - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(581, 449); - this.Controls.Add(this.numericBox9); - this.Controls.Add(this.numericBox8); - this.Controls.Add(this.numericBox7); - this.Controls.Add(this.numericBox6); - this.Controls.Add(this.numericBox5); - this.Controls.Add(this.numericBox4); - this.Controls.Add(this.numericBox3); - this.Controls.Add(this.numericBox2); - this.Controls.Add(this.numericBox1); - this.Name = "FormElasticity"; - this.Text = "FormElasticity"; - this.ResumeLayout(false); - - } - - #endregion - - private NumericBox numericBox1; - private NumericBox numericBox2; - private NumericBox numericBox3; - private NumericBox numericBox4; - private NumericBox numericBox5; - private NumericBox numericBox6; - private NumericBox numericBox7; - private NumericBox numericBox8; - private NumericBox numericBox9; - } -} \ No newline at end of file diff --git a/Crystallography.Controls/FormElasticity.cs b/Crystallography.Controls/FormElasticity.cs deleted file mode 100644 index c1e0789..0000000 --- a/Crystallography.Controls/FormElasticity.cs +++ /dev/null @@ -1,12 +0,0 @@ -サソusing System.Windows.Forms; - -namespace Crystallography.Controls -{ - public partial class FormElasticity : Form - { - public FormElasticity() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/Crystallography.Controls/Numeric/NumericBox.cs b/Crystallography.Controls/Numeric/NumericBox.cs index 22c72a9..0d9613e 100644 --- a/Crystallography.Controls/Numeric/NumericBox.cs +++ b/Crystallography.Controls/Numeric/NumericBox.cs @@ -497,13 +497,15 @@ public void Calculate(object sender, EventArgs e) } - static readonly double threshold = 0.0000000001; + /// /// 現在のnumericalValueからテキストボックスの文字列を設定する /// /// internal string GetString() { + var threshold = DecimalPlaces >= 0 ? Math.Pow(10,-decimalPlaces) : 0.0000000001; + if (InvokeRequired) return (string)Invoke(new Func(GetString), null); diff --git a/Crystallography.Controls/Properties/AssemblyInfo.cs b/Crystallography.Controls/Properties/AssemblyInfo.cs index 4bc7f06..3f907e8 100644 --- a/Crystallography.Controls/Properties/AssemblyInfo.cs +++ b/Crystallography.Controls/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // 縺吶∋縺ヲ縺ョ蛟、繧呈欠螳壹☆繧九°縲∽ク九ョ繧医≧縺ォ '*' 繧剃スソ縺」縺ヲ繝薙Ν繝峨♀繧医ウ繝ェ繝薙ず繝ァ繝ウ逡ェ蜿キ繧 // 譌「螳壼、縺ォ縺吶k縺薙→縺後〒縺阪∪縺: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2020.5.24.0544")] -[assembly: AssemblyFileVersion("2020.5.24.0544")] \ No newline at end of file +[assembly: AssemblyVersion("2020.7.28.1404")] +[assembly: AssemblyFileVersion("2020.7.28.1404")] \ No newline at end of file diff --git a/Crystallography.Controls/packages.config b/Crystallography.Controls/packages.config index 472eb67..8ab7aa7 100644 --- a/Crystallography.Controls/packages.config +++ b/Crystallography.Controls/packages.config @@ -2,6 +2,16 @@ - + + + + + + + + + + + \ No newline at end of file diff --git a/Crystallography/AtomCoordination.cs b/Crystallography/AtomCoordination.cs deleted file mode 100644 index bca737f..0000000 --- a/Crystallography/AtomCoordination.cs +++ /dev/null @@ -1,63 +0,0 @@ -サソusing System; -using System.Collections.Generic; - -namespace Crystallography -{ - public class CoordinatedAtom : System.IComparable - { - public string Label = ""; - public double Distance = 0; - public Vector3D Position = new Vector3D(); - - public CoordinatedAtom(string label, Vector3D position, double distance) - { - this.Label = label; - this.Distance = distance; - this.Position = position; - } - - public int CompareTo(object obj) - { - return Distance.CompareTo(((CoordinatedAtom)obj).Distance); - } - } - - public static class AtomCoordination - { - public static List Search(Crystal crystal, Atoms targetAtom, double maxLengthAngstrom) - { - Vector3D pos = (crystal.A_Axis * targetAtom.X + crystal.B_Axis * targetAtom.Y + crystal.C_Axis * targetAtom.Z) * 10.0; - - List atoms = new List(); - //縺セ縺壹髫」繧雁粋縺」縺溷腰菴肴シ蟄舌ョ蜴溷ュ蝉ス咲スョ繧偵☆縺ケ縺ヲ謗「邏「縺励※CoordinatedAtom蝙九ョ繝ェ繧ケ繝医↓蜈ィ驛ィ蜈・繧後k - for (int max = 0; max < 8; max++) - { - bool flag = false; - for (int xShift = -max; xShift <= max; xShift++) - for (int yShift = -max; yShift <= max; yShift++) - for (int zShift = -max; zShift <= max; zShift++) - { - if (Math.Abs(xShift) == max || Math.Abs(yShift) == max || Math.Abs(zShift) == max) - { - foreach (Atoms a in crystal.Atoms) - foreach (var v in a.Atom) - { - Vector3D vTemp = v + new Vector3D(xShift, yShift, zShift, false); - Vector3D tempPos = (crystal.A_Axis * vTemp.X + crystal.B_Axis * vTemp.Y + crystal.C_Axis * vTemp.Z) * 10; - if (maxLengthAngstrom > (tempPos - pos).Length) - { - atoms.Add(new CoordinatedAtom(a.Label, tempPos, (tempPos - pos).Length)); - flag = true;//荳蛟九〒繧りヲ九▽縺代i繧後◆繧臥カ夊。 - } - } - } - } - if (flag == false && max > 2) - break; - } - atoms.Sort(); - - return atoms; - } - } -} \ No newline at end of file diff --git a/Crystallography/Atoms.cs b/Crystallography/Atoms.cs index d3cee35..226ce5e 100644 --- a/Crystallography/Atoms.cs +++ b/Crystallography/Atoms.cs @@ -1,6 +1,8 @@ +using MathNet.Numerics.Integration; using System; using System.Collections.Generic; using System.Drawing; +using System.Linq; using System.Numerics; using System.Xml.Serialization; @@ -13,8 +15,6 @@ namespace Crystallography [Serializable()] public class Atoms : System.IEquatable, ICloneable { - - public object Clone() { Atoms atoms = (Atoms)this.MemberwiseClone(); @@ -59,7 +59,7 @@ public object Clone() //public string str; public int Argb; - + public float Radius = 0.6f; @@ -75,8 +75,8 @@ public object Clone() get => (Ambient, Diffusion, Specular, Shininess, Emission); set { - Ambient = value.Ambient; - Diffusion = value.Diffusion; + Ambient = value.Ambient; + Diffusion = value.Diffusion; Specular = value.Specular; Shininess = value.Shininess; Emission = value.Emission; @@ -92,7 +92,7 @@ public object Clone() /// OpenGLの描画時に有効にするかどうか /// public bool GLEnabled = true; - + #region コンストラクタ public Atoms() @@ -171,7 +171,7 @@ public Atoms(string label, int atomicNumber, int subXray, int subElectron, doubl SubNumberXray = subXray; SubNumberElectron = subElectron; - Isotope = isotope; + Isotope = isotope != null ? isotope : new double[0]; AtomicNumber = atomicNumber; ElementName = AtomicNumber.ToString() + ": " + AtomConstants.AtomicName(atomicNumber); } @@ -192,7 +192,7 @@ public Atoms(string label, int atomicNumber, int subXray, int subElectron, doubl /// public Atoms(string label, int atomicNumber, int subXray, int subElectron, double[] isotope, int symmetrySeriesNumber, Vector3D pos, Vector3D pos_err, double occ, double occ_err, DiffuseScatteringFactor dsf) - :this(label, atomicNumber, subXray, subElectron, isotope, symmetrySeriesNumber, pos, occ, dsf) + : this(label, atomicNumber, subXray, subElectron, isotope, symmetrySeriesNumber, pos, occ, dsf) { X_err = pos_err.X; @@ -219,8 +219,8 @@ public Atoms(string label, int atomicNumber, int subXray, int subElectron, doubl /// public Atoms(string label, int atomicNumber, int subXray, int subElectron, double[] isotope, int symmetrySeriesNumber, Vector3D pos, Vector3D pos_err, double occ, double occ_err, - DiffuseScatteringFactor dsf,Material mat, float radius, bool glEnabled=true, bool showLabel=false) - :this (label,atomicNumber, subXray, subElectron, isotope, symmetrySeriesNumber, pos, pos_err, occ, occ_err, dsf) + DiffuseScatteringFactor dsf, Material mat, float radius, bool glEnabled = true, bool showLabel = false) + : this(label, atomicNumber, subXray, subElectron, isotope, symmetrySeriesNumber, pos, pos_err, occ, occ_err, dsf) { Radius = radius; if (mat != null) @@ -231,7 +231,7 @@ public Atoms(string label, int atomicNumber, int subXray, int subElectron, doubl GLEnabled = glEnabled; ShowLabel = showLabel; - } + } #endregion public void ResetSymmetry(int symmetrySeriesNumber) @@ -243,22 +243,15 @@ public void ResetSymmetry(int symmetrySeriesNumber) SiteSymmetry = temp.SiteSymmetry; Multiplicity = temp.Multiplicity; WyckoffNumber = temp.WyckoffNumber; - - //SubNumberXray = subXray; - //SubNumberElectron = subElectron; - //AtomicNumber = atomicNumber; ElementName = AtomicNumber.ToString() + ": " + AtomConstants.AtomicName(AtomicNumber); - if (Dsf.IsIso == false) - if (Dsf.B11 + Dsf.B12 + Dsf.B31 + Dsf.B22 + Dsf.B23 + Dsf.B33 == 0) - Dsf.IsIso = true; Atom = temp.Atom; } public void ResetVesta() { #region Vestaの色設定 - Texture = Material.DefaultTexture; + Texture = Material.DefaultTexture; switch (AtomicNumber) { case 1: Radius = (float)(0.46 * 0.4); Argb = Color.FromArgb(255, 204, 204).ToArgb(); break; @@ -361,7 +354,7 @@ public void ResetVesta() #endregion } - + /// /// 多重度を保ったまま、原子位置を乱数的的に変化させる。ワイコフ位置も多重度をもとにきまる @@ -449,7 +442,7 @@ public bool AddAtom(double X, double Y, double Z) /// /// S2: (Sin(theta)/ramda)^2 /// - public double GetAtomicScatteringFactorForElectron(double s2) + public double GetAtomicScatteringFactorForElectron(double s2) => AtomConstants.ElectronScattering[AtomicNumber][SubNumberElectron].Factor(s2) * Occ; /// @@ -457,7 +450,7 @@ public double GetAtomicScatteringFactorForElectron(double s2) /// /// /// - public double GetAtomicScatteringFactorForXray(double s2) + public double GetAtomicScatteringFactorForXray(double s2) => AtomConstants.XrayScattering[AtomicNumber][SubNumberXray].Factor(s2) * Occ; public Complex GetAtomicScatteringFactorForNeutron() @@ -1189,106 +1182,190 @@ public void SetCoefficientForElectron(int num) [Serializable()] public class DiffuseScatteringFactor { - public double Biso = 0, B11 = 0, B22 = 0, B33 = 0, B12 = 0, B23 = 0, B31 = 0; - public double Biso_err = 0, B11_err = 0, B22_err = 0, B33_err = 0, B12_err = 0, B23_err = 0, B31_err = 0; + static readonly double PI2 = Math.PI * Math.PI; + public enum Type { U, B } + //Biomolecular Crystallography: Principles, Practice, and Application to Structural Biology + //641ページ - public bool IsIso; - public DiffuseScatteringFactor(bool isIso, double biso, double b11, double b22, double b33, double b12, double b23, double b31) - { - IsIso = isIso; - Biso = biso; - B11 = b11; - B22 = b22; - B33 = b33; - B12 = b12; - B23 = b23; - B31 = b31; - Biso_err = B11_err = B22_err = B33_err = B12_err = B23_err = B31_err = 0; - } + #region B type. Getのみ + public double Biso => OriginalType == Type.B ? Iso : Iso * PI2 * 8; + public double Biso_err => OriginalType == Type.B ? Iso_err : Iso_err * PI2 * 8; - //B のコンストラクタ Bはnm単位 - public DiffuseScatteringFactor(bool isIso, double biso, double b11, double b22, double b33, double b12, double b23, double b31, - double biso_err, double b11_err, double b22_err, double b33_err, double b12_err, double b23_err, double b31_err) - : this(isIso, biso, b11, b22, b33, b12, b23, b31) - { - Biso_err = biso_err; - B11_err = b11_err; - B22_err = b22_err; - B33_err = b33_err; - B12_err = b12_err; - B23_err = b23_err; - B31_err = b31_err; - } + public double B11 => OriginalType == Type.B ? Aniso11 : Aniso11 * coeff11; - public DiffuseScatteringFactor(bool isIso, double uiso, double u11, double u22, double u33, double u12, double u23, double u31, double aStar, double bStar, double cStar) - { - double PI2 = Math.PI * Math.PI; - IsIso = isIso; - Biso = uiso * PI2 * 8; - B11 = u11 * PI2 * 2 * aStar * aStar; - B22 = u22 * PI2 * 2 * bStar * bStar; - B33 = u33 * PI2 * 2 * cStar * cStar; - B12 = u12 * PI2 * 2 * aStar * bStar; - B23 = u23 * PI2 * 2 * bStar * cStar; - B31 = u31 * PI2 * 2 * cStar * aStar; - } + public double B22 => OriginalType == Type.B ? Aniso22 : Aniso22 * coeff22; - public DiffuseScatteringFactor(bool isIso, double uiso, double u11, double u22, double u33, double u12, double u23, double u31, - double uiso_err, double u11_err, double u22_err, double u33_err, double u12_err, double u23_err, double u31_err, double aStar, double bStar, double cStar) - : this(isIso, uiso, u11, u22, u33, u12, u23, u31, aStar, bStar, cStar) - { - double PI2 = Math.PI * Math.PI; - - Biso_err = uiso_err * PI2 * 8; - B11_err = u11_err * PI2 * 2 * aStar * aStar; - B22_err = u22_err * PI2 * 2 * bStar * bStar; - B33_err = u33_err * PI2 * 2 * cStar * cStar; - B12_err = u12_err * PI2 * 2 * aStar * bStar; - B23_err = u23_err * PI2 * 2 * bStar * cStar; - B31_err = u31_err * PI2 * 2 * cStar * aStar; - } + public double B33 => OriginalType == Type.B ? Aniso33 : Aniso33 * coeff33; + + public double B12 => OriginalType == Type.B ? Aniso12 : Aniso12 * coeff12; + + public double B23 => OriginalType == Type.B ? Aniso23 : Aniso23 * coeff23; + + public double B31 => OriginalType == Type.B ? Aniso31 : Aniso31 * coeff31; + + public double B11_err => OriginalType == Type.B ? Aniso11_err : Aniso11_err * coeff11; - //B のコンストラクタ Bはnm単位 - public DiffuseScatteringFactor(bool isIso, float[] biso, float[] baniso) + public double B22_err => OriginalType == Type.B ? Aniso22_err : Aniso22_err * coeff22; + + public double B33_err => OriginalType == Type.B ? Aniso33_err : Aniso33_err * coeff33; + + public double B12_err => OriginalType == Type.B ? Aniso12_err : Aniso12_err * coeff12; + + public double B23_err => OriginalType == Type.B ? Aniso23_err : Aniso23_err * coeff23; + + public double B31_err => OriginalType == Type.B ? Aniso31_err : Aniso31_err * coeff31; + + #endregion + + #region U type. Getのみ + public double Uiso => OriginalType == Type.U ? Iso : Iso / PI2 / 8; + public double Uiso_err => OriginalType == Type.U ? Iso_err : Iso_err / PI2 / 8; + public double U11 => OriginalType == Type.U ? Aniso11 : Aniso11 / coeff11; + public double U22 => OriginalType == Type.U ? Aniso22 : Aniso22 / coeff22; + public double U33 => OriginalType == Type.U ? Aniso33 : Aniso33 / coeff33; + public double U12 => OriginalType == Type.U ? Aniso12 : Aniso12 / coeff12; + public double U23 => OriginalType == Type.U ? Aniso23 : Aniso23 / coeff23; + public double U31 => OriginalType == Type.U ? Aniso31 : Aniso31 / coeff31; + public double U11_err => OriginalType == Type.U ? Aniso11_err : Aniso11_err / coeff11; + public double U22_err => OriginalType == Type.U ? Aniso22_err : Aniso22_err / coeff22; + public double U33_err => OriginalType == Type.U ? Aniso33_err : Aniso33_err / coeff33; + public double U12_err => OriginalType == Type.U ? Aniso12_err : Aniso12_err / coeff12; + public double U23_err => OriginalType == Type.U ? Aniso23_err : Aniso23_err / coeff23; + public double U31_err => OriginalType == Type.U ? Aniso31_err : Aniso31_err / coeff31; + #endregion + + + #region オリジナルの値 + /// + /// 単位は nm^2 + /// + public double Iso { get; set; } + /// + /// 単位は nm^2 + /// + public double Iso_err { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso11 { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso22 { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso33 { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso12 { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso23 { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso31 { get; set; } + + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso11_err { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso22_err { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso33_err { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso12_err { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso23_err { get; set; } + /// + /// 単位は Uの場合 nm^2, Bの場合 無次元 + /// + public double Aniso31_err { get; set; } + + #endregion + + public bool UseIso { get; set; } + public Type OriginalType { get; set; } = Type.B; + + public (double A, double B, double C, double Alpha, double Beta, double Gamma) Cell { - IsIso = isIso; - if (biso != null) - { - Biso = biso[0]; - if (biso.Length == 2) - Biso_err = biso[1]; - } - if (baniso != null) + get => cell; + set { - B11 = baniso[0]; - B22 = baniso[1]; - B33 = baniso[2]; - B12 = baniso[3]; - B23 = baniso[4]; - B31 = baniso[5]; - if (baniso.Length == 12) - { - B11_err = baniso[6]; - B22_err = baniso[7]; - B33_err = baniso[8]; - B12_err = baniso[9]; - B23_err = baniso[10]; - B31_err = baniso[11]; - } + cell = value; + var cosAlpha = Math.Cos(cell.Alpha); + var sinAlpha = Math.Sin(cell.Alpha); + var cosBeta = Math.Cos(cell.Beta); + var sinBeta = Math.Sin(cell.Beta); + var cosGamma = Math.Cos(cell.Gamma); + var sinGamma = Math.Sin(cell.Gamma); + var v = cell.A * cell.B * cell.C * Math.Sqrt(1 - cosAlpha * cosAlpha - cosBeta * cosBeta - cosGamma * cosGamma + 2 * cosAlpha * cosBeta * cosGamma); + var aStar = cell.B * cell.C * sinAlpha / v; + var bStar = cell.C * cell.A * sinBeta / v; + var cStar = cell.A * cell.B * sinGamma / v; + var cosAlphaStar = (cosBeta * cosGamma - cosAlpha) / sinBeta / sinGamma; + var cosBetaStar = (cosGamma * cosAlpha - cosBeta) / sinGamma / sinAlpha; + var cosGammaStar = (cosAlpha * cosBeta - cosGamma) / sinAlpha / sinBeta; + coeff11 = PI2 * 2 * aStar * aStar; + coeff22 = PI2 * 2 * bStar * bStar; + coeff33 = PI2 * 2 * cStar * cStar; + coeff12 = PI2 * 2 * aStar * bStar * cosGammaStar; + coeff23 = PI2 * 2 * bStar * cStar * cosAlphaStar; + coeff31 = PI2 * 2 * cStar * aStar * cosBetaStar; } } + private (double A, double B, double C, double Alpha, double Beta, double Gamma) cell = (0, 0, 0, 0, 0, 0); + + private double coeff11, coeff22, coeff33, coeff12, coeff23, coeff31; public DiffuseScatteringFactor() { - IsIso = true; - Biso = 0; - B11 = 0; - B22 = 0; - B33 = 0; - B12 = 0; - B23 = 0; - B31 = 0; + } + + /// + /// コンストラクタ. B##は無次元, 他はnm^2. Cellの 単位は nm & radians. + /// + /// + /// + /// + /// + /// + /// + /// + public DiffuseScatteringFactor(Type t, bool useIso, double iso, double iso_err, double[] aniso, double[] aniso_err, + (double A, double B, double C, double Alpha, double Beta, double Gamma) cell) + { + OriginalType = t; + UseIso = useIso; + Iso = iso; + Iso_err = iso_err; + Aniso11 = aniso[0]; + Aniso22 = aniso[1]; + Aniso33 = aniso[2]; + Aniso12 = aniso[3]; + Aniso23 = aniso[4]; + Aniso31 = aniso[5]; + Aniso11_err = aniso_err[0]; + Aniso22_err = aniso_err[1]; + Aniso33_err = aniso_err[2]; + Aniso12_err = aniso_err[3]; + Aniso23_err = aniso_err[4]; + Aniso31_err = aniso_err[5]; + + Cell = cell; } } } \ No newline at end of file diff --git a/Crystallography/BetheMethod.cs b/Crystallography/BetheMethod.cs index 41b27bf..ccf4604 100644 --- a/Crystallography/BetheMethod.cs +++ b/Crystallography/BetheMethod.cs @@ -12,8 +12,6 @@ using DMat = MathNet.Numerics.LinearAlgebra.Complex.DenseMatrix; using DVec = MathNet.Numerics.LinearAlgebra.Complex.DenseVector; using static System.Numerics.Complex; -using V2 = OpenTK.Vector2d; - namespace Crystallography { @@ -23,12 +21,19 @@ namespace Crystallography [Serializable] public class BetheMethod { + #region static readonly field + private static readonly Complex One = Complex.One; private static readonly double TwoPi = 2 * Math.PI; private static readonly Complex TwoPiI = TwoPi * ImaginaryOne; private static readonly Complex PiI = Math.PI * ImaginaryOne; private static readonly double PiSq = Math.PI * Math.PI; private static readonly Vector3DBase zNorm = new Vector3DBase(0, 0, 1); + + #endregion + + #region 繝輔ぅ繝シ繝ォ繝峨√励Ο繝代ユ繧」 + private double AccVoltage { get; set; } private Crystal Crystal { get; set; } = null; private Matrix3D BaseRotation { get; set; } = null; @@ -39,7 +44,6 @@ public class BetheMethod public int RotationArrayValidLength { get; set; } = 0; - public readonly bool EigenEnabled = true; /// @@ -61,10 +65,9 @@ public enum Solver { Managed, MKL, Eigen, OpenCV, Auto } [NonSerialized] public Beam[][] BeamsPED; - public double SemianglePED { get; set; } - public bool IsBusy => bwCBED == null ? true : bwCBED.IsBusy; + public bool IsBusy => bwCBED == null || bwCBED.IsBusy; /// /// Disks[Z_index][G_index] @@ -83,6 +86,9 @@ public enum Solver { Managed, MKL, Eigen, OpenCV, Auto } private readonly object lockObj = new object(); + #endregion + + #region 繧ウ繝ウ繧ケ繝医Λ繧ッ繧ソ public BetheMethod(Crystal crystal) { Crystal = crystal; @@ -97,32 +103,10 @@ public BetheMethod(Crystal crystal) bwCBED.DoWork += cbed_DoWork; EigenEnabled = NativeWrapper.Enabled; - - //var b = MathNet.Numerics.LinearAlgebra.Complex.DenseMatrix.Build.Random(1000, 1000); - - //var evd = b.Evd(Symmetricity.Asymmetric); - - /*MathNet.Numerics.Providers.FourierTransform.FourierTransformControl.TryUseNativeMKL(); - int size = 4096; - for (int n = 0; n < 10; n++) - { - var real = MathNet.Numerics.Random.CryptoRandomSource.Doubles(size * size); - var imag = MathNet.Numerics.Random.CryptoRandomSource.Doubles(size * size); - - Complex[] input = new Complex[size * size]; - for (int i = 0; i < input.Length; i++) - input[i] = new Complex(real[i], imag[i]); - MathNet.Numerics.IntegralTransforms.Fourier.Forward2D(input, size, size); - }*/ - - - - //InputArray.Create(, MatType.) - //InputArray.Create(); - - } + #endregion + #region CBED private void Cbed_ProgressChanged(object sender, ProgressChangedEventArgs e) => CbedProgressChanged?.Invoke(sender, e); private void Cbed_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) => CbedCompleted?.Invoke(sender, e); @@ -230,7 +214,7 @@ long func (Solver solver, int thread, bool speedTest = true) return (evd.EigenVectors * gammmaAlpha).ToArray(); }).ToArray(); } - bwCBED.ReportProgress(0, new Report(Interlocked.Increment(ref count), reportString));//騾イ謐礼憾豕√r蝣ア蜻 + bwCBED.ReportProgress(Interlocked.Increment(ref count), reportString);//騾イ謐礼憾豕√r蝣ア蜻 return result; }).ToArray(); @@ -284,15 +268,9 @@ long func (Solver solver, int thread, bool speedTest = true) e.Cancel = true; } - public struct Report - { - public int Current { get; set; } - public string Solver { get; set; } - public Report(int current, string solver) - { Current = current; Solver = solver; } - } - + #endregion + #region 蟷ウ陦後ン繝シ繝髮サ蟄仙屓謚 /// /// 蟷ウ陦後ン繝シ繝縺ョ髮サ蟄仙屓謚倩ィ育ョ @@ -305,7 +283,7 @@ public Report(int current, string solver) public Beam[] GetDifractedBeamAmpriltudes(int maxNumOfBloch, double voltage, Matrix3D rotation, double thickness) { var useEigen = !MathNet.Numerics.Control.TryUseNativeMKL(); - + if (AccVoltage != voltage) uDictionary = new Dictionary(); @@ -352,7 +330,7 @@ public Beam[] GetDifractedBeamAmpriltudes(int maxNumOfBloch, double voltage, Mat var gamma_alpha = new DVec(Enumerable.Range(0, len).Select(n => Exp(TwoPiI * EigenValues[n] * thickness) * alpha[n]).ToArray()); //蜃コ蟆髱「縺ァ縺ョ蠅逡梧擅莉カ繧定諷ョ縺励◆菴咲嶌縺ォ縺吶k縺溘a縲∽サ・荳九ョ1陦後r霑ス蜉 (20190827) - var p = new DiagonalMatrix(len, len, Beams.Select(b => Exp(PiI * (b.P - 2 * k_vac * Surface.Z) * thickness)).ToArray()); + var p = new DiagonalMatrix(len, len, Beams.Select(b => Exp(PiI * (b.P - 2 * k_vac * Surface.Z) * thickness)).ToArray()); //var p = new DiagonalMatrix(len, len, Beams.Select(b => new Complex(1, 0)).ToArray()); //豺ア縺瓢縺ォ縺翫¢繧均医r豎ゅa繧 @@ -364,6 +342,7 @@ public Beam[] GetDifractedBeamAmpriltudes(int maxNumOfBloch, double voltage, Mat return Beams; } + #endregion #region Image Simulation public double[][] GetPotentialImage(Beam[] beams, Size size, double res, bool phase = true) @@ -511,6 +490,7 @@ public double[][] GetHRTEMImage(Beam[] beams, Size size, double res, double cs, } #endregion Image Simulation + #region Precession electron diffraction /// /// PED縺ョ險育ョ @@ -586,7 +566,7 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage { if (EigenValuesPED[k] != null) { - int len = EigenValuesPED[k].Count(); + var len = EigenValuesPED[k].Count(); var psi0 = DVec.OfArray(new Complex[len]);//蜈・蟆髱「縺ァ縺ョ豕「蜍暮未謨ー繧貞ョ夂セゥ psi0[0] = 1; var alpha = EigenVectorsInversePED[k] * psi0;//繧「繝ォ繝輔ぃ繝吶け繝医Ν繧呈アゅa繧 @@ -612,17 +592,16 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage else compiled[beam.Index].intensity += beam.Psi.Magnitude2() / step; } - + //蝓コ貅悶ョ譁ケ菴阪〒P,Q,S縺ェ縺ゥ繧貞阪そ繝繝 var mat = BaseRotation * Crystal.MatrixInverse.Transpose(); var beams = compiled.Values.ToList(); - for (int i=0; i< beams.Count; i++) + for (int i = 0; i < beams.Count; i++) { var g = mat * beams[i].Index; var (Q, P) = getQP(g, kvac, u0); var psi = new Complex(Math.Sqrt(beams[i].intensity), 0); - beams[i] = new Beam(beams[i].Index, g, (beams[i].Freal, beams[i].Fimag), (Q,P)); - beams[i].Psi = psi; + beams[i] = new Beam(beams[i].Index, g, (beams[i].Freal, beams[i].Fimag), (Q, P)) { Psi = psi }; } //荳ヲ縺ウ譖ソ縺 @@ -635,7 +614,9 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage return Beams; } + #endregion + #region 讒矩蝗蟄 F /// /// 讒矩蝗蟄舌r豎ゅa繧. s2縺ョ蜊倅ス阪ッ nm^-2 /// @@ -652,11 +633,11 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage //var real = AtomConstants.ElectronScatteringEightGaussian[atoms.AtomicNumber].Factor(s2 * 0.01) * 0.1;//Factor縺ョ遲斐∴縺ッA縺ェ縺ョ縺ァ, 0.1蛟阪@縺ヲnm縺ォ螟画鋤 var real = AtomConstants.ElectronScattering[atoms.AtomicNumber][atoms.SubNumberElectron].Factor(s2 * 0.01) * 0.1;//Factor縺ョ遲斐∴縺ッA縺ェ縺ョ縺ァ, 0.1蛟阪@縺ヲnm縺ォ螟画鋤 // 遲画婿謨」荵ア蝗蟄舌ョ譎 縺ゅk縺縺ッ髱樒ュ画婿縺ァg=0縺ョ譎 - if (atoms.Dsf.IsIso || (index == (0, 0, 0))) + if (atoms.Dsf.UseIso || (index == (0, 0, 0))) { var m = atoms.Dsf.Biso; var t = Math.Exp(-m * s2 * 0.01); - if (!atoms.Dsf.IsIso && index == (0, 0, 0))// 髱樒ュ画婿縺ァg = 0縺ョ譎 Acta Cryst. (1959). 12, 609 , Hamilton 縺ョ蠑上↓蠕薙▲縺ヲ縲。iso繧定ィ育ョ + if (!atoms.Dsf.UseIso && index == (0, 0, 0))// 髱樒ュ画婿縺ァg = 0縺ョ譎 Acta Cryst. (1959). 12, 609 , Hamilton 縺ョ蠑上↓蠕薙▲縺ヲ縲。iso繧定ィ育ョ { double a = Crystal.A, b = Crystal.B, c = Crystal.C; m = (atoms.Dsf.B11 * a * a + atoms.Dsf.B22 * b * b + atoms.Dsf.B33 * c * c + 2 * atoms.Dsf.B12 * a * b + 2 * atoms.Dsf.B23 * b * c + 2 * atoms.Dsf.B31 * c * a) * 4.0 / 3.0; @@ -687,9 +668,9 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage } return (fReal, fImag); } + #endregion - - + #region 繝昴ユ繝ウ繧キ繝」繝ォ U /// /// 繝昴ユ繝ウ繧キ繝」繝ォ繧呈アゅa繧. s2縺ョ蜊倅ス阪ッ nm^-2 /// @@ -719,7 +700,9 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage private (Complex Real, Complex Imag) getU((int H, int K, int L) index, double s2) => getU(AccVoltage, index, s2); private Dictionary uDictionary = new Dictionary(); + #endregion + #region 繝昴ユ繝ウ繧キ繝」繝ォ縺ョ繝槭ヨ繝ェ繝繧ッ繧ケ /// /// 繝昴ユ繝ウ繧キ繝」繝ォ繝槭ヨ繝ェ繝繧ッ繧ケ繧呈アゅa繧. k0縺ョ蜊倅ス阪ッnm^-1. /// @@ -737,8 +720,9 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage } return potentialMatrix; } + #endregion - + #region 蝗コ譛牙、蝠城。悟ッセ雎。縺ョ繝槭ヨ繝ェ繝繧ッ繧ケ /// /// 蝗コ譛牙、蝠城。後槭ヨ繝ェ繝繧ッ繧ケ繧呈アゅa繧. k0縺ョ蜊倅ス阪ッnm^-1 /// @@ -746,7 +730,7 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage /// private Complex[,] getEigenProblemMatrix(Beam[] b, Complex[,] potentialMatrix = null) { - if (potentialMatrix == null|| potentialMatrix.GetLength(0)!=b.Length) + if (potentialMatrix == null || potentialMatrix.GetLength(0) != b.Length) potentialMatrix = getPotentialMatrix(b); //A陦悟励r豎コ螳 @@ -755,13 +739,15 @@ public Beam[] GetPrecessionElectronDiffraction(int maxNumOfBloch, double voltage { for (int j = 0; j < b.Length; j++) eigenProblemMatrix[i, j] = potentialMatrix[i, j] / b[i].P; - + eigenProblemMatrix[i, i] += b[i].Q / b[i].P; } return eigenProblemMatrix; } + #endregion + #region 蛟呵」懊→縺ェ繧吉 vectors縺ョ讀懃エ「 /// /// 蛟呵」懊→縺ェ繧吉Vector繧呈、懃エ「縺吶k. /// @@ -880,6 +866,9 @@ public Beam[] Find_gVectors(Matrix3D baseRotation, Vector3DBase vecK0, int maxNu return beams.ToArray(); } + #endregion + + #region 邨槭j縺ョ蜀驛ィ縺ォ縺ゅk繝薙シ繝縺ョ縺ソ驕ク縺ウ蜿悶k (HRTEM 繧キ繝溘Η繝ャ繝シ繧ソ縺九i蜻シ縺ー繧後k) public Beam[] ExtractInsideBeams(Beam[] beams, double acc, double radius, double shiftX, double shiftY) { if (double.IsInfinity(radius)) @@ -892,6 +881,9 @@ public Beam[] ExtractInsideBeams(Beam[] beams, double acc, double radius, double return beams.Where(b => (b.Vec.ToPointD() - center).Length2 < r * r).ToArray(); } } + #endregion + + #region P, Q 縺ョ繝ェ繧サ繝繝医d繧イ繝繝 /// /// 蠑墓焚縺ョBeams縺ィrotation繧偵b縺ィ縺ォ縲 ̄縺ィQ縺縺代そ繝繝医@縺ヲ霑斐☆縲ゅ⊇縺九ョ繝代Λ繝。繝シ繧ソ縺ッ謾セ鄂ョ. CBED縺ョ譎ゅ↓縺ソ蜻シ縺ー繧後k縲 @@ -913,12 +905,14 @@ private Beam[] reset_gVectors(Beam[] beams, Matrix3D baseRotation, Vector3DBase } private (double Q, double P) getQP(Vector3DBase g, Vector3DBase vecK0) - => (vecK0.Length2 - (vecK0 + g).Length2, 2 * Surface * (vecK0 + g)); + => (vecK0.Length2 - (vecK0 + g).Length2, 2 * Surface * (vecK0 + g)); private (double Q, double P) getQP(Vector3DBase g, double kvac, double u0, Matrix3D beamRotation = null) => getQP(g, getVecK0(kvac, u0, beamRotation)); + #endregion + #region K0繝吶け繝医Ν繧呈アゅa繧 /// /// K0繝吶け繝医Ν繧呈アゅa繧九K0繝吶け繝医Ν縺ッ縲々Y譁ケ蜷代r菫晏ュ倥@縺溘∪縺セZ譁ケ蜷代ョ縺ソ螟牙喧縺吶k縲 /// @@ -938,8 +932,10 @@ private Vector3DBase getVecK0(double kvac, double u0, Matrix3D beamRotation = nu return vecKvac + x * Surface; } + #endregion + + #region Beam繧ッ繝ゥ繧ケ - public class Beam { /// @@ -1015,9 +1011,9 @@ public Beam((int H, int K, int L) index, Vector3DBase vec, (Complex Real, Comple Fimag = f.Imag; Q = prms.Q; P = prms.P; - Rating = Math.Sqrt(Vec.Length2)* Math.Abs(Q) * Math.Abs(Q); + Rating = Math.Sqrt(Vec.Length2) * Math.Abs(Q) * Math.Abs(Q); } - + public Beam(double q, double p) { @@ -1040,6 +1036,9 @@ public Vector3D ConvertToVector3D() } } + #endregion + + #region CBED_Disk繧ッ繝ゥ繧ケ public class CBED_Disk { /// @@ -1068,6 +1067,8 @@ public CBED_Disk(int[] hkl, Vector3DBase vec, double thickness, double[] intensi Thickness = thickness; Intensity = intensity; } - } + } + #endregion + } } \ No newline at end of file diff --git a/Crystallography/BondsAndPolyhedra.cs b/Crystallography/BondsAndPolyhedra.cs index 8239843..6ddfbfd 100644 --- a/Crystallography/BondsAndPolyhedra.cs +++ b/Crystallography/BondsAndPolyhedra.cs @@ -183,7 +183,6 @@ public static Bonds[] GetVestaBonds(IEnumerable elementNames) } - static Bonds() { var anionNum = new List { 8, 9, 16, 17, 34, 35, 52, 53 }; diff --git a/Crystallography/ConvertCrystalData.cs b/Crystallography/ConvertCrystalData.cs index 0a04750..6110f36 100644 --- a/Crystallography/ConvertCrystalData.cs +++ b/Crystallography/ConvertCrystalData.cs @@ -5,9 +5,6 @@ using System.Linq; using System.IO; using System.Linq.Expressions; -using System.Linq.Dynamic; -using MathNet.Numerics.LinearAlgebra.Complex; -using OpenTK; using System.Linq.Dynamic.Core; using V3 = OpenTK.Vector3d; @@ -15,12 +12,14 @@ namespace Crystallography { public class ConvertCrystalData { + + #region CrystalList(xml形式)の読み込み/書き込み public static bool SaveCrystalListXml(Crystal[] crystals, string filename) { try { - System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(Crystal[])); - System.IO.FileStream fs = new System.IO.FileStream(filename, System.IO.FileMode.Create); + var serializer = new System.Xml.Serialization.XmlSerializer(typeof(Crystal[])); + var fs = new FileStream(filename, FileMode.Create); serializer.Serialize(fs, crystals); fs.Close(); return true; @@ -28,15 +27,16 @@ public static bool SaveCrystalListXml(Crystal[] crystals, string filename) catch { return false; } } + //CrystalListを読み込むとき public static Crystal[] ConvertToCrystalList(string filename) - { - Crystal[] cry = new Crystal[0]; - if (filename.ToLower().EndsWith("xml"))//XML形式のリストを読み込んだとき - { - #region old code - //プロパティ文字列が変更にたいする対処 - /* try + { + Crystal[] cry = new Crystal[0]; + if (filename.ToLower().EndsWith("xml"))//XML形式のリストを読み込んだとき + { + #region old code + //プロパティ文字列が変更にたいする対処 + /* try { StreamReader reader = new StreamReader(filename, Encoding.GetEncoding("Shift_JIS")); List strList = new List(); @@ -78,10 +78,10 @@ public static Crystal[] ConvertToCrystalList(string filename) writer.Close(); } catch { return null; };*/ - //プロパティ文字列が変更にたいする対処 ここまで - #endregion old code - try - { + //プロパティ文字列が変更にたいする対処 ここまで + #endregion old code + try + { using var fs = new FileStream(filename, FileMode.Open); System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(Crystal[])); cry = (Crystal[])serializer.Deserialize(fs); @@ -99,36 +99,37 @@ public static Crystal[] ConvertToCrystalList(string filename) } #endregion } - catch { } - } - else if (filename.EndsWith("out"))//SMAP形式を読み込んだとき - { - var stringList = new List(); - string strTemp; - var reader = new System.IO.StreamReader(filename); - while ((strTemp = reader.ReadLine()) != null) - stringList.Add(strTemp); - reader.Close(); - cry = ConvertFromSMAP(stringList.ToArray()); - } - - for (int i = 0; i < cry.Length; i++) - { - cry[i].Reset(); - cry[i].SaveInitialCellConstants(); - } - - return cry; - } - - #region SMAPの出力ファイル(*.out)読込 - - /// - /// SMAPのoutファイル読み込み - /// - /// - /// - public static Crystal[] ConvertFromSMAP(string[] str) + catch { } + } + else if (filename.EndsWith("out"))//SMAP形式を読み込んだとき + { + var stringList = new List(); + string strTemp; + var reader = new StreamReader(filename); + while ((strTemp = reader.ReadLine()) != null) + stringList.Add(strTemp); + reader.Close(); + cry = ConvertFromSMAP(stringList.ToArray()); + } + + for (int i = 0; i < cry.Length; i++) + { + cry[i].Reset(); + cry[i].SaveInitialCellConstants(); + } + + return cry; + } + #endregion + + #region SMAPの出力ファイル(*.out)読込 + + /// + /// SMAPのoutファイル読み込み + /// + /// + /// + public static Crystal[] ConvertFromSMAP(string[] str) { string wavelength = ""; string ChemicalFormula = ""; @@ -212,7 +213,7 @@ public static Crystal[] ConvertFromSMAP(string[] str) tempCrystal.AddAtoms(label, atomicNumber, 0, 0, null, x, y, z, 1, new DiffuseScatteringFactor(), true); } - SetOpenGL_property(tempCrystal); + //SetOpenGL_property(tempCrystal); cry.Add(tempCrystal); } } @@ -237,80 +238,87 @@ public static double ZeroToOne(double x) #endregion SMAPの出力ファイル(*.out)読込 + #region AMCとCIFの読み込みインターフェース ConvertCrystal(filename) + public static Crystal2 ConvertToCrystal2(string fileName) { - var c = ConvertToCrystal(fileName); - - if (c != null) + try { - var c2 = c.ToCrystal2(); - c2.fileName = Path.GetFileNameWithoutExtension(fileName); - return c2; + Crystal2 c2 = null; + if (fileName.EndsWith("amc")) + c2 = ConvertFromAmc(fileName); + else if (fileName.EndsWith("cif")) + c2 = ConvertFromCIF(fileName); + + if (c2 != null) + { + c2.fileName = Path.GetFileNameWithoutExtension(fileName); + return c2; + } + else + return null; } - else + catch (Exception e) + { + #if DEBUG + System.Windows.Forms.MessageBox.Show(fileName +" " + e.Message); + #endif return null; + } } public static Crystal ConvertToCrystal(string fileName) { - List stringList = new List(); - string strTemp; - using (var reader = new System.IO.StreamReader(fileName)) + try { - Crystal crystal = null; - try - { - if (fileName.EndsWith("amc")) - { - while ((strTemp = reader.ReadLine()) != null) - if (strTemp != "") - stringList.Add(strTemp); - crystal = ConvertFromAmc(stringList.ToArray()); - } - else if (fileName.EndsWith("cif")) - { - while ((strTemp = reader.ReadLine()) != null) - stringList.Add(strTemp); - crystal = ConvertFromCIF(stringList.ToArray()); - } - return crystal; - } - catch (Exception e) - { - #if DEBUG - System.Windows.Forms.MessageBox.Show(e.Message); - #endif - - + if (fileName.EndsWith("amc")) + return ConvertFromAmc(fileName).ToCrystal(); + else if (fileName.EndsWith("cif")) + return ConvertFromCIF(fileName).ToCrystal(); + else return null; - } } - } + catch (Exception e) + { + #if DEBUG + System.Windows.Forms.MessageBox.Show(e.Message); + #endif + return null; + } + + } + #endregion + + #region amcファイルの読み込み + + private static Crystal2 ConvertFromAmc(string fileName) + { + using var reader = new StreamReader(fileName); + var stringList = new List(); + string strTemp; + while ((strTemp = reader.ReadLine()) != null) + if (strTemp != "") + stringList.Add(strTemp); + return ConvertFromAmc(stringList.ToArray()); + } -#region amcファイルの読み込み /// /// amcファイルの読み込み /// /// /// - private static Crystal ConvertFromAmc(string[] str) + private static Crystal2 ConvertFromAmc(string[] str) { - int n = 0; - - string Name; - string AuthorName, Reference, Title; - double xShift, yShift, zShift; - xShift = yShift = zShift = 0; - Crystal crystal; + var n = 0; if (str[n] == "") n++; - Name = str[n];//結晶の名前 + var Name = str[n];//結晶の名前 n++; if (str.Length <= n) return null; - AuthorName = str[n];//著者の名前 + var AuthorName = str[n];//著者の名前 n++; if (str.Length <= n) return null; while (str[n][str[n].Length - 1] < '.' || str[n][str[n].Length - 1] > '9') { @@ -318,145 +326,143 @@ private static Crystal ConvertFromAmc(string[] str) n++; if (str.Length <= n) return null; } - Reference = str[n];//引用文献 + var Reference = str[n];//引用文献 n++; if (str.Length <= n) return null; - Title = str[n];//文献タイトル + var Title = str[n];//文献タイトル n++; if (str.Length <= n) return null; //ここで格子定数、対称性とタイトル + Crystal2 crystal; while ((crystal = CellParamForAmc(str[n])) == null) { - if (str[n].Length > 0 && Char.IsLower(str[n][0])) + if (str[n].Length > 0 && char.IsLower(str[n][0])) Title += " " + str[n]; else Title += "\r\n" + str[n]; n++; - //if (str.Length <= n) - // return null; + if (str.Length <= n) return null; } + if (Title.Contains("_cod_database_code")) Title = Title.Replace("_cod_database_code", "\r\n_cod_database_code"); else if (Title.Contains("_database_code_amcsd")) Title = Title.Replace("_database_code_amcsd", "\r\n_database_code_amcsd"); + + n++; if (str.Length <= n) return null; - if (!str[n].StartsWith("atom") && str[n].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Length == 3) + double xShift = 0, yShift = 0, zShift = 0; + if (!str[n].StartsWith("atom") && str[n].Split(" ").Length == 3) { - xShift = ConvertToDouble(str[n].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0]); - yShift = ConvertToDouble(str[n].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[1]); - zShift = ConvertToDouble(str[n].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2]); + xShift = ConvertToDouble(str[n].Split(" ")[0]); + yShift = ConvertToDouble(str[n].Split(" ")[1]); + zShift = ConvertToDouble(str[n].Split(" ")[2]); n++; if (str.Length <= n) return null; } //ここから原子座標の読み取り - bool IsOcc = false; - bool IsisoUsed = false; - bool IsanisoUsed = false; - bool IsUtypeUsed = false; - if (str[n].IndexOf("occ") > 0) + bool IsOcc = false, IsisoUsed = false, IsanisoUsed = false, IsUtypeUsed = false; + if (str[n].Contains("occ")) IsOcc = true; - if (str[n].IndexOf("Uiso") > 0 || str[n].IndexOf("uiso") > 0) + + + if (str[n].Contains("Uiso") || str[n].Contains("uiso")) { IsisoUsed = true; IsUtypeUsed = true; } - else if (str[n].IndexOf("Biso") > 0 || str[n].IndexOf("biso") > 0) + else if (str[n].Contains("Biso") || str[n].Contains("biso")) { IsisoUsed = true; IsUtypeUsed = false; } - if (str[n].IndexOf("U(1,1)") > 0 || str[n].IndexOf("u(1,1)") > 0) + if (str[n].Contains("U(1,1)") || str[n].Contains("u(1,1)")) { IsanisoUsed = true; IsUtypeUsed = true; } - else if (str[n].IndexOf("B(1,1)") > 0 || str[n].IndexOf("b(1,1)") > 0) + else if (str[n].Contains("B(1,1)") || str[n].Contains("b(1,1)")) { IsanisoUsed = true; IsUtypeUsed = false; } - string[] tempStr = str[n].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - int[] l = new int[tempStr.Length]; + var tempStr = str[n].Split(" "); + var l = new int[tempStr.Length + 1]; + l[0] = 0; - for (int i = 0; i < l.Length; i++)//各入力値の文字位置を決める。 - l[i] = str[n].IndexOf(tempStr[i]) + tempStr[i].Length; + for (int i = 0; i < tempStr.Length; i++)//各入力値の文字位置を決める。 + l[i + 1] = str[n].IndexOf(tempStr[i]) + tempStr[i].Length; for (int i = n + 1; i < str.Length; i++)//最初のatomラベルだけ例外があるようなのでそれに対処 - if (l[0] < str[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0].Length) - l[0] = str[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0].Length; - - crystal.SetAxis(); - double aStar = 1 / crystal.A; - double bStar = 1 / crystal.B; - double cStar = 1 / crystal.C; + if (l[1] < str[i].Split(" ")[0].Length) + l[1] = str[i].Split(" ")[0].Length; //三方あるいは六方 - bool isHex = crystal.Symmetry.SeriesNumber >= 430 && crystal.Symmetry.SeriesNumber <= 488; + bool isHex = crystal.sym >= 430 && crystal.sym <= 488; + var atoms = new List(); for (int i = n + 1; i < str.Length; i++) {//原子座標読み取りループ開始 str[i] = str[i].PadRight(str[n].Length, ' '); - double x, y, z, occ; + + var item = str[i].Split(" "); + if (item.Length != l.Length - 1) + { + item = new string[l.Length - 1]; + for (int k = 0; k < item.Length; k++) + { + item[k] = str[i].Substring(l[k], l[k + 1] - l[k]).Trim().TrimEnd(); + item[k] = item[k].Replace(',', '.');//たまにカンマとピリオドが間違えられている + if (item[k].Length > 3 && item[k][1] == ' ') + { + //二文字目がスペースの場合は、数字がずれている可能性が考えられる。(.123 .456 => ".12", "3 .456" )  + //この場合は、二文字目までを削除して対応する + item[k] = item[k].Substring(2, item[k].Length - 2); + } + } + } int j = 0; - double Xiso, X11, X22, X33, X12, X13, X23; - string label; + var label = item[j++]; + var x = item[j++]; + var y = item[j++]; + var z = item[j++]; - label = str[i].Substring(0, l[j]); - j++; + if (xShift != 0 || yShift != 0 || zShift != 0) + { + x = (x.ToDouble() + xShift).ToString("f8").TrimEnd(new[] { '0' }); + y = (y.ToDouble() + yShift).ToString("f8").TrimEnd(new[] { '0' }); + z = (z.ToDouble() + zShift).ToString("f8").TrimEnd(new[] { '0' }); + } - x = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1]), isHex) + xShift; j++; - y = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1]), isHex) + yShift; j++; - z = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1]), isHex) + zShift; j++; + var occ = "1"; if (IsOcc) { - occ = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1])); - j++; - if (occ == 0) occ = 1; + occ = item[j++]; + if (occ == "") occ = "1"; } - else - occ = 1; + var iso = ""; if (IsisoUsed) - { - Xiso = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1])); j++; - } - else - Xiso = 0; + iso = item[j++]; + var aniso = new string[6]; if (IsanisoUsed) - { - X11 = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1])); j++; - X22 = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1])); j++; - X33 = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1])); j++; - X12 = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1])); j++; - X13 = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1])); j++; - X23 = ConvertToDouble(str[i].Substring(l[j - 1], l[j] - l[j - 1])); j++; - } - else - X11 = X22 = X33 = X12 = X13 = X23 = 0; - - DiffuseScatteringFactor dsf; - if (IsUtypeUsed) - dsf = new DiffuseScatteringFactor(!IsanisoUsed, Xiso, X11, X22, X33, X12, X13, X23, aStar, bStar, cStar); + for (int k = 0; k < 6; k++) + aniso[k] = item[j++]; else - dsf = new DiffuseScatteringFactor(!IsanisoUsed, Xiso, X11, X22, X33, X12, X13, X23); + aniso = null; //ラベル名から元素を決める - string temp; - int atomicNumber = 0; - //AtomicScatteringFactor asf= new AtomicScatteringFactor(); - + var atomicNumber = 0; for (int q = label.Length; q > 0 && atomicNumber == 0; q--) { - temp = label.Substring(0, q); + var temp = label.Substring(0, q); for (int k = 0; k <= 96 && atomicNumber == 0; k++) { - // asf.SetCoefficientForXray(k); - if (AtomConstants.AtomicName(k) == temp) { atomicNumber = k; @@ -472,75 +478,45 @@ private static Crystal ConvertFromAmc(string[] str) atomicNumber = -2; } + var IsIso = aniso == null || aniso.All(e => e == ""); + if (atomicNumber > 0) { - /*String element; - if (asf.AtomicNumber > 10) - element = asf.AtomicNumber.ToString() + ": " + asf.AtomicName; - else - element = asf.AtomicNumber.ToString() + ": " + asf.AtomicName; - */ - crystal.AddAtoms(new Atoms(label, atomicNumber, 0, 0, null, crystal.SymmetrySeriesNumber, new Vector3D(x, y, z), occ, dsf)); + atoms.Add(new Atoms2(label, (byte)atomicNumber, 0, 0, new[] { x, y, z }, occ, IsIso, IsUtypeUsed, iso, aniso)); } else if (atomicNumber == -1)//"OH"のときの対処 { - /*sfn = 1; - AtomicScatteringFactor asf = AtomicScatteringFactor.GetCoefficientForXray(sfn); - String element = asf.AtomicNumber.ToString() + ": " + asf.AtomicName;*/ - crystal.AddAtoms(new Atoms(label, 1, 0, 0, null, crystal.SymmetrySeriesNumber, new Vector3D(x, y, z), occ, dsf)); - - /*sfn = 12; - asf = AtomicScatteringFactor.GetCoefficientForXray(sfn); - element = asf.AtomicNumber.ToString() + ": " + asf.AtomicName;*/ - crystal.AddAtoms(new Atoms(label, 8, 0, 0, null, crystal.SymmetrySeriesNumber, new Vector3D(x, y, z), occ, dsf)); + atoms.Add(new Atoms2(label, 1, 0, 0, new[] { x, y, z }, occ, IsIso, IsUtypeUsed, iso, aniso)); + atoms.Add(new Atoms2(label, 8, 0, 0, new[] { x, y, z }, occ, IsIso, IsUtypeUsed, iso, aniso)); } else if (atomicNumber == -2)//"Wat"水のときの対処 { - /*sfn = 1; - AtomicScatteringFactor asf = AtomicScatteringFactor.GetCoefficientForXray(sfn); - String element = asf.AtomicNumber.ToString() + ": " + asf.AtomicName; - crystal.AddAtoms(new Atoms(label, sfn, crystal.SymmetrySeriesNumber, new Vector3D(x, y, z), occ, dsf));*/ - - crystal.AddAtoms(new Atoms(label, 1, 0, 0, null, crystal.SymmetrySeriesNumber, new Vector3D(x, y, z), occ, dsf)); - crystal.AddAtoms(new Atoms(label, 1, 0, 0, null, crystal.SymmetrySeriesNumber, new Vector3D(x, y, z), occ, dsf)); - - /*sfn = 12; - asf = AtomicScatteringFactor.GetCoefficientForXray(sfn); - element = asf.AtomicNumber.ToString() + ": " + asf.AtomicName;*/ - crystal.AddAtoms(new Atoms(label, 8, 0, 0, null, crystal.SymmetrySeriesNumber, new Vector3D(x, y, z), occ, dsf)); + atoms.Add(new Atoms2(label, 1, 0, 0, new[] { x, y, z }, occ, IsIso, IsUtypeUsed, iso, aniso)); + atoms.Add(new Atoms2(label, 1, 0, 0, new[] { x, y, z }, occ, IsIso, IsUtypeUsed, iso, aniso)); + atoms.Add(new Atoms2(label, 8, 0, 0, new[] { x, y, z }, occ, IsIso, IsUtypeUsed, iso, aniso)); } } - - SetOpenGL_property(crystal); - - crystal.Name = Name; - crystal.Journal = Reference; - crystal.PublAuthorName = AuthorName; - crystal.PublSectionTitle = Title; - + crystal.name = Name; + crystal.sect = Title; + crystal.auth = AuthorName; + crystal.jour = Reference; + crystal.atoms = atoms; return crystal; } - private static Crystal CellParamForAmc(string str) + private static Crystal2 CellParamForAmc(string str) { double A, B, C, Alfa, Beta, Gamma; int symmetrySeriesNumber = -1; - string[] s; - if (str.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Length != 7) + var s= str.Split(" "); + if (s.Length != 7) return null; - s = str.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - try { if (Miscellaneous.IsDecimalPointComma) - { - s[0] = s[0].Replace('.', ','); - s[1] = s[1].Replace('.', ','); - s[2] = s[2].Replace('.', ','); - s[3] = s[3].Replace('.', ','); - s[4] = s[4].Replace('.', ','); - s[5] = s[5].Replace('.', ','); - } + for (int i = 0; i < 6; i++) s[i] = s[i].Replace('.', ','); + else + for (int i = 0; i < 6; i++) s[i] = s[i].Replace(',', '.'); A = Convert.ToDouble(s[0]); B = Convert.ToDouble(s[1]); C = Convert.ToDouble(s[2]); @@ -555,9 +531,7 @@ private static Crystal CellParamForAmc(string str) bool isAsterisk = SgName.Contains("*"); SgName = SgName.Replace("*", ""); - -#region - + #region 空間群の場合分け if (SgName == "Pm3") SgName = "Pm-3"; else if (SgName == "Pn3") SgName = "Pn-3"; @@ -687,7 +661,7 @@ private static Crystal CellParamForAmc(string str) else if (SgName == "C2/c" && Beta == 90.0 && Gamma == 90.0) SgName = "C2/c11"; else if (SgName == "B2/n" && Beta == 90.0 && Gamma == 90.0) SgName = "B2/n11"; else if (SgName == "I2/b" && Beta == 90.0 && Gamma == 90.0) SgName = "I2/b11"; -#endregion amcファイルの読み込み + #endregion amcファイルの読み込み //文字列を含んでいて、かつ、文字数が少ない空間群を選択する (C1とC121などを見分けるため) int length = int.MaxValue; @@ -727,150 +701,20 @@ private static Crystal CellParamForAmc(string str) if (symmetrySeriesNumber >= 0) { var r = new Random(); - return new Crystal((A / 10, B / 10, C / 10, Alfa * Math.PI / 180, Beta * Math.PI / 180, Gamma * Math.PI / 180),null, - symmetrySeriesNumber, "", Color.FromArgb(r.Next(255), r.Next(255), r.Next(255))); + return new Crystal2{ + + CellTexts = new[] { s[0], s[1], s[2], s[3], s[4], s[5] }, + sym = (short)symmetrySeriesNumber, + argb = Color.FromArgb(r.Next(255), r.Next(255), r.Next(255)).ToArgb() + }; } else return null; } -#endregion + private static double ConvertToDouble(string str) => ConvertToDouble(str, false); -#region OpenGLのためのBond設定 - public static void SetOpenGL_property(Crystal c) - { - foreach (Atoms a in c.Atoms) - a.ResetVesta(); - c.Bonds = Bonds.GetVestaBonds(c.Atoms.Select(a => a.ElementName).Distinct()); - -#region お蔵入り - /* - //先ず原子の色、半径を設定 - foreach (Atoms a in c.Atoms) - { - switch (a.ElementName) - { -#region イオン半径、色を設定 - case "1: H": a.Radius = 0.005f; a.Argb = Color.FromArgb(98, 11, 181).ToArgb(); break; - case "2: He": a.Radius = 0.05f; a.Argb = Color.FromArgb(137, 250, 106).ToArgb(); break; - case "3: Li": a.Radius = 0.38f; a.Argb = Color.FromArgb(43, 200, 157).ToArgb(); break; - case "4: Be": a.Radius = 0.135f; a.Argb = Color.FromArgb(161, 34, 128).ToArgb(); break; - case "5: B": a.Radius = 0.055f; a.Argb = Color.FromArgb(249, 251, 174).ToArgb(); break; - case "6: C": a.Radius = 0.075f; a.Argb = Color.FromArgb(211, 45, 173).ToArgb(); break; - case "7: N": a.Radius = 0.08f; a.Argb = Color.FromArgb(248, 240, 241).ToArgb(); break; - case "8: O": a.Radius = 0.71f; a.Argb = Color.FromArgb(255, 0, 0).ToArgb(); break; - case "9: F": a.Radius = 0.665f; a.Argb = Color.FromArgb(153, 165, 227).ToArgb(); break; - case "10: Ne": a.Radius = 0.005f; a.Argb = Color.FromArgb(65, 223, 157).ToArgb(); break; - case "11: Na": a.Radius = 0.59f; a.Argb = Color.FromArgb(187, 195, 36).ToArgb(); break; - case "12: Mg": a.Radius = 0.445f; a.Argb = Color.FromArgb(193, 162, 107).ToArgb(); break; - case "13: Al": a.Radius = 0.195f; a.Argb = Color.FromArgb(153, 46, 158).ToArgb(); break; - case "14: Si": a.Radius = 0.20f; a.Argb = Color.FromArgb(0, 0, 255).ToArgb(); break; - case "15: P": a.Radius = 0.145f; a.Argb = Color.FromArgb(101, 199, 183).ToArgb(); break; - case "16: S": a.Radius = 0.92f; a.Argb = Color.FromArgb(87, 191, 62).ToArgb(); break; - case "17: Cl": a.Radius = 0.905f; a.Argb = Color.FromArgb(23, 36, 16).ToArgb(); break; - case "18: Ar": a.Radius = 0.05f; a.Argb = Color.FromArgb(203, 82, 236).ToArgb(); break; - case "19: K": a.Radius = 0.755f; a.Argb = Color.FromArgb(216, 96, 67).ToArgb(); break; - case "20: Ca": a.Radius = 0.56f; a.Argb = Color.FromArgb(35, 159, 207).ToArgb(); break; - case "21: Sc": a.Radius = 0.435f; a.Argb = Color.FromArgb(165, 191, 130).ToArgb(); break; - case "22: Ti": a.Radius = 0.25f; a.Argb = Color.FromArgb(64, 112, 111).ToArgb(); break; - case "23: V": a.Radius = 0.29f; a.Argb = Color.FromArgb(158, 54, 69).ToArgb(); break; - case "24: Cr": a.Radius = 0.3075f; a.Argb = Color.FromArgb(43, 48, 188).ToArgb(); break; - case "25: Mn": a.Radius = 0.29f; a.Argb = Color.FromArgb(69, 122, 233).ToArgb(); break; - case "26: Fe": a.Radius = 0.400f; a.Argb = Color.FromArgb(23, 239, 57).ToArgb(); break; - case "27: Co": a.Radius = 0.305f; a.Argb = Color.FromArgb(119, 8, 111).ToArgb(); break; - case "28: Ni": a.Radius = 0.3f; a.Argb = Color.FromArgb(190, 121, 182).ToArgb(); break; - case "29: Cu": a.Radius = 0.285f; a.Argb = Color.FromArgb(215, 226, 61).ToArgb(); break; - case "30: Zn": a.Radius = 0.37f; a.Argb = Color.FromArgb(122, 74, 64).ToArgb(); break; - case "31: Ga": a.Radius = 0.31f; a.Argb = Color.FromArgb(22, 97, 30).ToArgb(); break; - case "32: Ge": a.Radius = 0.265f; a.Argb = Color.FromArgb(60, 177, 233).ToArgb(); break; - case "33: As": a.Radius = 0.23f; a.Argb = Color.FromArgb(159, 16, 53).ToArgb(); break; - case "34: Se": a.Radius = 0.99f; a.Argb = Color.FromArgb(250, 56, 55).ToArgb(); break; - case "35: Br": a.Radius = 0.98f; a.Argb = Color.FromArgb(221, 111, 159).ToArgb(); break; - case "36: Kr": a.Radius = 0.05f; a.Argb = Color.FromArgb(225, 104, 113).ToArgb(); break; - case "37: Rb": a.Radius = 0.805f; a.Argb = Color.FromArgb(51, 135, 205).ToArgb(); break; - case "38: Sr": a.Radius = 0.63f; a.Argb = Color.FromArgb(158, 31, 36).ToArgb(); break; - case "39: Y": a.Radius = 0.45f; a.Argb = Color.FromArgb(131, 105, 94).ToArgb(); break; - case "40: Zr": a.Radius = 0.36f; a.Argb = Color.FromArgb(237, 15, 134).ToArgb(); break; - case "41: Nb": a.Radius = 0.32f; a.Argb = Color.FromArgb(236, 148, 12).ToArgb(); break; - case "42: Mo": a.Radius = 0.295f; a.Argb = Color.FromArgb(246, 92, 178).ToArgb(); break; - case "43: Tc": a.Radius = 0.3f; a.Argb = Color.FromArgb(103, 200, 138).ToArgb(); break; - case "44: Ru": a.Radius = 0.18f; a.Argb = Color.FromArgb(227, 4, 84).ToArgb(); break; - case "45: Rh": a.Radius = 0.275f; a.Argb = Color.FromArgb(191, 235, 99).ToArgb(); break; - case "46: Pd": a.Radius = 0.3075f; a.Argb = Color.FromArgb(150, 156, 76).ToArgb(); break; - case "47: Ag": a.Radius = 0.47f; a.Argb = Color.FromArgb(55, 51, 185).ToArgb(); break; - case "48: Cd": a.Radius = 0.475f; a.Argb = Color.FromArgb(84, 100, 150).ToArgb(); break; - case "49: In": a.Radius = 0.4f; a.Argb = Color.FromArgb(47, 80, 243).ToArgb(); break; - case "50: Sn": a.Radius = 0.345f; a.Argb = Color.FromArgb(180, 73, 238).ToArgb(); break; - case "51: Sb": a.Radius = 0.38f; a.Argb = Color.FromArgb(210, 79, 249).ToArgb(); break; - case "52: Te": a.Radius = 0.485f; a.Argb = Color.FromArgb(92, 27, 100).ToArgb(); break; - case "53: I": a.Radius = 1.1f; a.Argb = Color.FromArgb(224, 110, 46).ToArgb(); break; - case "54: Xe": a.Radius = 0.2f; a.Argb = Color.FromArgb(169, 220, 216).ToArgb(); break; - case "55: Cs": a.Radius = 0.87f; a.Argb = Color.FromArgb(244, 226, 13).ToArgb(); break; - case "56: Ba": a.Radius = 0.71f; a.Argb = Color.FromArgb(177, 2, 109).ToArgb(); break; - case "57: La": a.Radius = 0.58f; a.Argb = Color.FromArgb(194, 79, 196).ToArgb(); break; - case "58: Ce": a.Radius = 0.5715f; a.Argb = Color.FromArgb(88, 221, 142).ToArgb(); break; - case "59: Pr": a.Radius = 0.563f; a.Argb = Color.FromArgb(247, 156, 100).ToArgb(); break; - case "60: Nd": a.Radius = 0.4915f; a.Argb = Color.FromArgb(252, 189, 121).ToArgb(); break; - case "61: Pm": a.Radius = 0.5465f; a.Argb = Color.FromArgb(209, 104, 146).ToArgb(); break; - case "62: Sm": a.Radius = 0.479f; a.Argb = Color.FromArgb(133, 7, 117).ToArgb(); break; - case "63: Eu": a.Radius = 0.625f; a.Argb = Color.FromArgb(226, 218, 141).ToArgb(); break; - case "64: Gd": a.Radius = 0.5265f; a.Argb = Color.FromArgb(26, 83, 227).ToArgb(); break; - case "65: Tb": a.Radius = 0.52f; a.Argb = Color.FromArgb(160, 216, 140).ToArgb(); break; - case "66: Dy": a.Radius = 0.485f; a.Argb = Color.FromArgb(13, 71, 184).ToArgb(); break; - case "67: Ho": a.Radius = 0.5075f; a.Argb = Color.FromArgb(104, 109, 153).ToArgb(); break; - case "68: Er": a.Radius = 0.502f; a.Argb = Color.FromArgb(21, 168, 23).ToArgb(); break; - case "69: Tm": a.Radius = 0.497f; a.Argb = Color.FromArgb(221, 220, 184).ToArgb(); break; - case "70: Yb": a.Radius = 0.434f; a.Argb = Color.FromArgb(23, 151, 178).ToArgb(); break; - case "71: Lu": a.Radius = 0.4305f; a.Argb = Color.FromArgb(108, 190, 142).ToArgb(); break; - case "72: Hf": a.Radius = 0.355f; a.Argb = Color.FromArgb(84, 253, 37).ToArgb(); break; - case "73: Ta": a.Radius = 0.34f; a.Argb = Color.FromArgb(160, 247, 238).ToArgb(); break; - case "74: W": a.Radius = 0.21f; a.Argb = Color.FromArgb(4, 203, 171).ToArgb(); break; - case "75: Re": a.Radius = 0.275f; a.Argb = Color.FromArgb(87, 31, 14).ToArgb(); break; - case "76: Os": a.Radius = 0.245f; a.Argb = Color.FromArgb(218, 170, 3).ToArgb(); break; - case "77: Ir": a.Radius = 0.3125f; a.Argb = Color.FromArgb(245, 219, 180).ToArgb(); break; - case "78: Pt": a.Radius = 0.3125f; a.Argb = Color.FromArgb(43, 17, 113).ToArgb(); break; - case "79: Au": a.Radius = 0.425f; a.Argb = Color.FromArgb(77, 63, 211).ToArgb(); break; - case "80: Hg": a.Radius = 0.48f; a.Argb = Color.FromArgb(62, 50, 156).ToArgb(); break; - case "81: Tl": a.Radius = 0.375f; a.Argb = Color.FromArgb(80, 119, 140).ToArgb(); break; - case "82: Pb": a.Radius = 0.645f; a.Argb = Color.FromArgb(243, 58, 152).ToArgb(); break; - case "83: Bi": a.Radius = 0.515f; a.Argb = Color.FromArgb(123, 248, 40).ToArgb(); break; - case "84: Po": a.Radius = 0.335f; a.Argb = Color.FromArgb(213, 176, 49).ToArgb(); break; - case "85: At": a.Radius = 0.31f; a.Argb = Color.FromArgb(230, 228, 32).ToArgb(); break; - case "86: Rn": a.Radius = 0.05f; a.Argb = Color.FromArgb(115, 62, 60).ToArgb(); break; - case "87: Fr": a.Radius = 0.9f; a.Argb = Color.FromArgb(155, 85, 177).ToArgb(); break; - case "88: Ra": a.Radius = 0.85f; a.Argb = Color.FromArgb(199, 47, 152).ToArgb(); break; - case "89: Ac": a.Radius = 0.56f; a.Argb = Color.FromArgb(214, 227, 230).ToArgb(); break; - case "90: Th": a.Radius = 0.525f; a.Argb = Color.FromArgb(153, 241, 22).ToArgb(); break; - case "91: Pa": a.Radius = 0.45f; a.Argb = Color.FromArgb(80, 156, 227).ToArgb(); break; - case "92: U": a.Radius = 0.365f; a.Argb = Color.FromArgb(44, 59, 209).ToArgb(); break; - case "93: Np": a.Radius = 0.49f; a.Argb = Color.FromArgb(10, 253, 55).ToArgb(); break; - case "94: Pu": a.Radius = 0.48f; a.Argb = Color.FromArgb(95, 160, 240).ToArgb(); break; - case "95: Am": a.Radius = 0.425f; a.Argb = Color.FromArgb(252, 12, 39).ToArgb(); break; - case "96: Cm": a.Radius = 0.425f; a.Argb = Color.FromArgb(217, 174, 152).ToArgb(); break; - case "97: Bk": a.Radius = 0.415f; a.Argb = Color.FromArgb(54, 244, 120).ToArgb(); break; - case "98: Cf": a.Radius = 0.4105f; a.Argb = Color.FromArgb(161, 45, 164).ToArgb(); break; -#endregion イオン半径、色を設定 - } - if (!elementList.Contains(a.ElementName)) - elementList.Add(a.ElementName); - } - */ -#endregion - - - } - - - - - -#endregion - private static double ConvertToDouble(string str) - { - return ConvertToDouble(str, false); - } - - private static double ConvertToDouble(string str, bool IsHex) + private static double ConvertToDouble(string str, bool IsHex) { try { @@ -878,20 +722,21 @@ private static double ConvertToDouble(string str, bool IsHex) return 0; else if (str.IndexOf('/') > 0) { - string[] temp = str.Split('/'); - if (temp.Length == 2) - return Convert.ToDouble(temp[0]) / Convert.ToDouble(temp[1]); - else - return 0; + var temp = str.Split('/'); + return temp.Length == 2 ? Convert.ToDouble(temp[0]) / Convert.ToDouble(temp[1]) : 0; } else if (IsHex) { if (str.Contains(".0833")) return 1.0 / 12.0; else if (str.Contains(".1667")) return 1.0 / 6.0; + else if (str.Contains(".16667")) return 1.0 / 6.0; + else if (str.Contains(".166667")) return 1.0 / 6.0; + else if (str.Contains(".333333")) return 1.0 / 3.0; else if (str.Contains(".33333")) return 1.0 / 3.0; else if (str.Contains(".3333")) return 1.0 / 3.0; else if (str.Contains(".4167")) return 5.0 / 12.0; else if (str.Contains(".5833")) return 7.0 / 12.0; + else if (str.Contains(".666667")) return 2.0 / 3.0; else if (str.Contains(".66667")) return 2.0 / 3.0; else if (str.Contains(".6667")) return 2.0 / 3.0; else if (str.Contains(".8333")) return 5.0 / 6.0; @@ -899,10 +744,14 @@ private static double ConvertToDouble(string str, bool IsHex) if (str.Contains(",0833")) return 1.0 / 12.0; else if (str.Contains(",1667")) return 1.0 / 6.0; + else if (str.Contains(",16667")) return 1.0 / 6.0; + else if (str.Contains(",166667")) return 1.0 / 6.0; + else if (str.Contains(",333333")) return 1.0 / 3.0; else if (str.Contains(",33333")) return 1.0 / 3.0; else if (str.Contains(",3333")) return 1.0 / 3.0; else if (str.Contains(",4167")) return 5.0 / 12.0; else if (str.Contains(",5833")) return 7.0 / 12.0; + else if (str.Contains(",666667")) return 2.0 / 3.0; else if (str.Contains(",66667")) return 2.0 / 3.0; else if (str.Contains(",6667")) return 2.0 / 3.0; else if (str.Contains(",8333")) return 5.0 / 6.0; @@ -917,19 +766,30 @@ private static double ConvertToDouble(string str, bool IsHex) } } -#region CIFファイルの読み込み + #endregion + + #region CIFファイルの読み込み + + private static Crystal2 ConvertFromCIF(string fileName) + { + var stringList = new List(); + string strTemp; + using (var reader = new StreamReader(fileName)) + while ((strTemp = reader.ReadLine()) != null) + stringList.Add(strTemp); + return ConvertFromCIF(stringList.ToArray()); + } /// /// CIFファイルを読み込む /// /// /// - private static Crystal ConvertFromCIF(string[] str) + private static Crystal2 ConvertFromCIF(string[] str) { - //System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); //まず ;と; で囲まれている複数にわたる行を一行にする - List tempStr = new List(); - string note = ""; + var tempStr = new List(); + var note = ""; if (str[0].StartsWith("data")) note = str[0]; for (int n = 0; n < str.Length; n++) @@ -962,24 +822,20 @@ private static Crystal ConvertFromCIF(string[] str) { if (tempStr[n].IndexOf("''") > -1)//''という文字列が含まれていたら { - string temp = tempStr[n].Remove(0, tempStr[n].IndexOf("'")); + var temp = tempStr[n].Remove(0, tempStr[n].IndexOf("'")); temp = temp.Replace("''", "ここにはスペースがはいります。"); tempStr[n] = tempStr[n].Remove(tempStr[n].IndexOf("'")) + temp; } if (tempStr[n].IndexOf("'") > -1)//'が含まれていたら { - //string temp = tempStr[n].Remove(0, tempStr[n].IndexOf("'")); - //temp = temp.Replace("'", "").TrimEnd(' ').TrimStart(' ').Replace(" ", "ここにはスペースがはいります。"); - //tempStr[n] = tempStr[n].Remove(tempStr[n].IndexOf("'")) + temp; - while (tempStr[n].IndexOf("'") > -1) { - int firstIndex = tempStr[n].IndexOf("'"); - int next = tempStr[n].IndexOf("'", firstIndex + 1); + var firstIndex = tempStr[n].IndexOf("'"); + var next = tempStr[n].IndexOf("'", firstIndex + 1); if (next == -1) break; - string substring = tempStr[n].Substring(firstIndex, next - firstIndex + 1); + var substring = tempStr[n].Substring(firstIndex, next - firstIndex + 1); substring = substring.Replace(" ", "ここにはスペースがはいります。"); substring = substring.Replace("'", ""); @@ -1007,21 +863,13 @@ private static Crystal ConvertFromCIF(string[] str) } str = tempStr.ToArray(); - List CIF = new List(); - string tempLabel, tempData; - CIF_Group cif_Group; - List tempLoopLabels = new List(); - List tempLoopDatas = new List(); - + var CIF = new List>(); for (int n = 0; n < str.Length; n++) { - cif_Group = new CIF_Group { items = new List() }; - if (str[n].Trim().StartsWith("_")) {//単体アイテムのとき - string[] temp; - temp = str[n].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - tempLabel = temp[0]; + var temp = str[n].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + string tempLabel = temp[0], tempData; if (temp.Length == 2) tempData = temp[1]; else if (temp.Length == 1) @@ -1031,23 +879,20 @@ private static Crystal ConvertFromCIF(string[] str) } else tempData = ""; - cif_Group.AddItem(new CIF_Item(tempLabel, tempData.Replace("ここにはスペースがはいります。", " "))); - CIF.Add(cif_Group); + CIF.Add(new List<(string Label, string Data)>(new[] { (tempLabel, tempData.Replace("ここにはスペースがはいります。", " ")) })); } else if (str[n].Trim().StartsWith("loop_")) {//ループのとき string[] temp; - tempLoopLabels = new List(); - tempLoopDatas = new List(); + var tempLoopLabels = new List(); + var tempLoopDatas = new List(); n++; //"_"で始まるラベルを数える while (n < str.Length && str[n].Trim().StartsWith("_")) - { - tempLoopLabels.Add(str[n].Trim()); - n++; - } - //次に"_"か"loop_"で始まる行が出てくるまでループ - while (n < str.Length && !str[n].Trim().StartsWith("_") && !str[n].Trim().StartsWith("loop_")) + tempLoopLabels.Add(str[n++].Trim()); + + //次に"_"か"loop_"か"#End of"で始まる行が出てくるまでループ + while (n < str.Length && !str[n].Trim().StartsWith("_") && !str[n].Trim().StartsWith("loop_") && !str[n].Trim().StartsWith("#End of")) { temp = str[n].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < temp.Length; i++) @@ -1059,11 +904,9 @@ private static Crystal ConvertFromCIF(string[] str) { for (int i = 0; i < tempLoopDatas.Count / tempLoopLabels.Count; i++) { - cif_Group.items = new List(); + var cif_Group = new List<(string Label, string Data)>(); for (int j = 0; j < tempLoopLabels.Count; j++) - { - cif_Group.AddItem(new CIF_Item(tempLoopLabels[j], tempLoopDatas[i * tempLoopLabels.Count + j].Replace("ここにはスペースがはいります。", " "))); - } + cif_Group.Add((tempLoopLabels[j], tempLoopDatas[i * tempLoopLabels.Count + j].Replace("ここにはスペースがはいります。", " "))); CIF.Add(cif_Group); } } @@ -1071,108 +914,73 @@ private static Crystal ConvertFromCIF(string[] str) } //ここまででCIF_Groupクラスのリストが完成 - //重複するCIFのlabelがあったときは、最初を残して、あとは削除する => 消す必要なし. - //for (int i = 0; i < CIF.Count; i++) - // for (int j = i + 1; j < CIF.Count; j++) - // if (CIF[i].items.Count == 1 && CIF[j].items.Count == 1 && CIF[i].items[0].label == CIF[j].items[0].label) - // { - // CIF.RemoveAt(j); - // j--; - // } - - double a = 0, b = 0, c = 0, alpha = 90, beta = 90, gamma = 90; - double a_err = 0, b_err = 0, c_err = 0, alpha_err = 0, beta_err = 0, gamma_err = 0; - string name = "", sectionTitle = "", journalNameFull = "", journalCodenASTM = "", label = "", data = ""; - string volume = "", year = "", pageFirst = "", pageLast = "", issue = ""; - string journal = "", spaceGroupNameHM = "", spaceGroupNameHall = "", chemical_formula_sum = "", chemical_formula_structural = ""; + string a="", b = "", c = "", alpha = "", beta = "", gamma = ""; + string name = "", sectionTitle = "", journalNameFull = "", journalCodenASTM = ""; + string volume = "", year = "", pageFirst = "", pageLast = "", issue = "", journal = ""; + List spaceGroupNameHM = new List(), spaceGroupNameHall = new List(); + string chemical_formula_sum = "", chemical_formula_structural = ""; int symmetry_Int_Tables_number = -1; - List author = new List(); - List operations = new List(); - + var author = new List(); + var operations = new List(); for (int i = 0; i < CIF.Count; i++) - for (int j = 0; j < CIF[i].items.Count; j++) + for (int j = 0; j < CIF[i].Count; j++) { - label = CIF[i].items[j].label; - data = CIF[i].items[j].data; - if (label.StartsWith("_chemical_name")) - { - if (name == "") - name = data; - else - name += " " + data; - } - - switch (label) - { - //ここから格子定数 - case "_cell_length_a": - a = ConvertToDoubleForCIF(data); - a_err = ConvertErrForCIF(data); - break; - - case "_cell_length_b": - b = ConvertToDoubleForCIF(data); - b_err = ConvertErrForCIF(data); - break; - - case "_cell_length_c": - c = ConvertToDoubleForCIF(data); - c_err = ConvertErrForCIF(data); - break; - - case "_cell_angle_alpha": - alpha = ConvertToDoubleForCIF(data); - alpha_err = ConvertErrForCIF(data); - break; - - case "_cell_angle_beta": - beta = ConvertToDoubleForCIF(data); - beta_err = ConvertErrForCIF(data); - break; - - case "_cell_angle_gamma": - gamma = ConvertToDoubleForCIF(data); - gamma_err = ConvertErrForCIF(data); - break; - //ここからジャーナル情報 - case "_publ_author_name": author.Add(data); break; - case "_publ_section_title": sectionTitle = data; break; - case "_journal_name_full": journalNameFull = data; break; - case "_journal_coden_ASTM": journalCodenASTM = data; break; - case "_journal_year": year = data; break; - case "_journal_volume": volume = data; break; - case "_journal_page_first": pageFirst = data; break; - case "_journal_page_last": pageLast = data; break; - case "_journal_issue": issue = data; break; - //ここから対称性 - case "_symmetry_space_group_name_H-M": spaceGroupNameHM = data; break; - case "_symmetry_space_group_name_Hall": spaceGroupNameHall = data; break; - case "_symmetry_Int_Tables_number": int.TryParse(data, out symmetry_Int_Tables_number); break; - case "_chemical_formula_sum": chemical_formula_sum = data; break; - case "_chemical_formula_structural": chemical_formula_structural = data; break; - case "_space_group_symop_operation_xyz": operations.Add(data);break; - case "_symmetry_equiv_pos_as_xyz": operations.Add(data);break; - } + var label = CIF[i][j].Label; + var data = CIF[i][j].Data; + + if (label.StartsWith("_chemical_name")) name += data + " "; + + //ここから格子定数 + if (label == "_cell_length_a") a = data; + else if (label == "_cell_length_b") b = data; + else if (label == "_cell_length_c") c = data; + else if (label == "_cell_angle_alpha") alpha = data; + else if (label == "_cell_angle_beta") beta = data; + else if (label == "_cell_angle_gamma") gamma = data; + //ここからジャーナル情報 + else if (label == "_publ_author_name") author.Add(data); + else if (label == "_publ_section_title") sectionTitle = data; + else if (label == "_journal_name_full") journalNameFull = data; + else if (label == "_journal_coden_ASTM") journalCodenASTM = data; + else if (label == "_journal_year") year = data; + else if (label == "_journal_volume") volume = data; + else if (label == "_journal_page_first") pageFirst = data; + else if (label == "_journal_page_last") pageLast = data; + else if (label == "_journal_issue") issue = data; + //ここから対称性 + else if (label.Contains("_space_group_name_H-M")) spaceGroupNameHM.Add(data); + else if (label.Contains("_space_group_name_Hall")) spaceGroupNameHall.Add(data); + else if (label == "_Int_Tables_number") int.TryParse(data, out symmetry_Int_Tables_number); + else if (label == "_chemical_formula_sum") chemical_formula_sum = data; + else if (label == "_chemical_formula_structural") chemical_formula_structural = data; + else if (label == "_space_group_symop_operation_xyz") operations.Add(data); + else if (label == "_symmetry_equiv_pos_as_xyz") operations.Add(data); } - if (name == "" || name == "?" || name == "? ?" || name.Trim() == "") name = chemical_formula_sum; - - -#region 空間群を調べる部分 + #region 空間群を調べる部分 //空間群を検索 int sgnum = 0; - if (spaceGroupNameHM == "" && spaceGroupNameHall == "") + if (spaceGroupNameHM.Count == 0 && spaceGroupNameHall.Count == 0) sgnum = 0; else - sgnum = SearchSGseriesNumberForCIF(spaceGroupNameHM, spaceGroupNameHall, symmetry_Int_Tables_number, a, b, c, alpha, beta, gamma); + { + for (int i = 0; i < Math.Max(spaceGroupNameHall.Count, spaceGroupNameHM.Count); i++) + { var HM = i < spaceGroupNameHM.Count ? spaceGroupNameHM[i] : ""; + var Hall = i < spaceGroupNameHall.Count ? spaceGroupNameHall[i] : ""; + sgnum = SearchSGseriesNumberForCIF(HM, Hall, symmetry_Int_Tables_number, a == b && b == c && alpha == beta && beta == gamma, alpha == "90", beta == "90", gamma == "90"); + if (sgnum != -1) + break; + } + } + if (sgnum == -1) return null; -#region 対象操作がCIFファイル中に記載されている場合は、本当に現在の空間群でよいかどうかをチェック + #region 対象操作がCIFファイル中に記載されている場合は、本当に現在の空間群でよいかどうかをチェック var p = new V3(0.111, 0.234, 0.457);//適当な一般位置 var tempAtom = WyckoffPosition.GetEquivalentAtomsPosition((p.X, p.Y, p.Z), sgnum).Atom; var shift = new V3(0, 0, 0); @@ -1185,16 +993,16 @@ Func func(string sExpr) { try { - sExpr = sExpr.Replace(",+", ",").TrimStart(new[] { '+' }); + sExpr = sExpr.Replace(" ", "").Replace(",+", ",").TrimStart(new[] { '+' }); sExpr = "new [] {" + sExpr.Replace("/", ".0/").Replace(".0.0", ".0") + "}";//分子に小数点を加える - var f = DynamicExpressionParser.ParseLambda(prms, typeof(double[]), sExpr).Compile() as Func; + var f = DynamicExpressionParser.ParseLambda(prms, typeof(double[]), sExpr).Compile() as Func; return (x, y, z) => { var d = f(x, y, z); return new V3(d[0], d[1], d[2]); }; } catch (Exception e) { #if DEBUG - System.Windows.Forms.MessageBox.Show(e.Message); + System.Windows.Forms.MessageBox.Show( e.Message); #endif return null; } @@ -1226,34 +1034,17 @@ Func func(string sExpr) } } } -#endregion - -#endregion - - bool isHex = (sgnum >= 430 && sgnum <= 488); + #endregion - Crystal crystalTemp = new Crystal( - (a / 10.0, b / 10.0, c / 10.0, alpha / 180 * Math.PI, beta / 180 * Math.PI, gamma / 180 * Math.PI), sgnum, "", Color.AliceBlue); - crystalTemp.SetAxis(); - double aStar = crystalTemp.A_Star.Length / 10; - double bStar = crystalTemp.B_Star.Length / 10; - double cStar = crystalTemp.C_Star.Length / 10; - - //原子の情報 - string atomLabel, atomSymbol, thermalDisplaceType; - double x, y, z, occ, x_err, y_err, z_err, occ_err; - double Uiso = 0, u11 = 0, u22 = 0, u33 = 0, u12 = 0, u13 = 0, u23 = 0, Uiso_err = 0, u11_err = 0, u22_err = 0, u33_err = 0, u12_err = 0, u13_err = 0, u23_err = 0; - double Biso = 0, b11 = 0, b22 = 0, b33 = 0, b12 = 0, b13 = 0, b23 = 0, Biso_err = 0, b11_err = 0, b22_err = 0, b33_err = 0, b12_err = 0, b13_err = 0, b23_err = 0; - List atoms = new List(); + #endregion //"_atom_site_label"というラベルを含むCIF番号をリストする。 (最初の連続した番号のみを使う) - List atomCIF = new List(); + var atomCIF = new List>(); bool flag = false; for (int i = 0; i < CIF.Count; i++) - { if (flag || atomCIF.Count == 0) { - if (CIF[i].items.Exists(item => item.label == "_atom_site_label")) + if (CIF[i].Exists(item => item.Label == "_atom_site_label")) { atomCIF.Add(CIF[i]); flag = true; @@ -1261,155 +1052,81 @@ Func func(string sExpr) else flag = false; } - } - foreach (CIF_Group cif in atomCIF) + var atoms = new List(); + foreach (var cif in atomCIF) { + //原子の情報 + string atomLabel="", atomSymbol="", thermalDisplaceType=""; + string x = "", y = "", z = "", occ="1"; + string uIso = "", u11 = "", u22 = "", u33 = "", u12 = "", u13 = "", u23 = ""; + string bIso = "", b11 = "", b22 = "", b33 = "", b12 = "", b13 = "", b23 = ""; + //まず基本的な原子位置や占有率などの情報を探す - atomLabel = ""; - atomSymbol = ""; - thermalDisplaceType = ""; - x = y = z = 0; - occ = 1; - x_err = y_err = z_err = occ_err = Uiso = Uiso_err = 0; - for (int j = 0; j < cif.items.Count; j++) + occ = "1"; + for (int j = 0; j < cif.Count; j++) { - label = cif.items[j].label; - data = cif.items[j].data; - switch (label) + var label = cif[j].Label; + var data = cif[j].Data; + if (label == "_atom_site_type_symbol") atomSymbol = data; + else if (label == "_atom_site_label") atomLabel = data; + else if (label == "_atom_site_thermal_displace_type") thermalDisplaceType = data; + else if (data != "?" && data != ".") { - case "_atom_site_type_symbol": atomSymbol = data; break; - case "_atom_site_label": atomLabel = data; break; - case "_atom_site_fract_x": - x = ConvertToDoubleForCIF(data, isHex)+ shift.X; - x_err = ConvertErrForCIF(data); - break; - - case "_atom_site_fract_y": - y = ConvertToDoubleForCIF(data, isHex) + shift.Y; - y_err = ConvertErrForCIF(data); - break; - - case "_atom_site_fract_z": - z = ConvertToDoubleForCIF(data, isHex) + shift.Z; - z_err = ConvertErrForCIF(data); - break; - - case "_atom_site_occupancy": - if (data == "?" || data == ".") - { - occ = 1; - occ_err = 0; - } - else - { - occ = ConvertToDoubleForCIF(data); - occ_err = ConvertErrForCIF(data); - } - break; - - case "_atom_site_U_iso_or_equiv": - Uiso = ConvertToDoubleForCIF(data); - Uiso_err = ConvertErrForCIF(data); - break; - - case "_atom_site_B_iso_or_equiv": - Biso = ConvertToDoubleForCIF(data); - Biso_err = ConvertErrForCIF(data); - break; - - case "_atom_site_thermal_displace_type": - thermalDisplaceType = data; break; + if (label == "_atom_site_fract_x") x = data;// + shift.X; + else if (label == "_atom_site_fract_y") y = data;// + shift.X; + else if (label == "_atom_site_fract_z") z = data;// + shift.X; + else if (label == "_atom_site_occupancy") occ = data; + else if (label == "_atom_site_U_iso_or_equiv") uIso = data; + else if (label == "_atom_site_B_iso_or_equiv") bIso = data; } } + if(shift.X!=0 || shift.Y!=0 || shift.Z!=0) + { + x = Crystal2.Compose(Crystal2.Decompose(x, sgnum).Value + shift.X, Crystal2.Decompose(x, sgnum).Error); + y = Crystal2.Compose(Crystal2.Decompose(y, sgnum).Value + shift.Y, Crystal2.Decompose(y, sgnum).Error); + z = Crystal2.Compose(Crystal2.Decompose(z, sgnum).Value + shift.Z, Crystal2.Decompose(z, sgnum).Error); + } + //次に異方性の温度散乱因子をさがす (等方性の温度因子は既に上のループで読み込まれている) + for (int k = 0; k < CIF.Count; k++) { - if (CIF[k].items.Exists(item => item.label == "_atom_site_aniso_label" && item.data == atomLabel)) + if (CIF[k].Exists(item => item.Label == "_atom_site_aniso_label" && item.Data == atomLabel)) { - for (int l = 0; l < CIF[k].items.Count; l++) + for (int l = 0; l < CIF[k].Count; l++) { - label = CIF[k].items[l].label; - data = CIF[k].items[l].data; - switch (label) + var label = CIF[k][l].Label; + var data = CIF[k][l].Data; + if (data != "?" && data != ".") { - case "_atom_site_aniso_U_11": - u11 = ConvertToDoubleForCIF(data); - u11_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_U_22": - u22 = ConvertToDoubleForCIF(data); - u22_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_U_33": - u33 = ConvertToDoubleForCIF(data); - u33_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_U_12": - u12 = ConvertToDoubleForCIF(data); - u12_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_U_13": - u13 = ConvertToDoubleForCIF(data); - u13_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_U_23": - u23 = ConvertToDoubleForCIF(data); - u23_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_B_11": - b11 = ConvertToDoubleForCIF(data); - b11_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_B_22": - b22 = ConvertToDoubleForCIF(data); - b22_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_B_33": - b33 = ConvertToDoubleForCIF(data); - b33_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_B_12": - b12 = ConvertToDoubleForCIF(data); - b12_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_B_13": - b13 = ConvertToDoubleForCIF(data); - b13_err = ConvertErrForCIF(data); - break; - - case "_atom_site_aniso_B_23": - b23 = ConvertToDoubleForCIF(data); - b23_err = ConvertErrForCIF(data); - break; + if (label == "_atom_site_aniso_U_11") u11 = data; + else if (label == "_atom_site_aniso_U_22") u22 = data; + else if (label == "_atom_site_aniso_U_33") u33 = data; + else if (label == "_atom_site_aniso_U_12") u12 = data; + else if (label == "_atom_site_aniso_U_13") u13 = data; + else if (label == "_atom_site_aniso_U_23") u23 = data; + else if (label == "_atom_site_aniso_B_11") b11 = data; + else if (label == "_atom_site_aniso_B_22") b22 = data; + else if (label == "_atom_site_aniso_B_33") b33 = data; + else if (label == "_atom_site_aniso_B_12") b12 = data; + else if (label == "_atom_site_aniso_B_13") b13 = data; + else if (label == "_atom_site_aniso_B_23") b23 = data; } } break; } } //ラベル名から元素を探す - string temp; int atomicNumber = 0; - string atomName = atomSymbol == "" ? atomLabel : atomSymbol; + var atomName = atomSymbol == "" ? atomLabel : atomSymbol; - //AtomicScatteringFactor asf = new AtomicScatteringFactor(); for (int q = atomName.Length; q > 0 && atomicNumber == 0; q--) { - temp = atomName.Substring(0, q); + var temp = atomName.Substring(0, q); for (int k = 0; k <= 96 && atomicNumber == 0; k++) { - // asf.SetCoefficientForXray(k); if (AtomConstants.AtomicName(k).ToLower() == temp.ToLower()) atomicNumber = k; } @@ -1421,28 +1138,31 @@ Func func(string sExpr) } } - DiffuseScatteringFactor dsf; + //Bタイプが全て ”” だったら、Uタイプと判定 + var isU = bIso == "" && b11 == "" && b12 == "" && b13 == "" && b22 == "" && b23 == "" && b33 == ""; + //非等方性が全て ”” だったら、等方性と判断 + var isIso = isU ? + u11 == "" && u12 == "" && u13 == "" && u22 == "" && u23 == "" && u33 == "": + b11 == "" && b12 == "" && b13 == "" && b22 == "" && b23 == "" && b33 == ""; + + var iso = isU ? uIso : bIso; - if (Uiso == 0 && u11 == 0 && u12 == 0 && u13 == 0 && u22 == 0 && u23 == 0 && u33 == 0)//全てのUがゼロの時は、Bと判定 - dsf = new DiffuseScatteringFactor(b11 == 0 && b12 == 0 && b13 == 0 && b22 == 0 && b23 == 0 && b33 == 0, - Biso, b11, b22, b33, b12, b23, b13, Biso_err, b11_err, b22_err, b33_err, b12_err, b23_err, b13_err); - else//Uの場合 - dsf = new DiffuseScatteringFactor(u11 == 0 && u12 == 0 && u13 == 0 && u22 == 0 && u23 == 0 && u33 == 0, - Uiso, u11, u22, u33, u12, u23, u13, Uiso_err, u11_err, u22_err, u33_err, u12_err, u23_err, u13_err, aStar, bStar, cStar); + if (iso == "") + iso = "0"; + + var aniso = isU ? //11, 22, 33, 12, 23, 31の順番 + new[] { u11,u22,u33,u12,u23,u13}: + new[] { b11, b22, b33, b12, b23, b13 }; if (atomicNumber > 0) - atoms.Add(new Atoms(atomLabel, atomicNumber, 0, 0, null, sgnum, new Vector3D(x, y, z), new Vector3D(x_err, y_err, z_err), occ, occ_err, dsf, null, 0)); + atoms.Add(new Atoms2(atomLabel, atomicNumber, 0, 0, new[] { x, y, z }, occ, isIso, isU, iso, aniso)); else if (atomicNumber == -1)//"OH"のときの対処 { - atomicNumber = 1; - atoms.Add(new Atoms(atomLabel, atomicNumber, 0, 0, null, sgnum, new Vector3D(x, y, z), new Vector3D(x_err, y_err, z_err), occ, occ_err, dsf, null, 0)); - atomicNumber = 8; - atoms.Add(new Atoms(atomLabel, atomicNumber, 0, 0, null, sgnum, new Vector3D(x, y, z), new Vector3D(x_err, y_err, z_err), occ, occ_err, dsf, null, 0)); + atoms.Add(new Atoms2(atomLabel, 1, 0, 0, new[] { x, y, z }, occ, isIso, isU, iso, aniso)); + atoms.Add(new Atoms2(atomLabel, 8, 0, 0, new[] { x, y, z }, occ, isIso, isU, iso, aniso)); } } - - if (journalNameFull != "" || journalCodenASTM != "") journal += journalNameFull + " " + journalCodenASTM; if (issue != "") journal += ", " + issue; if (volume != "") journal += ", " + volume; @@ -1456,29 +1176,19 @@ Func func(string sExpr) var r = new Random(); - Crystal crystal = new Crystal( - (a / 10, b / 10, c / 10, alpha * Math.PI / 180, beta * Math.PI / 180, gamma * Math.PI / 180), - (a_err / 10, b_err / 10, c_err / 10, alpha_err / 10, beta_err / 10, gamma_err / 10), - sgnum, - name, - Color.FromArgb(r.Next(255), r.Next(255), r.Next(255)), - new Matrix3D(), - atoms.ToArray(), - ("", authours, journal, sectionTitle), - null); - - crystal.JournalName = journalNameFull; - crystal.JournalPageFirst = pageFirst; - crystal.JournalPageLast = pageLast; - crystal.JournalVolume = volume; - crystal.JournalYear = year; - crystal.JournalIssue = issue; - - crystal.ChemicalFormulaStructural = chemical_formula_structural; - - SetOpenGL_property(crystal); - - return crystal; + var c2 = new Crystal2 + { + CellTexts = new[] { a, b, c, alpha, beta, gamma }, + sym = (short)sgnum, + name = name, + atoms = atoms, + auth = authours, + jour = journal, + sect = sectionTitle, + argb = Color.FromArgb(r.Next(255), r.Next(255), r.Next(255)).ToArgb() + }; + + return c2; } private static V3 norm(V3 v) @@ -1494,44 +1204,7 @@ private static V3 norm(V3 v) return new V3(d[0],d[1],d[2]); } - private static double ConvertToDoubleForCIF(string x) - { - return ConvertToDoubleForCIF(x, false); - } - - private static double ConvertToDoubleForCIF(string x, bool isHex) - { - if (Miscellaneous.IsDecimalPointComma) - x = x.Replace('.', ','); - - if (x.IndexOf("(") > -1) - x = x.Remove(x.IndexOf("(")); - - double.TryParse(x, out var X); - - return isHex ? ConvertToDoubleForHexagonalSetting(X) : X; - } - - private static double ConvertErrForCIF(string x) - { - if (Miscellaneous.IsDecimalPointComma) - x = x.Replace('.', ','); - - if (x.IndexOf("(") > -1) - { - string y = x.Remove(x.IndexOf("(")); - int n = (y.Length - y.IndexOf(".") - 1); - - x = x.Remove(0, x.IndexOf("(")).Trim('(').Trim(')'); - double.TryParse(x, out var X); - - return Math.Pow(10, -n) * X; - } - else - return 0; - } - - private static int SearchSGseriesNumberForCIF(string SgNameHM, string SgNameHall, int SpaceGroupNumber, double A, double B, double C, double Alfa, double Beta, double Gamma) + private static int SearchSGseriesNumberForCIF(string SgNameHM, string SgNameHall, int SpaceGroupNumber, bool isRhomboShape, bool isAlpha90, bool isBeta90, bool isGamma90) { int symmetrySeriesNumber = -1; if (SgNameHall != "") @@ -1692,111 +1365,111 @@ private static int SearchSGseriesNumberForCIF(string SgNameHM, string SgNameHall else if (temp == "R-32/c") SgNameHM = "R -3 c"; - else if (temp == "P2" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2 1"; - else if (temp == "P2" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2"; - else if (temp == "P2" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2 1 1"; - else if (temp == "P2sub1" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2sub1 1"; - else if (temp == "P2sub1" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2sub1"; - else if (temp == "P2sub1" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2sub1 1 1"; - else if (temp == "C2" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "C 1 2 1"; - else if (temp == "A2" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "A 1 2 1"; - else if (temp == "I2" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "I 1 2 1"; - else if (temp == "A2" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "A 1 1 2"; - else if (temp == "B2" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "B 1 1 2"; - else if (temp == "I2" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "I 1 1 2"; - else if (temp == "B2" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "B 2 1 1"; - else if (temp == "C2" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "C 2 1 1"; - else if (temp == "I2" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "I 2 1 1"; - else if (temp == "Pm" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 m 1"; - else if (temp == "Pm" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 m"; - else if (temp == "Pm" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P m 1 1"; - else if (temp == "Pc" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 c 1"; - else if (temp == "Pn" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 n 1"; - else if (temp == "Pa" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 a 1"; - else if (temp == "Pa" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 a"; - else if (temp == "Pn" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 n"; - else if (temp == "Pb" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 b"; - else if (temp == "Pb" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P b 1 1"; - else if (temp == "Pn" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P n 1 1"; - else if (temp == "Pc" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P c 1 1"; - else if (temp == "Cm" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "C 1 m 1"; - else if (temp == "Am" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "A 1 m 1"; - else if (temp == "Im" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "I 1 m 1"; - else if (temp == "Am" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "A 1 1 m"; - else if (temp == "Bm" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "B 1 1 m"; - else if (temp == "Im" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "I 1 1 m"; - else if (temp == "Bm" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "B m 1 1"; - else if (temp == "Cm" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "C m 1 1"; - else if (temp == "Im" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "I m 1 1"; - else if (temp == "Cc" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "C 1 c 1"; - else if (temp == "An" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "A 1 n 1"; - else if (temp == "Ia" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "I 1 a 1"; - else if (temp == "Aa" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "A 1 a 1"; - else if (temp == "Cn" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "C 1 n 1"; - else if (temp == "Ic" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "I 1 c 1"; - else if (temp == "Aa" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "A 1 1 a"; - else if (temp == "Bn" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "B 1 1 n"; - else if (temp == "Ib" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "I 1 1 b"; - else if (temp == "Bb" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "B 1 1 b"; - else if (temp == "An" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "A 1 1 n"; - else if (temp == "Ia" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "I 1 1 a"; - else if (temp == "Bb" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "B b 1 1"; - else if (temp == "Cn" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "C n 1 1"; - else if (temp == "Ic" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "I c 1 1"; - else if (temp == "Cc" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "C c 1 1"; - else if (temp == "Bn" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "B n 1 1"; - else if (temp == "Ib" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "I b 1 1"; - else if (temp == "P2/m" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2/m 1"; - else if (temp == "P2/m" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2/m"; - else if (temp == "P2/m" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2/m 1 1"; - else if (temp == "P2sub/m" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2sub1/m 1"; - else if (temp == "P2sub/m" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2sub1/m"; - else if (temp == "P2sub/m" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2sub1/m 1 1"; - else if (temp == "C2/m" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "C 1 2/m 1"; - else if (temp == "A2/m" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "A 1 2/m 1"; - else if (temp == "I2/m" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "I 1 2/m 1"; - else if (temp == "A2/m" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "A 1 1 2/m"; - else if (temp == "B2/m" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "B 1 1 2/m"; - else if (temp == "I2/m" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "I 1 1 2/m"; - else if (temp == "B2/m" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "B 2/m 1 1"; - else if (temp == "C2/m" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "C 2/m 1 1"; - else if (temp == "I2/m" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "I 2/m 1 1"; - else if (temp == "P2/c" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2/c 1"; - else if (temp == "P2/n" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2/n 1"; - else if (temp == "P2/a" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2/a 1"; - else if (temp == "P2/a" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2/a"; - else if (temp == "P2/n" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2/n"; - else if (temp == "P2/b" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2/b"; - else if (temp == "P2/b" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2/b 1 1"; - else if (temp == "P2/n" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2/n 1 1"; - else if (temp == "P2/c" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2/c 1 1"; - else if (temp == "P2sub1/c" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2sub1/c 1"; - else if (temp == "P2sub1/n" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2sub1/n 1"; - else if (temp == "P2sub1/a" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "P 1 2sub1/a 1"; - else if (temp == "P2sub1/a" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2sub1/a"; - else if (temp == "P2sub1/n" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2sub1/n"; - else if (temp == "P2sub1/b" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "P 1 1 2sub1/b"; - else if (temp == "P2sub1/b" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2sub1/b 1 1"; - else if (temp == "P2sub1/n" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2sub1/n 1 1"; - else if (temp == "P2sub1/c" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "P 2sub1/c 1 1"; - else if (temp == "C2/c" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "C 1 2/c 1"; - else if (temp == "A2/n" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "A 1 2/n 1"; - else if (temp == "I2/a" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "I 1 2/a 1"; - else if (temp == "A2/a" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "A 1 2/a 1"; - else if (temp == "C2/n" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "C 1 2/n 1"; - else if (temp == "I2/c" && Alfa == 90.0 && Gamma == 90.0) SgNameHM = "I 1 2/c 1"; - else if (temp == "A2/a" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "A 1 1 2/a"; - else if (temp == "B2/n" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "B 1 1 2/n"; - else if (temp == "I2/b" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "I 1 1 2/b"; - else if (temp == "B2/b" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "B 1 1 2/b"; - else if (temp == "A2/n" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "A 1 1 2/n"; - else if (temp == "I2/a" && Alfa == 90.0 && Beta == 90.0) SgNameHM = "I 1 1 2/a"; - else if (temp == "B2/b" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "B 2/b 1 1"; - else if (temp == "C2/n" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "C 2/n 1 1"; - else if (temp == "I2/c" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "I 2/c 1 1"; - else if (temp == "C2/c" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "C 2/c 1 1"; - else if (temp == "B2/n" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "B 2/n 1 1"; - else if (temp == "I2/b" && Beta == 90.0 && Gamma == 90.0) SgNameHM = "I 2/b 1 1"; + else if (temp == "P2" && isAlpha90 && isGamma90) SgNameHM = "P 1 2 1"; + else if (temp == "P2" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2"; + else if (temp == "P2" && isBeta90 && isGamma90) SgNameHM = "P 2 1 1"; + else if (temp == "P2sub1" && isAlpha90 && isGamma90) SgNameHM = "P 1 2sub1 1"; + else if (temp == "P2sub1" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2sub1"; + else if (temp == "P2sub1" && isBeta90 && isGamma90) SgNameHM = "P 2sub1 1 1"; + else if (temp == "C2" && isAlpha90 && isGamma90) SgNameHM = "C 1 2 1"; + else if (temp == "A2" && isAlpha90 && isGamma90) SgNameHM = "A 1 2 1"; + else if (temp == "I2" && isAlpha90 && isGamma90) SgNameHM = "I 1 2 1"; + else if (temp == "A2" && isAlpha90 && isBeta90) SgNameHM = "A 1 1 2"; + else if (temp == "B2" && isAlpha90 && isBeta90) SgNameHM = "B 1 1 2"; + else if (temp == "I2" && isAlpha90 && isBeta90) SgNameHM = "I 1 1 2"; + else if (temp == "B2" && isBeta90 && isGamma90) SgNameHM = "B 2 1 1"; + else if (temp == "C2" && isBeta90 && isGamma90) SgNameHM = "C 2 1 1"; + else if (temp == "I2" && isBeta90 && isGamma90) SgNameHM = "I 2 1 1"; + else if (temp == "Pm" && isAlpha90 && isGamma90) SgNameHM = "P 1 m 1"; + else if (temp == "Pm" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 m"; + else if (temp == "Pm" && isBeta90 && isGamma90) SgNameHM = "P m 1 1"; + else if (temp == "Pc" && isAlpha90 && isGamma90) SgNameHM = "P 1 c 1"; + else if (temp == "Pn" && isAlpha90 && isGamma90) SgNameHM = "P 1 n 1"; + else if (temp == "Pa" && isAlpha90 && isGamma90) SgNameHM = "P 1 a 1"; + else if (temp == "Pa" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 a"; + else if (temp == "Pn" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 n"; + else if (temp == "Pb" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 b"; + else if (temp == "Pb" && isBeta90 && isGamma90) SgNameHM = "P b 1 1"; + else if (temp == "Pn" && isBeta90 && isGamma90) SgNameHM = "P n 1 1"; + else if (temp == "Pc" && isBeta90 && isGamma90) SgNameHM = "P c 1 1"; + else if (temp == "Cm" && isAlpha90 && isGamma90) SgNameHM = "C 1 m 1"; + else if (temp == "Am" && isAlpha90 && isGamma90) SgNameHM = "A 1 m 1"; + else if (temp == "Im" && isAlpha90 && isGamma90) SgNameHM = "I 1 m 1"; + else if (temp == "Am" && isAlpha90 && isBeta90) SgNameHM = "A 1 1 m"; + else if (temp == "Bm" && isAlpha90 && isBeta90) SgNameHM = "B 1 1 m"; + else if (temp == "Im" && isAlpha90 && isBeta90) SgNameHM = "I 1 1 m"; + else if (temp == "Bm" && isBeta90 && isGamma90) SgNameHM = "B m 1 1"; + else if (temp == "Cm" && isBeta90 && isGamma90) SgNameHM = "C m 1 1"; + else if (temp == "Im" && isBeta90 && isGamma90) SgNameHM = "I m 1 1"; + else if (temp == "Cc" && isAlpha90 && isGamma90) SgNameHM = "C 1 c 1"; + else if (temp == "An" && isAlpha90 && isGamma90) SgNameHM = "A 1 n 1"; + else if (temp == "Ia" && isAlpha90 && isGamma90) SgNameHM = "I 1 a 1"; + else if (temp == "Aa" && isAlpha90 && isGamma90) SgNameHM = "A 1 a 1"; + else if (temp == "Cn" && isAlpha90 && isGamma90) SgNameHM = "C 1 n 1"; + else if (temp == "Ic" && isAlpha90 && isGamma90) SgNameHM = "I 1 c 1"; + else if (temp == "Aa" && isAlpha90 && isBeta90) SgNameHM = "A 1 1 a"; + else if (temp == "Bn" && isAlpha90 && isBeta90) SgNameHM = "B 1 1 n"; + else if (temp == "Ib" && isAlpha90 && isBeta90) SgNameHM = "I 1 1 b"; + else if (temp == "Bb" && isAlpha90 && isBeta90) SgNameHM = "B 1 1 b"; + else if (temp == "An" && isAlpha90 && isBeta90) SgNameHM = "A 1 1 n"; + else if (temp == "Ia" && isAlpha90 && isBeta90) SgNameHM = "I 1 1 a"; + else if (temp == "Bb" && isBeta90 && isGamma90) SgNameHM = "B b 1 1"; + else if (temp == "Cn" && isBeta90 && isGamma90) SgNameHM = "C n 1 1"; + else if (temp == "Ic" && isBeta90 && isGamma90) SgNameHM = "I c 1 1"; + else if (temp == "Cc" && isBeta90 && isGamma90) SgNameHM = "C c 1 1"; + else if (temp == "Bn" && isBeta90 && isGamma90) SgNameHM = "B n 1 1"; + else if (temp == "Ib" && isBeta90 && isGamma90) SgNameHM = "I b 1 1"; + else if (temp == "P2/m" && isAlpha90 && isGamma90) SgNameHM = "P 1 2/m 1"; + else if (temp == "P2/m" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2/m"; + else if (temp == "P2/m" && isBeta90 && isGamma90) SgNameHM = "P 2/m 1 1"; + else if (temp == "P2sub/m" && isAlpha90 && isGamma90) SgNameHM = "P 1 2sub1/m 1"; + else if (temp == "P2sub/m" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2sub1/m"; + else if (temp == "P2sub/m" && isBeta90 && isGamma90) SgNameHM = "P 2sub1/m 1 1"; + else if (temp == "C2/m" && isAlpha90 && isGamma90) SgNameHM = "C 1 2/m 1"; + else if (temp == "A2/m" && isAlpha90 && isGamma90) SgNameHM = "A 1 2/m 1"; + else if (temp == "I2/m" && isAlpha90 && isGamma90) SgNameHM = "I 1 2/m 1"; + else if (temp == "A2/m" && isAlpha90 && isBeta90) SgNameHM = "A 1 1 2/m"; + else if (temp == "B2/m" && isAlpha90 && isBeta90) SgNameHM = "B 1 1 2/m"; + else if (temp == "I2/m" && isAlpha90 && isBeta90) SgNameHM = "I 1 1 2/m"; + else if (temp == "B2/m" && isBeta90 && isGamma90) SgNameHM = "B 2/m 1 1"; + else if (temp == "C2/m" && isBeta90 && isGamma90) SgNameHM = "C 2/m 1 1"; + else if (temp == "I2/m" && isBeta90 && isGamma90) SgNameHM = "I 2/m 1 1"; + else if (temp == "P2/c" && isAlpha90 && isGamma90) SgNameHM = "P 1 2/c 1"; + else if (temp == "P2/n" && isAlpha90 && isGamma90) SgNameHM = "P 1 2/n 1"; + else if (temp == "P2/a" && isAlpha90 && isGamma90) SgNameHM = "P 1 2/a 1"; + else if (temp == "P2/a" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2/a"; + else if (temp == "P2/n" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2/n"; + else if (temp == "P2/b" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2/b"; + else if (temp == "P2/b" && isBeta90 && isGamma90) SgNameHM = "P 2/b 1 1"; + else if (temp == "P2/n" && isBeta90 && isGamma90) SgNameHM = "P 2/n 1 1"; + else if (temp == "P2/c" && isBeta90 && isGamma90) SgNameHM = "P 2/c 1 1"; + else if (temp == "P2sub1/c" && isAlpha90 && isGamma90) SgNameHM = "P 1 2sub1/c 1"; + else if (temp == "P2sub1/n" && isAlpha90 && isGamma90) SgNameHM = "P 1 2sub1/n 1"; + else if (temp == "P2sub1/a" && isAlpha90 && isGamma90) SgNameHM = "P 1 2sub1/a 1"; + else if (temp == "P2sub1/a" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2sub1/a"; + else if (temp == "P2sub1/n" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2sub1/n"; + else if (temp == "P2sub1/b" && isAlpha90 && isBeta90) SgNameHM = "P 1 1 2sub1/b"; + else if (temp == "P2sub1/b" && isBeta90 && isGamma90) SgNameHM = "P 2sub1/b 1 1"; + else if (temp == "P2sub1/n" && isBeta90 && isGamma90) SgNameHM = "P 2sub1/n 1 1"; + else if (temp == "P2sub1/c" && isBeta90 && isGamma90) SgNameHM = "P 2sub1/c 1 1"; + else if (temp == "C2/c" && isAlpha90 && isGamma90) SgNameHM = "C 1 2/c 1"; + else if (temp == "A2/n" && isAlpha90 && isGamma90) SgNameHM = "A 1 2/n 1"; + else if (temp == "I2/a" && isAlpha90 && isGamma90) SgNameHM = "I 1 2/a 1"; + else if (temp == "A2/a" && isAlpha90 && isGamma90) SgNameHM = "A 1 2/a 1"; + else if (temp == "C2/n" && isAlpha90 && isGamma90) SgNameHM = "C 1 2/n 1"; + else if (temp == "I2/c" && isAlpha90 && isGamma90) SgNameHM = "I 1 2/c 1"; + else if (temp == "A2/a" && isAlpha90 && isBeta90) SgNameHM = "A 1 1 2/a"; + else if (temp == "B2/n" && isAlpha90 && isBeta90) SgNameHM = "B 1 1 2/n"; + else if (temp == "I2/b" && isAlpha90 && isBeta90) SgNameHM = "I 1 1 2/b"; + else if (temp == "B2/b" && isAlpha90 && isBeta90) SgNameHM = "B 1 1 2/b"; + else if (temp == "A2/n" && isAlpha90 && isBeta90) SgNameHM = "A 1 1 2/n"; + else if (temp == "I2/a" && isAlpha90 && isBeta90) SgNameHM = "I 1 1 2/a"; + else if (temp == "B2/b" && isBeta90 && isGamma90) SgNameHM = "B 2/b 1 1"; + else if (temp == "C2/n" && isBeta90 && isGamma90) SgNameHM = "C 2/n 1 1"; + else if (temp == "I2/c" && isBeta90 && isGamma90) SgNameHM = "I 2/c 1 1"; + else if (temp == "C2/c" && isBeta90 && isGamma90) SgNameHM = "C 2/c 1 1"; + else if (temp == "B2/n" && isBeta90 && isGamma90) SgNameHM = "B 2/n 1 1"; + else if (temp == "I2/b" && isBeta90 && isGamma90) SgNameHM = "I 2/b 1 1"; #endregion //文字列を含んでいて、かつ、文字数が少ない空間群を選択する (C1とC121などを見分けるため) @@ -1826,7 +1499,7 @@ private static int SearchSGseriesNumberForCIF(string SgNameHM, string SgNameHall } //Rhombohedoralのときの処置 - if (A == B && B == C && Alfa == Beta && Beta == Gamma && SymmetryStatic.Get_Symmetry(symmetrySeriesNumber).SpaceGroupHMStr.IndexOf("Hex") >= 0) + if (isRhomboShape && SymmetryStatic.Get_Symmetry(symmetrySeriesNumber).SpaceGroupHMStr.IndexOf("Hex") >= 0) symmetrySeriesNumber++; //originChoiceが2のときの対処 @@ -1845,47 +1518,14 @@ private static int SearchSGseriesNumberForCIF(string SgNameHM, string SgNameHall return symmetrySeriesNumber; } - public struct CIF_Item - { - public string label; - public string data; - public CIF_Item(string Label, string Data) - { - label = Label; - data = Data; - } - } + #endregion - public struct CIF_Group - { - public List items; - - public void AddItem(CIF_Item item) - { - items.Add(item); - } - } - -#endregion - - - public static double ConvertToDoubleForHexagonalSetting(double x) - { - if (Math.Abs(x - 1.0 / 12.0) < 0.001) return 1.0 / 12.0; - else if (Math.Abs(x - 1.0 / 6.0) < 0.001) return 1.0 / 6.0; - else if (Math.Abs(x - 1.0 / 3.0) < 0.001) return 1.0 / 3.0; - else if (Math.Abs(x - 5.0 / 12.0) < 0.001) return 5.0 / 12.0; - else if (Math.Abs(x - 7.0 / 12.0) < 0.001) return 7.0 / 12.0; - else if (Math.Abs(x - 2.0 / 3.0) < 0.001) return 2.0 / 3.0; - else if (Math.Abs(x - 5.0 / 6.0) < 0.001) return 5.0 / 6.0; - else if (Math.Abs(x - 11.0 / 12.0) < 0.001) return 11.0 / 12.0; - else return x; - } + #region CIファイルへの変換 public static string ConvertToCIF(Crystal crystal) { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.AppendLine("# This file is exported from \"" + System.Diagnostics.Process.GetCurrentProcess().ProcessName + "\""); sb.AppendLine("# http://pmsl.planet.sci.kobe-u.ac.jp/~seto"); @@ -1899,7 +1539,7 @@ public static string ConvertToCIF(Crystal crystal) sb.AppendLine("_journal_name '" + crystal.Journal + "'"); -#region 論文タイトル + #region 論文タイトル sb.AppendLine("_publ_section_title"); sb.AppendLine(";"); string title = ""; @@ -1915,7 +1555,7 @@ public static string ConvertToCIF(Crystal crystal) if (title != "") sb.AppendLine(title); sb.AppendLine(";"); -#endregion + #endregion sb.AppendLine("_chemical_formula_sum '" + crystal.ChemicalFormulaSum + "'"); sb.AppendLine("_cell_length_a " + (crystal.A * 10).ToString("f6")); @@ -1936,7 +1576,7 @@ public static string ConvertToCIF(Crystal crystal) sb.AppendLine("_symmetry_space_group_name_H-M '" + hm + "'"); sb.AppendLine("_symmetry_space_group_name_Hall '" + sym.SpaceGroupHallStr + "'"); -#region 原子の等価位置 + #region 原子の等価位置 sb.AppendLine("loop_"); sb.AppendLine("_symmetry_equiv_pos_as_xyz"); bool[][] flag = new bool[0][]; @@ -1970,7 +1610,7 @@ public static string ConvertToCIF(Crystal crystal) else//R格子のHexaセッティングのとき { sb.AppendLine(" '" + wp + "'");//(0,0,0) - //(1/3,2/3,2/3) + //(1/3,2/3,2/3) string[] xyz = wp.Split(new char[] { ',' }); xyz[0] += "+1/3"; xyz[1] += "+2/3"; @@ -1986,9 +1626,9 @@ public static string ConvertToCIF(Crystal crystal) sb.AppendLine(" '" + xyz[0] + "," + xyz[1] + "," + xyz[2] + "'"); } } -#endregion + #endregion -#region 各原子の情報 + #region 各原子の情報 sb.AppendLine("loop_"); sb.AppendLine("_atom_site_label"); sb.AppendLine("_atom_site_type_symbol"); @@ -2021,20 +1661,144 @@ public static string ConvertToCIF(Crystal crystal) sb.AppendLine("_atom_site_aniso_U_12"); foreach (Atoms atom in crystal.Atoms) { - if (!atom.Dsf.IsIso) + if (!atom.Dsf.UseIso) sb.AppendLine(atom.Label + " " + - (atom.Dsf.B11 / 2 / pi2 / aStar / aStar).ToString("f5") + " " + - (atom.Dsf.B22 / 2 / pi2 / bStar / bStar).ToString("f5") + " " + - (atom.Dsf.B33 / 2 / pi2 / cStar / cStar).ToString("f5") + " " + - (atom.Dsf.B23 / 2 / pi2 / bStar / cStar).ToString("f5") + " " + - (atom.Dsf.B31 / 2 / pi2 / cStar / aStar).ToString("f5") + " " + - (atom.Dsf.B12 / 2 / pi2 / aStar / bStar).ToString("f5") + (atom.Dsf.U11).ToString("f5") + " " + + (atom.Dsf.U22).ToString("f5") + " " + + (atom.Dsf.U33).ToString("f5") + " " + + (atom.Dsf.U23).ToString("f5") + " " + + (atom.Dsf.U31).ToString("f5") + " " + + (atom.Dsf.U12).ToString("f5") ); } } -#endregion + #endregion return sb.ToString(); } + #endregion + + #region OpenGLのためのBond設定 + public static void SetOpenGL_property(Crystal c) + { + foreach (Atoms a in c.Atoms) + a.ResetVesta(); + c.Bonds = Bonds.GetVestaBonds(c.Atoms.Select(a => a.ElementName).Distinct()); + + #region お蔵入り + /* + //先ず原子の色、半径を設定 + foreach (Atoms a in c.Atoms) + { + switch (a.ElementName) + { +#region イオン半径、色を設定 + case "1: H": a.Radius = 0.005f; a.Argb = Color.FromArgb(98, 11, 181).ToArgb(); break; + case "2: He": a.Radius = 0.05f; a.Argb = Color.FromArgb(137, 250, 106).ToArgb(); break; + case "3: Li": a.Radius = 0.38f; a.Argb = Color.FromArgb(43, 200, 157).ToArgb(); break; + case "4: Be": a.Radius = 0.135f; a.Argb = Color.FromArgb(161, 34, 128).ToArgb(); break; + case "5: B": a.Radius = 0.055f; a.Argb = Color.FromArgb(249, 251, 174).ToArgb(); break; + case "6: C": a.Radius = 0.075f; a.Argb = Color.FromArgb(211, 45, 173).ToArgb(); break; + case "7: N": a.Radius = 0.08f; a.Argb = Color.FromArgb(248, 240, 241).ToArgb(); break; + case "8: O": a.Radius = 0.71f; a.Argb = Color.FromArgb(255, 0, 0).ToArgb(); break; + case "9: F": a.Radius = 0.665f; a.Argb = Color.FromArgb(153, 165, 227).ToArgb(); break; + case "10: Ne": a.Radius = 0.005f; a.Argb = Color.FromArgb(65, 223, 157).ToArgb(); break; + case "11: Na": a.Radius = 0.59f; a.Argb = Color.FromArgb(187, 195, 36).ToArgb(); break; + case "12: Mg": a.Radius = 0.445f; a.Argb = Color.FromArgb(193, 162, 107).ToArgb(); break; + case "13: Al": a.Radius = 0.195f; a.Argb = Color.FromArgb(153, 46, 158).ToArgb(); break; + case "14: Si": a.Radius = 0.20f; a.Argb = Color.FromArgb(0, 0, 255).ToArgb(); break; + case "15: P": a.Radius = 0.145f; a.Argb = Color.FromArgb(101, 199, 183).ToArgb(); break; + case "16: S": a.Radius = 0.92f; a.Argb = Color.FromArgb(87, 191, 62).ToArgb(); break; + case "17: Cl": a.Radius = 0.905f; a.Argb = Color.FromArgb(23, 36, 16).ToArgb(); break; + case "18: Ar": a.Radius = 0.05f; a.Argb = Color.FromArgb(203, 82, 236).ToArgb(); break; + case "19: K": a.Radius = 0.755f; a.Argb = Color.FromArgb(216, 96, 67).ToArgb(); break; + case "20: Ca": a.Radius = 0.56f; a.Argb = Color.FromArgb(35, 159, 207).ToArgb(); break; + case "21: Sc": a.Radius = 0.435f; a.Argb = Color.FromArgb(165, 191, 130).ToArgb(); break; + case "22: Ti": a.Radius = 0.25f; a.Argb = Color.FromArgb(64, 112, 111).ToArgb(); break; + case "23: V": a.Radius = 0.29f; a.Argb = Color.FromArgb(158, 54, 69).ToArgb(); break; + case "24: Cr": a.Radius = 0.3075f; a.Argb = Color.FromArgb(43, 48, 188).ToArgb(); break; + case "25: Mn": a.Radius = 0.29f; a.Argb = Color.FromArgb(69, 122, 233).ToArgb(); break; + case "26: Fe": a.Radius = 0.400f; a.Argb = Color.FromArgb(23, 239, 57).ToArgb(); break; + case "27: Co": a.Radius = 0.305f; a.Argb = Color.FromArgb(119, 8, 111).ToArgb(); break; + case "28: Ni": a.Radius = 0.3f; a.Argb = Color.FromArgb(190, 121, 182).ToArgb(); break; + case "29: Cu": a.Radius = 0.285f; a.Argb = Color.FromArgb(215, 226, 61).ToArgb(); break; + case "30: Zn": a.Radius = 0.37f; a.Argb = Color.FromArgb(122, 74, 64).ToArgb(); break; + case "31: Ga": a.Radius = 0.31f; a.Argb = Color.FromArgb(22, 97, 30).ToArgb(); break; + case "32: Ge": a.Radius = 0.265f; a.Argb = Color.FromArgb(60, 177, 233).ToArgb(); break; + case "33: As": a.Radius = 0.23f; a.Argb = Color.FromArgb(159, 16, 53).ToArgb(); break; + case "34: Se": a.Radius = 0.99f; a.Argb = Color.FromArgb(250, 56, 55).ToArgb(); break; + case "35: Br": a.Radius = 0.98f; a.Argb = Color.FromArgb(221, 111, 159).ToArgb(); break; + case "36: Kr": a.Radius = 0.05f; a.Argb = Color.FromArgb(225, 104, 113).ToArgb(); break; + case "37: Rb": a.Radius = 0.805f; a.Argb = Color.FromArgb(51, 135, 205).ToArgb(); break; + case "38: Sr": a.Radius = 0.63f; a.Argb = Color.FromArgb(158, 31, 36).ToArgb(); break; + case "39: Y": a.Radius = 0.45f; a.Argb = Color.FromArgb(131, 105, 94).ToArgb(); break; + case "40: Zr": a.Radius = 0.36f; a.Argb = Color.FromArgb(237, 15, 134).ToArgb(); break; + case "41: Nb": a.Radius = 0.32f; a.Argb = Color.FromArgb(236, 148, 12).ToArgb(); break; + case "42: Mo": a.Radius = 0.295f; a.Argb = Color.FromArgb(246, 92, 178).ToArgb(); break; + case "43: Tc": a.Radius = 0.3f; a.Argb = Color.FromArgb(103, 200, 138).ToArgb(); break; + case "44: Ru": a.Radius = 0.18f; a.Argb = Color.FromArgb(227, 4, 84).ToArgb(); break; + case "45: Rh": a.Radius = 0.275f; a.Argb = Color.FromArgb(191, 235, 99).ToArgb(); break; + case "46: Pd": a.Radius = 0.3075f; a.Argb = Color.FromArgb(150, 156, 76).ToArgb(); break; + case "47: Ag": a.Radius = 0.47f; a.Argb = Color.FromArgb(55, 51, 185).ToArgb(); break; + case "48: Cd": a.Radius = 0.475f; a.Argb = Color.FromArgb(84, 100, 150).ToArgb(); break; + case "49: In": a.Radius = 0.4f; a.Argb = Color.FromArgb(47, 80, 243).ToArgb(); break; + case "50: Sn": a.Radius = 0.345f; a.Argb = Color.FromArgb(180, 73, 238).ToArgb(); break; + case "51: Sb": a.Radius = 0.38f; a.Argb = Color.FromArgb(210, 79, 249).ToArgb(); break; + case "52: Te": a.Radius = 0.485f; a.Argb = Color.FromArgb(92, 27, 100).ToArgb(); break; + case "53: I": a.Radius = 1.1f; a.Argb = Color.FromArgb(224, 110, 46).ToArgb(); break; + case "54: Xe": a.Radius = 0.2f; a.Argb = Color.FromArgb(169, 220, 216).ToArgb(); break; + case "55: Cs": a.Radius = 0.87f; a.Argb = Color.FromArgb(244, 226, 13).ToArgb(); break; + case "56: Ba": a.Radius = 0.71f; a.Argb = Color.FromArgb(177, 2, 109).ToArgb(); break; + case "57: La": a.Radius = 0.58f; a.Argb = Color.FromArgb(194, 79, 196).ToArgb(); break; + case "58: Ce": a.Radius = 0.5715f; a.Argb = Color.FromArgb(88, 221, 142).ToArgb(); break; + case "59: Pr": a.Radius = 0.563f; a.Argb = Color.FromArgb(247, 156, 100).ToArgb(); break; + case "60: Nd": a.Radius = 0.4915f; a.Argb = Color.FromArgb(252, 189, 121).ToArgb(); break; + case "61: Pm": a.Radius = 0.5465f; a.Argb = Color.FromArgb(209, 104, 146).ToArgb(); break; + case "62: Sm": a.Radius = 0.479f; a.Argb = Color.FromArgb(133, 7, 117).ToArgb(); break; + case "63: Eu": a.Radius = 0.625f; a.Argb = Color.FromArgb(226, 218, 141).ToArgb(); break; + case "64: Gd": a.Radius = 0.5265f; a.Argb = Color.FromArgb(26, 83, 227).ToArgb(); break; + case "65: Tb": a.Radius = 0.52f; a.Argb = Color.FromArgb(160, 216, 140).ToArgb(); break; + case "66: Dy": a.Radius = 0.485f; a.Argb = Color.FromArgb(13, 71, 184).ToArgb(); break; + case "67: Ho": a.Radius = 0.5075f; a.Argb = Color.FromArgb(104, 109, 153).ToArgb(); break; + case "68: Er": a.Radius = 0.502f; a.Argb = Color.FromArgb(21, 168, 23).ToArgb(); break; + case "69: Tm": a.Radius = 0.497f; a.Argb = Color.FromArgb(221, 220, 184).ToArgb(); break; + case "70: Yb": a.Radius = 0.434f; a.Argb = Color.FromArgb(23, 151, 178).ToArgb(); break; + case "71: Lu": a.Radius = 0.4305f; a.Argb = Color.FromArgb(108, 190, 142).ToArgb(); break; + case "72: Hf": a.Radius = 0.355f; a.Argb = Color.FromArgb(84, 253, 37).ToArgb(); break; + case "73: Ta": a.Radius = 0.34f; a.Argb = Color.FromArgb(160, 247, 238).ToArgb(); break; + case "74: W": a.Radius = 0.21f; a.Argb = Color.FromArgb(4, 203, 171).ToArgb(); break; + case "75: Re": a.Radius = 0.275f; a.Argb = Color.FromArgb(87, 31, 14).ToArgb(); break; + case "76: Os": a.Radius = 0.245f; a.Argb = Color.FromArgb(218, 170, 3).ToArgb(); break; + case "77: Ir": a.Radius = 0.3125f; a.Argb = Color.FromArgb(245, 219, 180).ToArgb(); break; + case "78: Pt": a.Radius = 0.3125f; a.Argb = Color.FromArgb(43, 17, 113).ToArgb(); break; + case "79: Au": a.Radius = 0.425f; a.Argb = Color.FromArgb(77, 63, 211).ToArgb(); break; + case "80: Hg": a.Radius = 0.48f; a.Argb = Color.FromArgb(62, 50, 156).ToArgb(); break; + case "81: Tl": a.Radius = 0.375f; a.Argb = Color.FromArgb(80, 119, 140).ToArgb(); break; + case "82: Pb": a.Radius = 0.645f; a.Argb = Color.FromArgb(243, 58, 152).ToArgb(); break; + case "83: Bi": a.Radius = 0.515f; a.Argb = Color.FromArgb(123, 248, 40).ToArgb(); break; + case "84: Po": a.Radius = 0.335f; a.Argb = Color.FromArgb(213, 176, 49).ToArgb(); break; + case "85: At": a.Radius = 0.31f; a.Argb = Color.FromArgb(230, 228, 32).ToArgb(); break; + case "86: Rn": a.Radius = 0.05f; a.Argb = Color.FromArgb(115, 62, 60).ToArgb(); break; + case "87: Fr": a.Radius = 0.9f; a.Argb = Color.FromArgb(155, 85, 177).ToArgb(); break; + case "88: Ra": a.Radius = 0.85f; a.Argb = Color.FromArgb(199, 47, 152).ToArgb(); break; + case "89: Ac": a.Radius = 0.56f; a.Argb = Color.FromArgb(214, 227, 230).ToArgb(); break; + case "90: Th": a.Radius = 0.525f; a.Argb = Color.FromArgb(153, 241, 22).ToArgb(); break; + case "91: Pa": a.Radius = 0.45f; a.Argb = Color.FromArgb(80, 156, 227).ToArgb(); break; + case "92: U": a.Radius = 0.365f; a.Argb = Color.FromArgb(44, 59, 209).ToArgb(); break; + case "93: Np": a.Radius = 0.49f; a.Argb = Color.FromArgb(10, 253, 55).ToArgb(); break; + case "94: Pu": a.Radius = 0.48f; a.Argb = Color.FromArgb(95, 160, 240).ToArgb(); break; + case "95: Am": a.Radius = 0.425f; a.Argb = Color.FromArgb(252, 12, 39).ToArgb(); break; + case "96: Cm": a.Radius = 0.425f; a.Argb = Color.FromArgb(217, 174, 152).ToArgb(); break; + case "97: Bk": a.Radius = 0.415f; a.Argb = Color.FromArgb(54, 244, 120).ToArgb(); break; + case "98: Cf": a.Radius = 0.4105f; a.Argb = Color.FromArgb(161, 45, 164).ToArgb(); break; +#endregion イオン半径、色を設定 + } + if (!elementList.Contains(a.ElementName)) + elementList.Add(a.ElementName); + } + */ + #endregion + } + #endregion } } \ No newline at end of file diff --git a/Crystallography/Crystal.cs b/Crystallography/Crystal.cs index 4c2d9e8..913df2e 100644 --- a/Crystallography/Crystal.cs +++ b/Crystallography/Crystal.cs @@ -364,6 +364,8 @@ public bool Equals(Crystal o) public int id = 0; + public (double A, double B, double C, double Alpha, double Beta, double Gamma) CellValue => (A, B, C, Alpha, Beta, Gamma); + #endregion プロパティ、フィールド #region コンストラクタ @@ -719,7 +721,7 @@ public void SetVectorOfAxis(int uMax, int vMax, int wMax) for (int u = -uMax; u <= uMax; u++) for (int v = -vMax; v <= vMax; v++) for (int w = -wMax; w <= wMax; w++) - if (Crystal.CheckIrreducible(u, v, w) && !(u * v == 0 && v * w == 0 && w * u == 0)) + if (CheckIrreducible(u, v, w) && !(u * v == 0 && v * w == 0 && w * u == 0)) { vec = u * A_Axis + v * B_Axis + w * C_Axis; vec.Index = $"[{u}{v}{w}]"; @@ -984,8 +986,6 @@ public void SetPlanes() #region 逆格子ベクトルの計算 - private readonly object lockThis = new object(); - /// /// dMin以上、dMax以下の範囲で逆格子ベクトルを計算し、wavesorceに従って、構造因子を計算 /// @@ -1426,7 +1426,7 @@ private Complex GetStructureFactor(WaveSource wave, Atoms[] atomsArray, int h, i _ => 0, }; - if (atoms.Dsf.IsIso) + if (atoms.Dsf.UseIso) { var T = Math.Exp(-atoms.Dsf.Biso * s2); foreach (var atom in atoms.Atom) @@ -1437,7 +1437,8 @@ private Complex GetStructureFactor(WaveSource wave, Atoms[] atomsArray, int h, i foreach (var atom in atoms.Atom) { var (H, K, L) = atom.Operation.ConvertPlaneIndex(h, k, l); - var T = Math.Exp(-(atoms.Dsf.B11 * H * H + atoms.Dsf.B22 * K * K + atoms.Dsf.B33 * L * L + 2 * atoms.Dsf.B12 * H * K + 2 * atoms.Dsf.B23 * K * L + 2 * atoms.Dsf.B31 * L * H)); + var T = Math.Exp(-(atoms.Dsf.B11 * H * H + atoms.Dsf.B22 * K * K + atoms.Dsf.B33 * L * L + + 2 * atoms.Dsf.B12 * H * K + 2 * atoms.Dsf.B23 * K * L + 2 * atoms.Dsf.B31 * L * H)); F += f * T * Complex.Exp(-TwoPiI * (h * atom.X + k * atom.Y + l * atom.Z)) ; } } diff --git a/Crystallography/CrystalMinimum.cs b/Crystallography/CrystalMinimum.cs index 37b4b2c..2cc7525 100644 --- a/Crystallography/CrystalMinimum.cs +++ b/Crystallography/CrystalMinimum.cs @@ -1,27 +1,18 @@ using System; using System.Collections.Generic; +using System.ComponentModel.Design.Serialization; using System.Linq; +using System.Runtime.Remoting.Messaging; +using System.Text; +using System.Windows.Forms; +using MathNet.Numerics; +using MathNet.Numerics.Integration; //using ProtoBuf; using MessagePack; namespace Crystallography { - //Saveのために必要最小限の情報だけを保存するクラス - //[ProtoContract] - [Serializable()] - [MessagePackObject] - public class Crystal2Array - { - [Key(0)] - public Crystal2[] Array; - - public Crystal2Array(Crystal2[] array) - { - Array = array; - } - } - //必要最小限の情報だけを保存するクラス //[ProtoContract] [Serializable()] @@ -29,21 +20,11 @@ public Crystal2Array(Crystal2[] array) public class Crystal2 { [Key(0)] - public double a; - [Key(1)] - public double b; - [Key(2)] - public double c; - [Key(3)] - public double alpha; - [Key(4)] - public double beta; - [Key(5)] - public double gamma; + private byte[][] cellBytes; [Key(6)] public int argb; [Key(7)] - public double density; + public float density; [Key(8)] public string name; [Key(9)] @@ -57,40 +38,103 @@ public class Crystal2 [Key(13)] public string formula;//計算可能な場合は。 [Key(14)] - public Int16 sym; + public short sym; [Key(15)] public List atoms; - //[Key(16)] - //public List bonds; [Key(17)] - public double[] d;//強度8位までのd値 + public float[] d;//強度8位までのd値 [Key(18)] public string fileName; + /// + /// a,b,c,alpha,beta,gammaの順番. 単位はAと度. エラーは 「9.726(5)」のような形式で表現 + /// + [IgnoreMember] + public string[] CellTexts + { + get => cellBytes == null ? null : Array.ConvertAll(cellBytes, ToString); + set + { + if (value != null) + cellBytes = Array.ConvertAll(value, ToBytes); + } + } + + /// + /// a,b,c,α,β,γ の順番. Getのみ. 長さはA, 角度は度単位. + /// + [IgnoreMember] + public ((double A, double B, double C, double Alpha, double Beta, double Gamma) Values, (double A, double B, double C, double Alpha, double Beta, double Gamma) Errors) Cell + { + get + { + var c = Array.ConvertAll(CellTexts, Decompose2); + return ((c[0].Value, c[1].Value, c[2].Value, c[3].Value, c[4].Value, c[5].Value), + (c[0].Error, c[1].Error, c[2].Error, c[3].Error, c[4].Error, c[5].Error)); + } + } + + /// + /// a,b,c,α,β,γ の順番. Getのみ. 長さはnm, 角度はradian. + /// + [IgnoreMember] + public ((double A, double B, double C, double Alpha, double Beta, double Gamma) Values, (double A, double B, double C, double Alpha, double Beta, double Gamma) Errors) Cell_nm_radian + { + get + { + var (Values, Errors) = Cell; + return ((Values.A / 10, Values.B / 10, Values.C / 10, Values.Alpha / 180 * Math.PI, Values.Beta / 180 * Math.PI, Values.Gamma / 180 * Math.PI), + (Errors.A / 10, Errors.B / 10, Errors.C / 10, Errors.Alpha / 180 * Math.PI, Errors.Beta / 180 * Math.PI, Errors.Gamma / 180 * Math.PI)); + } + } + public Crystal2() { atoms = new List(); - //bonds = new List(); } + public Crystal ToCrystal() => GetCrystal(this); + public static Crystal GetCrystal(Crystal2 c) { - var atom = new List(); + if(c==null) + return null; + + var cell = c.Cell_nm_radian; + + var atom = new List(); foreach (Atoms2 a in c.atoms) { - double[] X_err = a.X_err != null ? new double[] { a.X_err[0], a.X_err[1], a.X_err[2] } : new double[] { 0, 0, 0 }; - double[] Occ = a.Occ.Length == 2 ? new double[] { a.Occ[0], a.Occ[1] } : new double[] { a.Occ[0], 0 }; - atom.Add(new Atoms(a.Label, a.AtomNo, a.SubXray, a.SubElectron, a.Isotope, c.sym, - new Vector3D(a.X[0], a.X[1], a.X[2], false), new Vector3D(X_err[0], X_err[1], X_err[2]), Occ[0], Occ[1], - new DiffuseScatteringFactor(a.IsIso, a.Biso, a.Baniso))); + var pos = a.PositionTexts.Select(x => Decompose(x, c.sym)).ToArray(); + var occ = Decompose(a.OccText); + + var iso = Decompose(a.IsoText); + //Atoms2の単位はA^2なので、nm^2に変換 + iso = (iso.Value / 100, double.IsNaN(iso.Error) ? iso.Error : iso.Error / 100); + + (double Value, double Error)[] aniso = a.AnisoTexts != null ? a.AnisoTexts.Select(x => Decompose(x)).ToArray() : + new[] { (0.0, double.NaN), (0.0, double.NaN), (0.0, double.NaN), (0.0, double.NaN), (0.0, double.NaN), (0.0, double.NaN) }; + var anisoValues = a.IsU ? aniso.Select(an => an.Value / 100).ToArray() : aniso.Select(an => an.Value).ToArray(); + var anisoErrors = a.IsU ? aniso.Select(an => an.Error / 100).ToArray() : aniso.Select(an => an.Error).ToArray(); + + atom.Add( + new Atoms( + a.Label, a.AtomNo, a.SubXray, a.SubElectron, null, c.sym, + new Vector3D(pos[0].Value, pos[1].Value, pos[2].Value, false), + new Vector3D(pos[0].Error, pos[1].Error, pos[2].Error, false), + occ.Value, occ.Error, + new DiffuseScatteringFactor(a.IsU ? DiffuseScatteringFactor.Type.U : DiffuseScatteringFactor.Type.B, a.IsIso, + iso.Value, iso.Error, anisoValues, anisoErrors, cell.Values) + ) + ); atom[atom.Count - 1].ResetVesta(); } var bonds = Bonds.GetVestaBonds(atom.Select(a => a.AtomicNumber)); + - Crystal crystal = new Crystal( - (c.a, c.b, c.c, c.alpha, c.beta, c.gamma), null, + var crystal = new Crystal(cell.Values, cell.Errors, c.sym, c.name, System.Drawing.Color.FromArgb(c.argb), new Matrix3D(), atom.ToArray(), (c.note, c.auth, GetFullJournal(c.jour), GetFullTitle(c.sect)), bonds); @@ -102,12 +146,6 @@ public static Crystal2 FromCrystal(Crystal c) if (c == null) return null; Crystal2 c2 = new Crystal2 { - a = c.A, - b = c.B, - c = c.C, - alpha = c.Alpha, - beta = c.Beta, - gamma = c.Gamma, sym = (short)c.SymmetrySeriesNumber, name = c.Name, note = c.Note, @@ -116,17 +154,45 @@ public static Crystal2 FromCrystal(Crystal c) sect = GetShortTitle(c.PublSectionTitle), jour = GetShortJournal(c.Journal), formula = c.ChemicalFormulaSum, - density = c.Density + density = (float)c.Density }; - try { c2.d = c.GetDspacingList(0.1, 0.1); } - catch { return null; } + c2.CellTexts = new[] { + Compose(c.A * 10, c.A_err * 10), Compose(c.B * 10, c.B_err * 10), Compose(c.C * 10, c.C_err * 10), + Compose(c.Alpha /Math.PI*180, c.Alpha_err/Math.PI*180), Compose(c.Beta /Math.PI*180, c.Beta_err/Math.PI*180), Compose(c.Gamma /Math.PI*180, c.Gamma_err/Math.PI*180) }; c2.atoms = new List(); foreach (Atoms a in c.Atoms) - c2.atoms.Add(new Atoms2(a.Label, a.AtomicNumber, a.SubNumberXray, a.SubNumberElectron, - new Vector3D(a.X, a.Y, a.Z, false), new Vector3D(a.X_err, a.Y_err, a.Z_err), a.Occ, a.Occ_err, a.Dsf)); + { + var atom2 = new Atoms2 + { + Label = a.Label, + AtomNo = (byte)a.AtomicNumber, + SubXray = (byte)a.SubNumberXray, + SubElectron = (byte)a.SubNumberElectron, + PositionTexts = new[] { Compose(a.X, a.X_err), Compose(a.Y, a.Y_err), Compose(a.Z, a.Z_err) }, + OccText = Compose(a.Occ, a.Occ_err), + IsIso = a.Dsf.UseIso, + IsU = a.Dsf.OriginalType == DiffuseScatteringFactor.Type.U, + IsoText = Compose(a.Dsf.Iso * 100, a.Dsf.Iso_err * 100), + }; + + atom2.AnisoTexts = atom2.IsU ? + new[] { Compose(a.Dsf.Aniso11*100, a.Dsf.Aniso11_err*100), + Compose(a.Dsf.Aniso22*100, a.Dsf.Aniso22_err*100), + Compose(a.Dsf.Aniso33*100, a.Dsf.Aniso33_err*100), + Compose(a.Dsf.Aniso12*100, a.Dsf.Aniso12_err*100), + Compose(a.Dsf.Aniso23*100, a.Dsf.Aniso23_err*100), + Compose(a.Dsf.Aniso31*100, a.Dsf.Aniso31_err*100)} : + new[] { Compose(a.Dsf.Aniso11, a.Dsf.Aniso11_err), + Compose(a.Dsf.Aniso22, a.Dsf.Aniso22_err), + Compose(a.Dsf.Aniso33, a.Dsf.Aniso33_err), + Compose(a.Dsf.Aniso12, a.Dsf.Aniso12_err), + Compose(a.Dsf.Aniso23, a.Dsf.Aniso23_err), + Compose(a.Dsf.Aniso31, a.Dsf.Aniso31_err)}; + c2.atoms.Add(atom2); + } return c2; } @@ -177,6 +243,14 @@ public static string GetFullJournal(string shortJournal) case "##37": journal = "Comptes Rendus Hebdomadaires des Seances de lAcademie des Sciences"; break; case "##38": journal = "Dalton transactions"; break; case "##39": journal = "Journal of Organic Chemistry"; break; + case "##40": journal = "Organic & Biomolecular Chemistry"; break; + case "##41": journal = "Organometallics"; break; + case "##43": journal = "Chemical communications(Cambridge, England)"; break; + case "##44": journal = "Materials Chemistry Frontiers"; break; + case "##45": journal = "Monatshefte fuer Chemie und verwandte Teile anderer Wissenschaften"; break; + case "##46": journal = "New Journal of Chemistry"; break; + case "##47": journal = "Organic letters"; break; + } return shortJournal.Replace(number, journal); } @@ -203,11 +277,14 @@ public static string GetShortJournal(string fullJournal) journal = journal.Replace("European Journal of Mineralogy", "##13"); journal = journal.Replace("Gazzetta Chimica Italiana", "##14"); journal = journal.Replace("Inorganic Chemistry", "##15"); + journal = journal.Replace("Inorganic chemistry", "##15"); journal = journal.Replace("Inorganica Chimica Acta", "##16"); journal = journal.Replace("Izvestiya Akademii Nauk SSSR Neorganicheskie Materialy", "##17"); journal = journal.Replace("Journal of Chemical Physics", "##18"); journal = journal.Replace("Journal of Inorganic and Nuclear Chemistry", "##19"); journal = journal.Replace("Journal of Physical Chemistry", "##20"); + journal = journal.Replace("Journal of physical chemistry", "##20"); + journal = journal.Replace("journal of physical chemistry", "##20"); journal = journal.Replace("Journal of Solid State Chemistry", "##21"); journal = journal.Replace("Journal of the American Ceramic Society", "##22"); journal = journal.Replace("Journal of the American Chemical Society", "##23"); @@ -223,10 +300,25 @@ public static string GetShortJournal(string fullJournal) journal = journal.Replace("Physics and Chemistry of Minerals", "##33"); journal = journal.Replace("Zeitschrift fuer Anorganische und Allgemeine Chemie", "##34"); journal = journal.Replace("Zeitschrift fuer Kristallographie", "##35"); + journal = journal.Replace("Zeitschrift f\\ur Kristallographie", "##35"); journal = journal.Replace("Zeitschrift fur Kristallographie", "##36"); journal = journal.Replace("Comptes Rendus Hebdomadaires des Seances de lAcademie des Sciences", "##37"); journal = journal.Replace("Dalton transactions", "##38"); journal = journal.Replace("Journal of Organic Chemistry", "##39"); + journal = journal.Replace("journal of organic chemistry", "##39"); + journal = journal.Replace("Organic & Biomolecular Chemistry", "##40"); + journal = journal.Replace("Organic & biomolecular Chemistry", "##40"); + journal = journal.Replace("Organic & Biomolecular Chemistry", "##40"); + journal = journal.Replace("Organic & biomolecular chemistry", "##40"); + journal = journal.Replace("Organometallics", "##41"); + journal = journal.Replace("Chemical communications(Cambridge, England)", "##43"); + journal = journal.Replace("Materials Chemistry Frontiers", "##44"); + journal = journal.Replace("Monatshefte fuer Chemie und verwandte Teile anderer Wissenschaften", "##45"); + journal = journal.Replace("New Journal of Chemistry", "##46"); + journal = journal.Replace("Organic letters", "##47"); + + + return journal; } @@ -250,6 +342,7 @@ public static string GetFullTitle(string shortTitle) title = title.Replace("##12", "structure refinements of"); title = title.Replace("##13", "_cod_database_code"); title = title.Replace("##14", "_database_code_amcsd"); + } return title; } @@ -274,8 +367,198 @@ public static string GetShortTitle(string fullTitle) title = title.Replace("_database_code_amcsd", "##14"); return title; } + + static readonly char[] toCharDic = new[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', '/', '-', '|', 'E' }; + static readonly Dictionary toStringDic = new Dictionary(); + + static readonly Dictionary toByteDic = new Dictionary() { + {'0', 0},{'1',1 },{'2', 2 },{'3', 3 },{'4', 4 }, {'5', 5 }, {'6', 6}, {'7', 7 }, + {'8', 8},{'9', 9},{'.', 10},{'/', 11},{'-', 12}, {'(', 13}, {')', 13}, {'E', 14}, + }; + + /// + /// + /// + /// + /// + public static byte[] ToBytes(string s) + { + s = s.Trim().TrimEnd().Replace('e', 'E'); + if (s.Length == 0 || s == "?"|| s == "NaN") + return new[] { (byte)255 }; + else if (s == "0") + return new[] { (byte)(240 + 0) }; + else + { + if (s.StartsWith("0.")) + { + if (s == "0.") + s = "0"; + else + s = s.Substring(1, s.Length - 1); + } + else if (s.StartsWith("-0.")) + s = s.Replace("-0.", "-."); + try + { + var result = new List(); + for (int i = 0; i < s.Length; i += 2) + { + if (i + 1 < s.Length) + result.Add((byte)(toByteDic[s[i]] + (toByteDic[s[i + 1]] << 4))); + else + result.Add((byte)(toByteDic[s[i]] + 240)); + } + return result.ToArray(); + } + catch (Exception e) + { +#if DEBUG + MessageBox.Show(e.ToString()); +#endif + return new[] { (byte)255 }; + + } + } + } + + public static string ToString(byte[] bytes) + { + if (bytes.Length == 0) + return ""; + else + { + var sb = new StringBuilder(); + foreach (var b in bytes) + sb.Append(toStringDic[b]); + return sb.ToString(); + } + } + + //静的コンストラクタ + static Crystal2() + { + for (int i = 0; i < 16; i++) + for (int j = 0; j < 16; j++) + { + var s1 = i==15? "" : new string(new[] { toCharDic[i] }); + var s2 = j==15? "" : new string(new[] { toCharDic[j] }); + + toStringDic.Add((byte)(i + j * 16), s1+s2); + } + } + + private (double Value, double Error) Decompose2(string str) => Decompose(str, false); + public static (double Value, double Error) Decompose(string str, int sgnum) + => Decompose(str, sgnum >= 430 && sgnum <= 488); + + /// + /// 9.726|5|, 1.234|12|E-6 のような文字列を、ValueとErrorに分解してタプルで返す. + /// 例外の場合は(double.NaN,double.NaN). 括弧が存在しない場合、Errorはdouble.NaN. + /// + /// + /// + /// + public static (double Value, double Error) Decompose(string str, bool IsHex = false) + { + str = str.ToUpper().Replace(" ", ""); + + var i = str.IndexOf("E"); + var expValue = 1.0; + if (i > 0) + { + double.TryParse("1" + str.Substring(i), out expValue); + str = str.Substring(0, i); + } + + i = str.IndexOf("|"); + var val = i <= 0 ? str : str.Substring(0, i); + var err = i <= 0 ? "" : str.Substring(i + 1, str.LastIndexOf("|") - i - 1); + + if (val.Length == 0) + return (double.NaN, double.NaN); + + if (err != "" && double.TryParse(err, out var errVal)) + { + i = val.IndexOf("."); + if (i >= 0 && val.Length - i - 1 > 0) + errVal *= Math.Pow(10, -val.Length + i + 1); + } + else + errVal = double.NaN; + + if (IsHex) + { + if (str.Contains(".0833")) + return (1.0 / 12.0, errVal); + else if (str.Contains(".167") || str.Contains(".1667") || str.Contains(".16667") || str.Contains(".166667")) + return (1.0 / 6.0, errVal); + else if (str.Contains(".333")) + return (1.0 / 3.0, errVal); + else if (str.Contains(".667") || str.Contains(".6667") || str.Contains(".66667") || str.Contains(".666667")) + return (2.0 / 3.0, errVal); + else if (str.Contains(".4167") || str.Contains(".41667") || str.Contains(".416667")) + return (5.0 / 12.0, errVal); + else if (str.Contains(".5833")) + return (7.0 / 12.0, errVal); + else if (str.Contains(".8333")) + return (5.0 / 6.0, errVal); + else if (str.Contains(".9167") || str.Contains(".91667") || str.Contains(".916667")) + return (11.0 / 12.0, errVal); + } + + if (val.Contains("/")) + { + var temp = val.Split("/"); + if (temp.Length == 2 && double.TryParse(temp[0], out var temp0) && double.TryParse(temp[1], out var temp1)) + return (temp0 / temp1, double.NaN); + else + return (double.NaN, double.NaN); + } + + return val=="0" ? (0, errVal * expValue) : double.TryParse(val, out var valVal) ? (valVal * expValue, errVal * expValue) : (double.NaN, double.NaN); + } + public static string Compose(double val, double err = double.NaN) + { + if (double.IsNaN(val)) + return ""; + else if (double.IsNaN(err) || err <= 0) + return val.ToString(); + else + { + //まず、誤差を 23E-6 みたいな形にする + var temp = err.ToString("E1"); + var errStr = temp.Substring(0, temp.IndexOf("E")).Replace(".", ""); + var errLog = Convert.ToInt32(temp.Substring(temp.IndexOf("E") + 1)) - 1; + + //vを取りあえず十分な精度で出力する + var valStr = val.ToString("E15"); + var valLog = Convert.ToInt32(valStr.Substring(valStr.IndexOf("E") + 1)); + + var result = valLog >= errLog ? valStr.Substring(0, valLog - errLog + 2) : val.ToString("E0").Substring(0, 1); + + if(valLog < errLog) + for (int i = 0; i < errLog - valLog; i++) + errStr += "0"; + + result += "(" + errStr + ")"; + + if (valLog != 0) + result += "E" + valLog.ToString(); + + return result; + } + } + + + + } + + /// + /// Atoms2クラス + /// [Serializable()] [MessagePackObject] public class Atoms2 @@ -283,11 +566,9 @@ public class Atoms2 [Key(0)] public string Label; [Key(1)] - public float[] X; - [Key(2)] - public float[] X_err; + private byte[][] positionBytes;//x,y,z の 順番 [Key(3)] - public float[] Occ;//Occ, Occ_errの順番 + private byte[] occBytes;//Occ [Key(4)] public byte SubXray; [Key(5)] @@ -295,63 +576,92 @@ public class Atoms2 [Key(6)] public byte AtomNo; [Key(7)] - public bool IsIso; + public bool IsU; [Key(8)] - public float[] Biso;//Biso, Biso_errの順番 + public bool IsIso; [Key(9)] - public float[] Baniso;//B11, B22, B33, B12, B23, B31, B11_err, B22_err, B33_err, B12_err, B23_err, B31_errの順番 - [Key(13)] - public double[] Isotope; + private byte[] isoBytes;//B(U)iso + [Key(10)] + private byte[][] anisoBytes;//B(U)11, B(U)22, B(U)33, B(U)12, B(U)23, B(U)31の順番 - public Atoms2() + /// + /// x,y,zの順番. 無次元 + /// + [IgnoreMember] + public string[] PositionTexts { - + get => positionBytes == null ? null : Array.ConvertAll(positionBytes, Crystal2.ToString); + set + { + if(value != null) + positionBytes = Array.ConvertAll(value, Crystal2.ToBytes); + } } - public Atoms2(string label, int atomNo, int sfx, int sfe, Vector3D pos, Vector3D pos_err, double occ, double occ_err, - DiffuseScatteringFactor dsf) + + /// + /// Occ. 無次元 + /// + [IgnoreMember] + public string OccText { get => Crystal2.ToString(occBytes); set => occBytes = Crystal2.ToBytes(value); } + + + /// + /// 単位は Å^2. + /// + [IgnoreMember] + public string IsoText { - X = new float[] { (float)pos.X, (float)pos.Y, (float)pos.Z }; + get => Crystal2.ToString(isoBytes); + set => isoBytes = Crystal2.ToBytes(value); + } + + /// + /// Bの場合は、無次元. Uの場合、Å^2. + /// + [IgnoreMember] + public string[] AnisoTexts + { + get => anisoBytes == null ? null : Array.ConvertAll(anisoBytes, Crystal2.ToString); + set + { + if(value !=null) + anisoBytes = Array.ConvertAll(value,Crystal2.ToBytes); + } + } - if (pos_err.X != 0 || pos_err.Y != 0 || pos_err.Z != 0) - X_err = new float[] { (float)pos_err.X , (float)pos_err.Y, (float)pos_err.Z }; + public Atoms2() { } + /// + /// コンストラクタ. Uの単位はÅ + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Atoms2(string label, int atomNo, int sfx, int sfe, string[] pos, string occ, bool isIso, bool isU, string iso, string[] aniso) + + { + PositionTexts = pos; Label = label; - if (occ_err == 0) - Occ = new float[] { (float)occ }; - else - Occ = new float[] { (float)occ, (float)occ_err }; + OccText = occ; SubXray = (byte)sfx; SubElectron = (byte)sfe; AtomNo = (byte)atomNo; - IsIso = dsf.IsIso; - if (IsIso && dsf.Biso != 0) - { - if (dsf.Biso_err != 0) - Biso = new float[] { (float)dsf.Biso, (float)dsf.Biso_err }; - else - Biso = new float[] { (float)dsf.Biso }; - } - else if (!IsIso && (dsf.B11 != 0 || dsf.B22 != 0 || dsf.B33 != 0 || dsf.B12 != 0 || dsf.B23 != 0 || dsf.B31 != 0)) - { - if (dsf.B11_err != 0 || dsf.B22_err != 0 || dsf.B33_err != 0 || dsf.B12_err != 0 || dsf.B23_err != 0 || dsf.B31_err != 0) - Baniso = new float[] { (float)dsf.B11, (float)dsf.B22, (float)dsf.B33, (float)dsf.B12, (float)dsf.B23, (float)dsf.B31 - , (float)dsf.B11_err, (float)dsf.B22_err, (float)dsf.B33_err, (float)dsf.B12_err, (float)dsf.B23_err, (float)dsf.B31_err }; - else - Baniso = new float[] { (float)dsf.B11, (float)dsf.B22, (float)dsf.B33, (float)dsf.B12, (float)dsf.B23, (float)dsf.B31 }; - } + IsIso = isIso; + IsU = isU; + + AnisoTexts = aniso; + IsoText = iso; - //Rad = radius; - //Argb = mat.Argb;//色 - //Mat = new[] { - // (byte)(mat.Ambient * 100), - // (byte)(mat.Diffuse * 100), - // (byte)(mat.Specular * 100), - // (byte)(mat.SpecularPower*10), - // (byte)(mat.Emission * 100), - //}; } } } \ No newline at end of file diff --git a/Crystallography/Crystallography.csproj b/Crystallography/Crystallography.csproj index 06a927d..c2330ce 100644 --- a/Crystallography/Crystallography.csproj +++ b/Crystallography/Crystallography.csproj @@ -90,6 +90,7 @@ false 8.0 MinimumRecommendedRules.ruleset + true false @@ -144,14 +145,14 @@ ..\packages\HDF.PInvoke.1.10.6.1\lib\HDF.PInvoke.dll - - ..\packages\MathNet.Numerics.4.9.1\lib\net461\MathNet.Numerics.dll + + ..\packages\MathNet.Numerics.4.11.0\lib\net461\MathNet.Numerics.dll - ..\packages\MessagePack.2.1.115\lib\netstandard2.0\MessagePack.dll + ..\packages\MessagePack.2.1.152\lib\netstandard2.0\MessagePack.dll - ..\packages\MessagePack.Annotations.2.1.115\lib\netstandard2.0\MessagePack.Annotations.dll + ..\packages\MessagePack.Annotations.2.1.152\lib\netstandard2.0\MessagePack.Annotations.dll ..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.1\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll @@ -178,8 +179,8 @@ - - ..\packages\System.Linq.Dynamic.Core.1.1.1\lib\net46\System.Linq.Dynamic.Core.dll + + ..\packages\System.Linq.Dynamic.Core.1.2.0\lib\net46\System.Linq.Dynamic.Core.dll ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll @@ -189,7 +190,7 @@ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0-preview.3.20214.6\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0-preview.6.20305.6\lib\net45\System.Runtime.CompilerServices.Unsafe.dll @@ -212,7 +213,6 @@ - Code diff --git a/Crystallography/ExtensionMethods.cs b/Crystallography/ExtensionMethods.cs index 2efb722..d84c68c 100644 --- a/Crystallography/ExtensionMethods.cs +++ b/Crystallography/ExtensionMethods.cs @@ -129,11 +129,11 @@ public static string[] Split(this string s, bool removeEmptyEntries = true) /// - /// 諡。蠑オ繝。繧ス繝繝. ConvertToDouble繧呈僑蠑オ繝。繧ス繝繝峨→縺励※蜻シ縺ウ蜃コ縺. 螟画鋤縺ァ縺阪↑縺蝣エ蜷医ッ萓句、也匱逕 + /// 諡。蠑オ繝。繧ス繝繝. ConvertToDouble繧呈僑蠑オ繝。繧ス繝繝峨→縺励※蜻シ縺ウ蜃コ縺. 螳滓焚縺ィ縲∝謨ー縺ォ蟇セ蠢. 螟画鋤縺ァ縺阪↑縺蝣エ蜷医ッ萓句、也匱逕 /// /// /// - public static double ToDouble(this string s) => Convert.ToDouble(s); + public static double ToDouble(this string s) => !s.Contains("/") ? Convert.ToDouble(s) : s.Split("/")[0].ToDouble() / s.Split("/")[1].ToDouble(); /// /// 諡。蠑オ繝。繧ス繝繝. ConvertToInt32繧呈僑蠑オ繝。繧ス繝繝峨→縺励※蜻シ縺ウ蜃コ縺. 螟画鋤縺ァ縺阪↑縺蝣エ蜷医ッ萓句、也匱逕 diff --git a/Crystallography/Matrix.cs b/Crystallography/Matrix.cs index 73cda48..9976a8b 100644 --- a/Crystallography/Matrix.cs +++ b/Crystallography/Matrix.cs @@ -425,17 +425,11 @@ public static Matrix3D RotZ(double theta) }; } - private static Random Rn = new Random(System.Environment.TickCount * 2); + private static readonly Random Rn = new Random(Environment.TickCount * 2); - public static Matrix3D GenerateRamdomRotationMatrix() - { - return GenerateRamdomRotationMatrix(Rn); - } + public static Matrix3D GenerateRamdomRotationMatrix() => GenerateRamdomRotationMatrix(Rn); - public static Matrix3D GenerateRamdomRotationMatrix(int seed) - { - return GenerateRamdomRotationMatrix(new Random(seed)); - } + public static Matrix3D GenerateRamdomRotationMatrix(int seed) => GenerateRamdomRotationMatrix(new Random(seed)); public static Matrix3D GenerateRamdomRotationMatrix(Random rn) { @@ -502,16 +496,14 @@ public static Matrix3D GenerateEquiareaMatrix(double phi, double theta, double k /// /// public static bool IsZero(Matrix3D m) - { - return m.E11 == 0 && m.E12 == 0 && m.E13 == 0 && m.E21 == 0 && m.E22 == 0 && m.E23 == 0 && m.E31 == 0 && m.E32 == 0 && m.E33 == 0; - } + => m.E11 == 0 && m.E12 == 0 && m.E13 == 0 && m.E21 == 0 && m.E22 == 0 && m.E23 == 0 && m.E31 == 0 && m.E32 == 0 && m.E33 == 0; /// /// ゼロ行列かどうかを判定 /// /// public bool IsZero() - => IsZero(this); + => IsZero(this); /// /// 単位行列かどうかを判定 @@ -887,79 +879,38 @@ public Vector3D(float[] v) } //演算子のオーバーロード - public static bool operator <(Vector3D v1, Vector3D v2) - { - return (v1.X < v2.X && v1.Y < v2.Y && v1.Z < v2.Z) - ? true : false; - } + public static bool operator <(Vector3D v1, Vector3D v2) => v1.X < v2.X && v1.Y < v2.Y && v1.Z < v2.Z; - public static bool operator <=(Vector3D v1, Vector3D v2) - { - return (v1.X <= v2.X && v1.Y <= v2.Y && v1.Z <= v2.Z) - ? true : false; - } + public static bool operator <=(Vector3D v1, Vector3D v2) => v1.X <= v2.X && v1.Y <= v2.Y && v1.Z <= v2.Z; - public static bool operator >(Vector3D v1, Vector3D v2) - { - return (v1.X > v2.X && v1.Y > v2.Y && v1.Z > v2.Z) - ? true : false; - } + public static bool operator >(Vector3D v1, Vector3D v2) => v1.X > v2.X && v1.Y > v2.Y && v1.Z > v2.Z; - public static bool operator >=(Vector3D v1, Vector3D v2) - { - return (v1.X >= v2.X && v1.Y >= v2.Y && v1.Z >= v2.Z) - ? true : false; - } + public static bool operator >=(Vector3D v1, Vector3D v2) => v1.X >= v2.X && v1.Y >= v2.Y && v1.Z >= v2.Z; public static Vector3D operator +(Vector3D v1, Vector3D v2) { + if (v2 is null) + throw new ArgumentNullException(nameof(v2)); return new Vector3D(v1.X + v2.X, v1.Y + v2.Y, v1.Z + v2.Z); } - public static Vector3D operator -(Vector3D v1, Vector3D v2) - { - return new Vector3D(v1.X - v2.X, v1.Y - v2.Y, v1.Z - v2.Z); - } + public static Vector3D operator -(Vector3D v1, Vector3D v2) => new Vector3D(v1.X - v2.X, v1.Y - v2.Y, v1.Z - v2.Z); - public static Vector3D operator -(Vector3D v1) - { - return new Vector3D(-v1.X, -v1.Y, -v1.Z); - } + public static Vector3D operator -(Vector3D v1) => new Vector3D(-v1.X, -v1.Y, -v1.Z); - public static Vector3D operator *(double d, Vector3D v1) - { - return new Vector3D(d * v1.X, d * v1.Y, d * v1.Z); - } + public static Vector3D operator *(double d, Vector3D v1) => new Vector3D(d * v1.X, d * v1.Y, d * v1.Z); - public static Vector3D operator *(Vector3D v1, double d) - { - return new Vector3D(d * v1.X, d * v1.Y, d * v1.Z); - } + public static Vector3D operator *(Vector3D v1, double d) => new Vector3D(d * v1.X, d * v1.Y, d * v1.Z); - public static Vector3D operator *(int d, Vector3D v1) - { - return new Vector3D(d * v1.X, d * v1.Y, d * v1.Z); - } + public static Vector3D operator *(int d, Vector3D v1) => new Vector3D(d * v1.X, d * v1.Y, d * v1.Z); - public static Vector3D operator *(Vector3D v1, int d) - { - return new Vector3D(d * v1.X, d * v1.Y, d * v1.Z); - } + public static Vector3D operator *(Vector3D v1, int d) => new Vector3D(d * v1.X, d * v1.Y, d * v1.Z); - public static double operator *(Vector3D v1, Vector3D v2) - { - return v1.X * v2.X + v1.Y * v2.Y + v1.Z * v2.Z; - } + public static double operator *(Vector3D v1, Vector3D v2) => v1.X * v2.X + v1.Y * v2.Y + v1.Z * v2.Z; - public static Vector3D operator /(Vector3D v1, double d) - { - return new Vector3D(v1.X / d, v1.Y / d, v1.Z / d); - } + public static Vector3D operator /(Vector3D v1, double d) => new Vector3D(v1.X / d, v1.Y / d, v1.Z / d); - public static Vector3D operator /(Vector3D v1, int d) - { - return new Vector3D(v1.X / d, v1.Y / d, v1.Z / d); - } + public static Vector3D operator /(Vector3D v1, int d) => new Vector3D(v1.X / d, v1.Y / d, v1.Z / d); public void NormarizeThis() { @@ -1096,15 +1047,9 @@ public Vector3D InnerLattice() return new Vector3D(d[0], d[1], d[2], false); } - public override string ToString() - { - return text!="" ? text: $"{X}, {Y}, {Z}"; - } + public override string ToString() => text != "" ? text : $"{X}, {Y}, {Z}"; - public static Vector3D RandomVector(Random rn) - { - return RandomVector(rn.NextDouble(), rn.NextDouble()); - } + public static Vector3D RandomVector(Random rn) => RandomVector(rn.NextDouble(), rn.NextDouble()); public static Vector3D RandomVector(double rn1, double rn2) { diff --git a/Crystallography/Properties/AssemblyInfo.cs b/Crystallography/Properties/AssemblyInfo.cs index 44935fb..68ea515 100644 --- a/Crystallography/Properties/AssemblyInfo.cs +++ b/Crystallography/Properties/AssemblyInfo.cs @@ -26,7 +26,7 @@ // 下にあるように、'*' を使って、すべての値を指定するか、 // ビルドおよびリビジョン番号を既定値にすることができます。 -[assembly: AssemblyVersion("2020.5.24.0516")] +[assembly: AssemblyVersion("2020.7.28.1404")] // // アセンブリに署名するには、使用するキーを指定しなければなりません。 @@ -57,5 +57,5 @@ [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] [assembly: ComVisibleAttribute(true)] -[assembly: AssemblyFileVersion("2020.5.24.0516")] +[assembly: AssemblyFileVersion("2020.7.28.1404")] diff --git a/Crystallography/WyckoffPosition.cs b/Crystallography/WyckoffPosition.cs index cf1bfae..81343be 100644 --- a/Crystallography/WyckoffPosition.cs +++ b/Crystallography/WyckoffPosition.cs @@ -172,7 +172,10 @@ private static bool chk(double d1, double d2) /// public static Atoms GetEquivalentAtomsPosition((double X, double Y, double Z) Pos, int SymmetrySeriesNumber) { - Atoms atoms = new Atoms(); + if (double.IsNaN(Pos.X) || double.IsNaN(Pos.Y) || double.IsNaN(Pos.Z)) + return new Atoms(); + + var atoms = new Atoms(); var wykc = SymmetryStatic.WyckoffPositions[SymmetrySeriesNumber]; //縺セ縺壹√b縺」縺ィ繧ょッセ遘ー諤ァ縺ョ菴弱>繝ッ繧、繧ウ繝穂ス咲スョ縺ァ蜴溷ュ蝉ス咲スョ繧貞咲函 atoms.Atom = wykc[0].GeneratePositions(Pos.X, Pos.Y, Pos.Z); diff --git a/Crystallography/packages.config b/Crystallography/packages.config index db9acb8..d4da819 100644 --- a/Crystallography/packages.config +++ b/Crystallography/packages.config @@ -1,17 +1,17 @@ サソ - - - + + + - + - + \ No newline at end of file diff --git a/PDIndexer/FormMain.resx b/PDIndexer/FormMain.resx index 1e6a166..a278e8d 100644 --- a/PDIndexer/FormMain.resx +++ b/PDIndexer/FormMain.resx @@ -238,7 +238,7 @@ horizontalAxisUserControl - Crystallography.Controls.HorizontalAxisUserControl, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.HorizontalAxisUserControl, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null tabPage1 @@ -590,7 +590,7 @@ numericalTextBoxIncreasingPixels - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null groupBox3 @@ -836,7 +836,7 @@ colorControlScaleText - Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null groupBox2 @@ -893,7 +893,7 @@ colorControlScaleLine - Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null groupBox2 @@ -950,7 +950,7 @@ colorControlBack - Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null groupBox2 @@ -1562,7 +1562,7 @@ graphControlFrequency - Crystallography.Controls.GraphControl, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.GraphControl, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null tabPage3 @@ -1680,7 +1680,7 @@ 0, 0, 0, 0 - 1000, 27 + 1000, 25 1, 25 @@ -1689,7 +1689,7 @@ 0, 0, 1, 0 - 75, 27 + 75, 25 4 @@ -1698,7 +1698,7 @@ numericBoxUpperY - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null tableLayoutPanel2 @@ -1758,7 +1758,7 @@ 0, 0, 0, 0 - 1000, 27 + 1000, 25 1, 25 @@ -1767,7 +1767,7 @@ 0, 0, 1, 0 - 75, 27 + 75, 25 3 @@ -1776,7 +1776,7 @@ numericBoxLowerY - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null tableLayoutPanel2 @@ -1836,7 +1836,7 @@ 0, 0, 0, 0 - 1000, 27 + 1000, 25 1, 25 @@ -1845,7 +1845,7 @@ 0, 0, 1, 0 - 75, 27 + 75, 25 2 @@ -1854,7 +1854,7 @@ numericBoxUpperX - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null tableLayoutPanel2 @@ -1914,7 +1914,7 @@ 0, 0, 0, 0 - 1000, 27 + 1000, 25 1, 25 @@ -1923,7 +1923,7 @@ 0, 0, 1, 0 - 75, 27 + 75, 25 1 @@ -1932,7 +1932,7 @@ numericBoxLowerX - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.5.24.43, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.7.28.916, Culture=neutral, PublicKeyToken=null tableLayoutPanel2 diff --git a/PDIndexer/PDIndexer.csproj b/PDIndexer/PDIndexer.csproj index b6bc282..77332c0 100644 --- a/PDIndexer/PDIndexer.csproj +++ b/PDIndexer/PDIndexer.csproj @@ -168,28 +168,28 @@ ..\packages\HDF.PInvoke.1.10.6.1\lib\HDF.PInvoke.dll - ..\packages\IronPython.2.7.10-candidate1\lib\net45\IronPython.dll + ..\packages\IronPython.2.7.10\lib\net45\IronPython.dll - ..\packages\IronPython.2.7.10-candidate1\lib\net45\IronPython.Modules.dll + ..\packages\IronPython.2.7.10\lib\net45\IronPython.Modules.dll - ..\packages\IronPython.2.7.10-candidate1\lib\net45\IronPython.SQLite.dll + ..\packages\IronPython.2.7.10\lib\net45\IronPython.SQLite.dll - ..\packages\IronPython.2.7.10-candidate1\lib\net45\IronPython.Wpf.dll + ..\packages\IronPython.2.7.10\lib\net45\IronPython.Wpf.dll - - ..\packages\MathNet.Numerics.4.9.1\lib\net461\MathNet.Numerics.dll + + ..\packages\MathNet.Numerics.4.11.0\lib\net461\MathNet.Numerics.dll - ..\packages\DynamicLanguageRuntime.1.2.3-candidate1\lib\net45\Microsoft.Dynamic.dll + ..\packages\DynamicLanguageRuntime.1.2.3\lib\net45\Microsoft.Dynamic.dll - ..\packages\DynamicLanguageRuntime.1.2.3-candidate1\lib\net45\Microsoft.Scripting.dll + ..\packages\DynamicLanguageRuntime.1.2.3\lib\net45\Microsoft.Scripting.dll - ..\packages\DynamicLanguageRuntime.1.2.3-candidate1\lib\net45\Microsoft.Scripting.Metadata.dll + ..\packages\DynamicLanguageRuntime.1.2.3\lib\net45\Microsoft.Scripting.Metadata.dll diff --git a/PDIndexer/packages.config b/PDIndexer/packages.config index f93b978..3c8c20b 100644 --- a/PDIndexer/packages.config +++ b/PDIndexer/packages.config @@ -1,7 +1,7 @@ サソ - + - - + + \ No newline at end of file