Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seto77 committed Aug 30, 2020
1 parent c497831 commit a393284
Show file tree
Hide file tree
Showing 9 changed files with 581 additions and 492 deletions.

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

24 changes: 19 additions & 5 deletions Crystallography.Controls/Numeric/NumericBoxWithMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace Crystallography.Controls
{
public partial class NumericBoxWithMenu : NumericBox
{

bool skipEvent { get; set; } = false;

new public event MyEventHandler LimitChanged;
public NumericBoxWithMenu()
{
Expand All @@ -28,10 +31,8 @@ public NumericBoxWithMenu()
}


private void smartIncrementToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
SmartIncrement = smartIncrementToolStripMenuItem.Checked;
}
private void smartIncrementToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
=> SmartIncrement = smartIncrementToolStripMenuItem.Checked;

private void toolStripComboBoxIncrement_SelectedIndexChanged(object sender, EventArgs e)
{
Expand All @@ -41,8 +42,12 @@ private void toolStripComboBoxIncrement_SelectedIndexChanged(object sender, Even
}

private void toolStripComboBoxDecimalPlaces_SelectedIndexChanged(object sender, EventArgs e)
=> DecimalPlaces = toolStripComboBoxDecimalPlaces.SelectedIndex - 1;
{
if (skipEvent)
return;

DecimalPlaces = toolStripComboBoxDecimalPlaces.SelectedIndex - 1;
}

private void thousandsSeparatorToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
=> ThonsandsSeparator = thousandsSeparatorToolStripMenuItem.Checked;
Expand Down Expand Up @@ -145,5 +150,14 @@ private void textBox_MouseUp(object sender, MouseEventArgs e)


#endregion マウスコントロールモード

private void contextMenuStripBody_Opening(object sender, CancelEventArgs e)
{
skipEvent = true;
toolStripComboBoxDecimalPlaces.SelectedIndex = DecimalPlaces >= 0 ? DecimalPlaces+1: 0;
toolStripTextBoxMaximum.Text = Maximum.ToString();
toolStripTextBoxMimimum.Text = Minimum.ToString();
skipEvent = false;
}
}
}
4 changes: 2 additions & 2 deletions Crystallography.Controls/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2020.8.30.0301")]
[assembly: AssemblyFileVersion("2020.8.30.0301")]
[assembly: AssemblyVersion("2020.8.30.0400")]
[assembly: AssemblyFileVersion("2020.8.30.0400")]
4 changes: 2 additions & 2 deletions Crystallography/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// 下にあるように、'*' を使って、すべての値を指定するか、
// ビルドおよびリビジョン番号を既定値にすることができます。

[assembly: AssemblyVersion("2020.8.29.1012")]
[assembly: AssemblyVersion("2020.8.30.0333")]

//
// アセンブリに署名するには、使用するキーを指定しなければなりません。
Expand Down Expand Up @@ -57,5 +57,5 @@
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
[assembly: ComVisibleAttribute(true)]
[assembly: AssemblyFileVersion("2020.8.29.1012")]
[assembly: AssemblyFileVersion("2020.8.30.0333")]

560 changes: 302 additions & 258 deletions PDIndexer/FormMain.Designer.cs

Large diffs are not rendered by default.

26 changes: 9 additions & 17 deletions PDIndexer/FormMain.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
#region using

using System;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
Expand All @@ -20,13 +22,15 @@
using IronPython.Hosting;
using System.Net;

#endregion

namespace PDIndexer
{
/// <summary>
/// PDIndexer の概要の説明です。
/// </summary>
///
public partial class FormMain : System.Windows.Forms.Form
public partial class FormMain : Form
{
#region enum
public enum FileType
Expand Down Expand Up @@ -120,21 +124,9 @@ public double LowerX
}
get { return numericBoxLowerX.Value; }
}
public double UpperX
{
set { numericBoxUpperX.Value = value; if (UpperX <= LowerX) LowerX++; }
get => numericBoxUpperX.Value;
}
public double LowerY
{
set { numericBoxLowerY.Value = value; if (UpperY <= LowerY) UpperY++; }
get => numericBoxLowerY.Value;
}
public double UpperY
{
set { numericBoxUpperY.Value = value; if (UpperY <= LowerY)LowerY--; }
get { return numericBoxUpperY.Value; }
}
public double UpperX { set { numericBoxUpperX.Value = value; if (UpperX <= LowerX) LowerX++; } get => numericBoxUpperX.Value; }
public double LowerY { set { numericBoxLowerY.Value = value; if (UpperY <= LowerY) UpperY++; } get => numericBoxLowerY.Value; }
public double UpperY { set { numericBoxUpperY.Value = value; if (UpperY <= LowerY) LowerY--; } get { return numericBoxUpperY.Value; } }

public double MaximalX
{
Expand Down
Loading

0 comments on commit a393284

Please sign in to comment.