Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seto77 committed Jan 30, 2023
1 parent 31df489 commit 76a15b6
Show file tree
Hide file tree
Showing 9 changed files with 758 additions and 875 deletions.
4 changes: 2 additions & 2 deletions Crystallography.Controls/Crystallography.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2023.1.30.0513</AssemblyVersion>
<FileVersion>2023.1.30.0513</FileVersion>
<AssemblyVersion>2023.1.30.0802</AssemblyVersion>
<FileVersion>2023.1.30.0802</FileVersion>
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
<ApplicationUseCompatibleTextRendering>true</ApplicationUseCompatibleTextRendering>
<ApplicationVisualStyles>true</ApplicationVisualStyles>
Expand Down
7 changes: 2 additions & 5 deletions Crystallography.Controls/Numeric/NumericBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ internal string GetString()

private static string separateThousands(string valueString)
{
char decimalPoint = '.';
var decimalPoint = '.';
if (valueString.Contains(','))
decimalPoint = ',';

Expand Down Expand Up @@ -686,8 +686,5 @@ private void textBox_Leave(object sender, EventArgs e)
}
}

private void textBox_Enter(object sender, EventArgs e)
{
textBox.SelectAll();
}
private void textBox_Enter(object sender, EventArgs e) => textBox.SelectAll();
}
4 changes: 2 additions & 2 deletions Crystallography/Crystallography.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2023.1.30.0447</AssemblyVersion>
<FileVersion>2023.1.30.0447</FileVersion>
<AssemblyVersion>2023.1.30.0802</AssemblyVersion>
<FileVersion>2023.1.30.0802</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
38 changes: 25 additions & 13 deletions PDIndexer/FormSequentialAnalysis.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions PDIndexer/FormSequentialAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,18 @@ private void buttonExecute_Click(object sender, EventArgs e)
formMain.toolStripButtonEquationOfState.Checked = true;
}

int initialPosition = stressMode ? 1 : formMain.bindingSourceProfile.Position;
if (checkBoxStartNumber.Checked && !(stressMode && numericBoxStartNumber.ValueInteger == 0))
initialPosition = numericBoxStartNumber.ValueInteger;

var total = formMain.dataSet.DataTableProfile.Items.Count;

var targetList=new List<int>();
for (int i = checkBoxStartNumber.Checked ? numericBoxStartNumber.ValueInteger : 0; i < total; i++)
targetList.Add(i);
if (checkBoxStartNumber.Checked && checkBoxLoop.Checked)
targetList.AddRange(Enumerable.Range(0, numericBoxStartNumber.ValueInteger));
if (stressMode)
targetList.Remove(0);

var initialPosition = formMain.bindingSourceProfile.Position;

//現在のプロファイルチェック状況を保存後、全てチェック外す
var checkStates = new List<bool>();
for (int i = 0; i < total; i++)
Expand All @@ -123,7 +129,7 @@ private void buttonExecute_Click(object sender, EventArgs e)
formMain.Enabled = false;

//ここから、メインのループ
for (int i = initialPosition; i < total; i++)
foreach (var i in targetList)
{
formMain.SkipDrawing = true;//メイン画面の描画をキャンセル
formMain.bindingSourceProfile.Position = i;
Expand Down Expand Up @@ -267,8 +273,7 @@ public void AutoSave()
!checkBoxAutoSavePressure.Checked &&
!checkBoxAutoSaveSingh.Checked &&
!checkBoxAutoSaveTwoTheta.Checked)
return;

return;//何もチェックされていなかったら終了

if (!Path.Exists(textBoxDirectory.Text))
{
Expand Down Expand Up @@ -551,6 +556,7 @@ public string GetText(bool CSV = true, int index = -1)
private void checkBoxStartNumber_CheckedChanged(object sender, EventArgs e)
{
numericBoxStartNumber.ReadOnly = !checkBoxStartNumber.Checked;
checkBoxLoop.Enabled = checkBoxStartNumber.Checked;
}
#endregion
}
45 changes: 27 additions & 18 deletions PDIndexer/FormSequentialAnalysis.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<value>実行</value>
</data>
<data name="textBox2theta.Size" type="System.Drawing.Size, System.Drawing">
<value>734, 242</value>
<value>744, 242</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="checkBoxAutoSaveTwoTheta.AutoSize" type="System.Boolean, mscorlib">
Expand All @@ -88,16 +88,13 @@
<value>0, 242</value>
</data>
<data name="checkBoxAutoSaveTwoTheta.Size" type="System.Drawing.Size, System.Drawing">
<value>734, 22</value>
<value>744, 22</value>
</data>
<data name="checkBoxAutoSaveTwoTheta.Text" xml:space="preserve">
<value>自動保存</value>
</data>
<data name="tabPage2theta.Size" type="System.Drawing.Size, System.Drawing">
<value>734, 264</value>
</data>
<data name="tabPage2theta.Text" xml:space="preserve">
<value>2θ (°)</value>
<value>744, 264</value>
</data>
<data name="textBoxDspacing.Size" type="System.Drawing.Size, System.Drawing">
<value>734, 242</value>
Expand Down Expand Up @@ -256,6 +253,9 @@
<data name="checkBoxAutoSaveSingh.Text" xml:space="preserve">
<value>自動保存</value>
</data>
<data name="graphControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>471, 0</value>
</data>
<data name="graphControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>263, 264</value>
</data>
Expand All @@ -269,7 +269,7 @@
<value>0, 44</value>
</data>
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
<value>742, 292</value>
<value>752, 292</value>
</data>
<data name="buttonCopy.Font" type="System.Drawing.Font, System.Drawing">
<value>メイリオ, 9pt</value>
Expand Down Expand Up @@ -299,13 +299,25 @@
<value>メイリオ, 9pt</value>
</data>
<data name="textBoxDirectory.Location" type="System.Drawing.Point, System.Drawing">
<value>555, 10</value>
<value>565, 10</value>
</data>
<data name="textBoxDirectory.Size" type="System.Drawing.Size, System.Drawing">
<value>137, 25</value>
</data>
<data name="numericBoxStartNumber.Location" type="System.Drawing.Point, System.Drawing">
<value>391, 10</value>
<value>336, 12</value>
</data>
<data name="checkBoxLoop.Font" type="System.Drawing.Font, System.Drawing">
<value>メイリオ, 8pt</value>
</data>
<data name="checkBoxLoop.Location" type="System.Drawing.Point, System.Drawing">
<value>382, 14</value>
</data>
<data name="checkBoxLoop.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 21</value>
</data>
<data name="checkBoxLoop.Text" xml:space="preserve">
<value>ループ</value>
</data>
<data name="checkBoxStartNumber.Font" type="System.Drawing.Font, System.Drawing">
<value>メイリオ, 8pt</value>
Expand All @@ -314,17 +326,17 @@
<value>163, 4</value>
</data>
<data name="checkBoxStartNumber.Size" type="System.Drawing.Size, System.Drawing">
<value>225, 38</value>
<value>170, 38</value>
</data>
<data name="checkBoxStartNumber.Text" xml:space="preserve">
<value>指定した番号のプロファイルから解析を
実行する (最初のプロファイルはゼロ)</value>
<value>指定番号のプロファイルから
解析を実行 (最初はゼロ)</value>
</data>
<data name="buttonSetDirectory.Font" type="System.Drawing.Font, System.Drawing">
<value>メイリオ, 9pt</value>
</data>
<data name="buttonSetDirectory.Location" type="System.Drawing.Point, System.Drawing">
<value>692, 9</value>
<value>702, 9</value>
</data>
<data name="buttonSetDirectory.Size" type="System.Drawing.Size, System.Drawing">
<value>42, 28</value>
Expand All @@ -336,7 +348,7 @@
<value>メイリオ, 8pt</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>475, 3</value>
<value>485, 3</value>
</data>
<data name="label1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 3, 0, 0</value>
Expand All @@ -352,12 +364,9 @@
<value>0, 1, 0, 1</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>742, 44</value>
<value>752, 44</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>メイリオ, 10pt</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>連続解析</value>
</data>
</root>
Loading

0 comments on commit 76a15b6

Please sign in to comment.