From a393284bdccaf0e2fcb2354916d6b3c20a7e510e Mon Sep 17 00:00:00 2001 From: seto Date: Sun, 30 Aug 2020 13:04:52 +0900 Subject: [PATCH] update --- .../Numeric/NumericBoxWithMenu.Designer.cs | 3 +- .../Numeric/NumericBoxWithMenu.cs | 24 +- .../Properties/AssemblyInfo.cs | 4 +- Crystallography/Properties/AssemblyInfo.cs | 4 +- PDIndexer/FormMain.Designer.cs | 560 ++++++++++-------- PDIndexer/FormMain.cs | 26 +- PDIndexer/FormMain.resx | 291 +++++---- PDIndexer/FormProfileSetting.cs | 157 +++-- PDIndexer/Properties/AssemblyInfo.cs | 4 +- 9 files changed, 581 insertions(+), 492 deletions(-) diff --git a/Crystallography.Controls/Numeric/NumericBoxWithMenu.Designer.cs b/Crystallography.Controls/Numeric/NumericBoxWithMenu.Designer.cs index 6b74c94..d2c1501 100644 --- a/Crystallography.Controls/Numeric/NumericBoxWithMenu.Designer.cs +++ b/Crystallography.Controls/Numeric/NumericBoxWithMenu.Designer.cs @@ -67,7 +67,7 @@ private void InitializeComponent() this.smartIncrementToolStripMenuItem, this.toolStripComboBoxIncrement}); this.incrementToolStripMenuItem.Name = "incrementToolStripMenuItem"; - this.incrementToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.incrementToolStripMenuItem.Size = new System.Drawing.Size(133, 22); this.incrementToolStripMenuItem.Text = "Increment"; this.incrementToolStripMenuItem.CheckedChanged += new System.EventHandler(this.smartIncrementToolStripMenuItem_CheckedChanged); // @@ -132,6 +132,7 @@ private void InitializeComponent() this.contextMenuStripBody.Name = "contextMenuStripBody"; this.contextMenuStripBody.Size = new System.Drawing.Size(185, 214); this.contextMenuStripBody.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.contextMenuStripBody_Closing); + this.contextMenuStripBody.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripBody_Opening); // // decimalPlacesToolStripMenuItem // diff --git a/Crystallography.Controls/Numeric/NumericBoxWithMenu.cs b/Crystallography.Controls/Numeric/NumericBoxWithMenu.cs index ea9498b..ab535ae 100644 --- a/Crystallography.Controls/Numeric/NumericBoxWithMenu.cs +++ b/Crystallography.Controls/Numeric/NumericBoxWithMenu.cs @@ -12,6 +12,9 @@ namespace Crystallography.Controls { public partial class NumericBoxWithMenu : NumericBox { + + bool skipEvent { get; set; } = false; + new public event MyEventHandler LimitChanged; public NumericBoxWithMenu() { @@ -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) { @@ -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; @@ -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; + } } } diff --git a/Crystallography.Controls/Properties/AssemblyInfo.cs b/Crystallography.Controls/Properties/AssemblyInfo.cs index ff2dedf..ca31407 100644 --- a/Crystallography.Controls/Properties/AssemblyInfo.cs +++ b/Crystallography.Controls/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2020.8.30.0301")] -[assembly: AssemblyFileVersion("2020.8.30.0301")] \ No newline at end of file +[assembly: AssemblyVersion("2020.8.30.0400")] +[assembly: AssemblyFileVersion("2020.8.30.0400")] \ No newline at end of file diff --git a/Crystallography/Properties/AssemblyInfo.cs b/Crystallography/Properties/AssemblyInfo.cs index 74871b3..9a820bb 100644 --- a/Crystallography/Properties/AssemblyInfo.cs +++ b/Crystallography/Properties/AssemblyInfo.cs @@ -26,7 +26,7 @@ // ɂ悤ɁA'*' gāAׂĂ̒lw肷邩A // rhуrWԍlɂ邱Ƃł܂B -[assembly: AssemblyVersion("2020.8.29.1012")] +[assembly: AssemblyVersion("2020.8.30.0333")] // // AZuɏɂ́AgpL[w肵Ȃ΂Ȃ܂B @@ -57,5 +57,5 @@ [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] [assembly: ComVisibleAttribute(true)] -[assembly: AssemblyFileVersion("2020.8.29.1012")] +[assembly: AssemblyFileVersion("2020.8.30.0333")] diff --git a/PDIndexer/FormMain.Designer.cs b/PDIndexer/FormMain.Designer.cs index ceb6b5c..d9b125f 100644 --- a/PDIndexer/FormMain.Designer.cs +++ b/PDIndexer/FormMain.Designer.cs @@ -54,7 +54,6 @@ private void InitializeComponent() System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = 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(); @@ -120,6 +119,8 @@ private void InitializeComponent() System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle70 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle71 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle72 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle73 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripProgressBar = new System.Windows.Forms.ToolStripProgressBar(); @@ -129,7 +130,6 @@ private void InitializeComponent() this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.tabControl = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); - this.horizontalAxisUserControl = new Crystallography.Controls.HorizontalAxisUserControl(); this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); this.checkBoxChangeHorizontalAppearance = new System.Windows.Forms.CheckBox(); this.tabPage2 = new System.Windows.Forms.TabPage(); @@ -141,7 +141,6 @@ private void InitializeComponent() this.radioButtonRawCounts = new System.Windows.Forms.RadioButton(); this.radioButtonCountsPerStep = new System.Windows.Forms.RadioButton(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.numericalTextBoxIncreasingPixels = new Crystallography.Controls.NumericBox(); this.numericUpDownIncreasingPixels = new System.Windows.Forms.NumericUpDown(); this.radioButtonMultiProfileMode = new System.Windows.Forms.RadioButton(); this.checkBoxChangeColor = new System.Windows.Forms.CheckBox(); @@ -149,9 +148,6 @@ private void InitializeComponent() this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.colorControlScaleText = new Crystallography.Controls.ColorControl(); - this.colorControlScaleLine = new Crystallography.Controls.ColorControl(); - this.colorControlBack = new Crystallography.Controls.ColorControl(); this.label5 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); @@ -170,17 +166,12 @@ private void InitializeComponent() this.comboBoxGradient = new System.Windows.Forms.ComboBox(); this.comboBoxScale2 = new System.Windows.Forms.ComboBox(); this.comboBoxScale1 = new System.Windows.Forms.ComboBox(); - this.graphControlFrequency = new Crystallography.Controls.GraphControl(); this.pictureBoxMain = new System.Windows.Forms.PictureBox(); this.panel1 = new System.Windows.Forms.Panel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.numericBoxUpperY = new Crystallography.Controls.NumericBox(); this.labelIntensity = new System.Windows.Forms.Label(); - this.numericBoxLowerY = new Crystallography.Controls.NumericBox(); this.labelD = new System.Windows.Forms.Label(); - this.numericBoxUpperX = new Crystallography.Controls.NumericBox(); this.labelTwoTheta = new System.Windows.Forms.Label(); - this.numericBoxLowerX = new Crystallography.Controls.NumericBox(); this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.labelX = new System.Windows.Forms.Label(); @@ -189,8 +180,6 @@ private void InitializeComponent() this.groupBox1 = new System.Windows.Forms.GroupBox(); this.dataGridViewProfiles = new System.Windows.Forms.DataGridView(); this.checkDataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colorDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewImageColumn(); - this.profileDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.bindingSourceProfile = new System.Windows.Forms.BindingSource(this.components); this.dataSet = new PDIndexer.DataSet(); this.checkBoxProfileParameter = new System.Windows.Forms.CheckBox(); @@ -198,8 +187,6 @@ private void InitializeComponent() this.groupBoxCrystalData = new System.Windows.Forms.GroupBox(); this.dataGridViewCrystals = new System.Windows.Forms.DataGridView(); this.checkDataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.PeakColor = new System.Windows.Forms.DataGridViewImageColumn(); - this.Crystal = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.bindingSourceCrystal = new System.Windows.Forms.BindingSource(this.components); this.checkBoxCrystalParameter = new System.Windows.Forms.CheckBox(); this.menuStrip = new System.Windows.Forms.MenuStrip(); @@ -461,6 +448,24 @@ private void InitializeComponent() this.dataGridViewTextBoxColumn106 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewImageColumn83 = new System.Windows.Forms.DataGridViewImageColumn(); this.dataGridViewTextBoxColumn108 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewImageColumn84 = new System.Windows.Forms.DataGridViewImageColumn(); + this.dataGridViewTextBoxColumn109 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewImageColumn85 = new System.Windows.Forms.DataGridViewImageColumn(); + this.dataGridViewTextBoxColumn110 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.horizontalAxisUserControl = new Crystallography.Controls.HorizontalAxisUserControl(); + this.numericalTextBoxIncreasingPixels = new Crystallography.Controls.NumericBox(); + this.colorControlScaleText = new Crystallography.Controls.ColorControl(); + this.colorControlScaleLine = new Crystallography.Controls.ColorControl(); + this.colorControlBack = new Crystallography.Controls.ColorControl(); + this.graphControlFrequency = new Crystallography.Controls.GraphControl(); + this.numericBoxUpperY = new Crystallography.Controls.NumericBox(); + this.numericBoxLowerY = new Crystallography.Controls.NumericBox(); + this.colorDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewImageColumn(); + this.profileDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PeakColor = new System.Windows.Forms.DataGridViewImageColumn(); + this.Crystal = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.numericBoxLowerX = new Crystallography.Controls.NumericBoxWithMenu(); + this.numericBoxUpperX = new Crystallography.Controls.NumericBoxWithMenu(); this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); this.toolStripContainer1.ContentPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); @@ -588,27 +593,6 @@ private void InitializeComponent() this.tabPage1.Name = "tabPage1"; this.tabPage1.UseVisualStyleBackColor = true; // - // horizontalAxisUserControl - // - resources.ApplyResources(this.horizontalAxisUserControl, "horizontalAxisUserControl"); - this.horizontalAxisUserControl.AxisMode = Crystallography.HorizontalAxis.Angle; - this.horizontalAxisUserControl.ElectronAccVoltage = 8.04114721308336D; - this.horizontalAxisUserControl.ElectronAccVoltageText = "8.04114721308336"; - this.horizontalAxisUserControl.EnergyUnit = Crystallography.EnergyUnitEnum.eV; - this.horizontalAxisUserControl.Name = "horizontalAxisUserControl"; - this.horizontalAxisUserControl.TakeoffAngle = 0D; - this.horizontalAxisUserControl.TakeoffAngleText = "0"; - this.horizontalAxisUserControl.TofAngle = 1.5707963267948966D; - this.horizontalAxisUserControl.TofAngleText = "90"; - this.horizontalAxisUserControl.TofLength = 90D; - this.horizontalAxisUserControl.WaveColor = Crystallography.WaveColor.Monochrome; - this.horizontalAxisUserControl.WaveLength = 0.15418710666666666D; - this.horizontalAxisUserControl.WaveLengthText = "1.54187106666667"; - this.horizontalAxisUserControl.WaveSource = Crystallography.WaveSource.Xray; - this.horizontalAxisUserControl.XrayWaveSourceElementNumber = 29; - this.horizontalAxisUserControl.XrayWaveSourceLine = Crystallography.XrayLine.Ka; - this.horizontalAxisUserControl.AxisPropertyChanged += new Crystallography.Controls.HorizontalAxisUserControl.MyEventHandler(this.horizontalAxisUserControl_AxisPropertyChanged); - // // flowLayoutPanel4 // resources.ApplyResources(this.flowLayoutPanel4, "flowLayoutPanel4"); @@ -705,20 +689,6 @@ private void InitializeComponent() this.groupBox3.Name = "groupBox3"; this.groupBox3.TabStop = false; // - // numericalTextBoxIncreasingPixels - // - resources.ApplyResources(this.numericalTextBoxIncreasingPixels, "numericalTextBoxIncreasingPixels"); - this.numericalTextBoxIncreasingPixels.BackColor = System.Drawing.SystemColors.Control; - this.numericalTextBoxIncreasingPixels.FooterBackColor = System.Drawing.SystemColors.Control; - this.numericalTextBoxIncreasingPixels.HeaderBackColor = System.Drawing.SystemColors.Control; - this.numericalTextBoxIncreasingPixels.Name = "numericalTextBoxIncreasingPixels"; - this.numericalTextBoxIncreasingPixels.RadianValue = 17.872171540421935D; - this.numericalTextBoxIncreasingPixels.RestrictLimitValue = false; - this.numericalTextBoxIncreasingPixels.SkipEventDuringInput = false; - this.numericalTextBoxIncreasingPixels.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numericalTextBoxIncreasingPixels.Value = 1024D; - this.numericalTextBoxIncreasingPixels.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.radioButtonMultiProfileMode_CheckChanged); - // // numericUpDownIncreasingPixels // resources.ApplyResources(this.numericUpDownIncreasingPixels, "numericUpDownIncreasingPixels"); @@ -786,57 +756,6 @@ private void InitializeComponent() this.groupBox2.Name = "groupBox2"; this.groupBox2.TabStop = false; // - // colorControlScaleText - // - this.colorControlScaleText.Argb = -16777216; - resources.ApplyResources(this.colorControlScaleText, "colorControlScaleText"); - this.colorControlScaleText.Blue = 0; - this.colorControlScaleText.BlueF = 0F; - this.colorControlScaleText.BoxSize = new System.Drawing.Size(20, 20); - this.colorControlScaleText.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.colorControlScaleText.FlowDirection = System.Windows.Forms.FlowDirection.LeftToRight; - this.colorControlScaleText.Green = 0; - this.colorControlScaleText.GreenF = 0F; - this.colorControlScaleText.Name = "colorControlScaleText"; - this.colorControlScaleText.Red = 0; - this.colorControlScaleText.RedF = 0F; - this.toolTip.SetToolTip(this.colorControlScaleText, resources.GetString("colorControlScaleText.ToolTip")); - this.colorControlScaleText.ColorChanged += new System.EventHandler(this.Draw); - // - // colorControlScaleLine - // - this.colorControlScaleLine.Argb = -2894893; - resources.ApplyResources(this.colorControlScaleLine, "colorControlScaleLine"); - this.colorControlScaleLine.Blue = 211; - this.colorControlScaleLine.BlueF = 0.827451F; - this.colorControlScaleLine.BoxSize = new System.Drawing.Size(20, 20); - this.colorControlScaleLine.Color = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(211)))), ((int)(((byte)(211))))); - this.colorControlScaleLine.FlowDirection = System.Windows.Forms.FlowDirection.LeftToRight; - this.colorControlScaleLine.Green = 211; - this.colorControlScaleLine.GreenF = 0.827451F; - this.colorControlScaleLine.Name = "colorControlScaleLine"; - this.colorControlScaleLine.Red = 211; - this.colorControlScaleLine.RedF = 0.827451F; - this.toolTip.SetToolTip(this.colorControlScaleLine, resources.GetString("colorControlScaleLine.ToolTip")); - this.colorControlScaleLine.ColorChanged += new System.EventHandler(this.Draw); - // - // colorControlBack - // - this.colorControlBack.Argb = -1; - resources.ApplyResources(this.colorControlBack, "colorControlBack"); - this.colorControlBack.Blue = 255; - this.colorControlBack.BlueF = 1F; - this.colorControlBack.BoxSize = new System.Drawing.Size(20, 20); - this.colorControlBack.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - this.colorControlBack.FlowDirection = System.Windows.Forms.FlowDirection.LeftToRight; - this.colorControlBack.Green = 255; - this.colorControlBack.GreenF = 1F; - this.colorControlBack.Name = "colorControlBack"; - this.colorControlBack.Red = 255; - this.colorControlBack.RedF = 1F; - this.toolTip.SetToolTip(this.colorControlBack, resources.GetString("colorControlBack.ToolTip")); - this.colorControlBack.ColorChanged += new System.EventHandler(this.Draw); - // // label5 // resources.ApplyResources(this.label5, "label5"); @@ -1008,52 +927,6 @@ private void InitializeComponent() this.comboBoxScale1.Name = "comboBoxScale1"; this.comboBoxScale1.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxScale_SelectedIndexChanged); // - // graphControlFrequency - // - this.graphControlFrequency.AllowMouseOperation = true; - resources.ApplyResources(this.graphControlFrequency, "graphControlFrequency"); - this.graphControlFrequency.BackgroundColor = System.Drawing.Color.White; - this.graphControlFrequency.BottomMargin = 0D; - this.graphControlFrequency.DivisionLineColor = System.Drawing.Color.Gray; - this.graphControlFrequency.DivisionSubLineColor = System.Drawing.Color.LightGray; - this.graphControlFrequency.FixRangeHorizontal = false; - this.graphControlFrequency.FixRangeVertical = false; - this.graphControlFrequency.GraphName = ""; - this.graphControlFrequency.HorizontalGradiationTextVisivle = true; - this.graphControlFrequency.Interpolation = false; - this.graphControlFrequency.IsIntegerX = true; - this.graphControlFrequency.IsIntegerY = true; - this.graphControlFrequency.LabelX = "X:"; - this.graphControlFrequency.LabelY = "Y:"; - this.graphControlFrequency.LeftMargin = 0F; - this.graphControlFrequency.LineColor = System.Drawing.Color.Red; - this.graphControlFrequency.LineWidth = 1F; - this.graphControlFrequency.LowerX = 0D; - this.graphControlFrequency.LowerY = 0D; - this.graphControlFrequency.MaximalX = 1D; - this.graphControlFrequency.MaximalY = 1D; - this.graphControlFrequency.MinimalX = 0D; - this.graphControlFrequency.MinimalY = 0D; - this.graphControlFrequency.Mode = Crystallography.Controls.GraphControl.DrawingMode.Line; - this.graphControlFrequency.MousePositionVisible = true; - this.graphControlFrequency.Name = "graphControlFrequency"; - this.graphControlFrequency.OriginPosition = new System.Drawing.Point(40, 20); - this.graphControlFrequency.Smoothing = false; - this.graphControlFrequency.TextFont = new System.Drawing.Font("Arial", 9F); - this.graphControlFrequency.UnitX = ""; - this.graphControlFrequency.UnitY = ""; - this.graphControlFrequency.UpperText = ""; - this.graphControlFrequency.UpperTextVisible = true; - this.graphControlFrequency.UpperX = 1D; - this.graphControlFrequency.UpperY = 1D; - this.graphControlFrequency.UseLineWidth = true; - this.graphControlFrequency.VerticalGradiationTextVisivle = true; - this.graphControlFrequency.XLog = true; - this.graphControlFrequency.XScaleLineVisible = true; - this.graphControlFrequency.YLog = true; - this.graphControlFrequency.YScaleLineVisible = true; - this.graphControlFrequency.LinePositionChanged += new Crystallography.Controls.GraphControl.LinePositionChengedEventHandler(this.graphControlFrequency_LinePositionChanged); - // // pictureBoxMain // this.pictureBoxMain.BackColor = System.Drawing.Color.White; @@ -1076,104 +949,34 @@ private void InitializeComponent() // tableLayoutPanel2 // resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2"); + this.tableLayoutPanel2.Controls.Add(this.numericBoxUpperX, 3, 0); this.tableLayoutPanel2.Controls.Add(this.numericBoxUpperY, 7, 0); + this.tableLayoutPanel2.Controls.Add(this.numericBoxLowerX, 1, 0); this.tableLayoutPanel2.Controls.Add(this.labelIntensity, 10, 0); this.tableLayoutPanel2.Controls.Add(this.numericBoxLowerY, 5, 0); this.tableLayoutPanel2.Controls.Add(this.labelD, 9, 0); - this.tableLayoutPanel2.Controls.Add(this.numericBoxUpperX, 3, 0); this.tableLayoutPanel2.Controls.Add(this.labelTwoTheta, 8, 0); - this.tableLayoutPanel2.Controls.Add(this.numericBoxLowerX, 1, 0); this.tableLayoutPanel2.Controls.Add(this.label11, 6, 0); this.tableLayoutPanel2.Controls.Add(this.label10, 2, 0); this.tableLayoutPanel2.Controls.Add(this.labelX, 0, 0); this.tableLayoutPanel2.Controls.Add(this.label9, 4, 0); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; // - // numericBoxUpperY - // - resources.ApplyResources(this.numericBoxUpperY, "numericBoxUpperY"); - this.numericBoxUpperY.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxUpperY.DecimalPlaces = 2; - this.numericBoxUpperY.FooterBackColor = System.Drawing.SystemColors.Control; - this.numericBoxUpperY.HeaderBackColor = System.Drawing.SystemColors.Control; - this.numericBoxUpperY.Maximum = 1000D; - this.numericBoxUpperY.Minimum = 0D; - this.numericBoxUpperY.Name = "numericBoxUpperY"; - this.numericBoxUpperY.RadianValue = 17.453292519943293D; - this.numericBoxUpperY.ShowUpDown = true; - this.numericBoxUpperY.SmartIncrement = true; - this.numericBoxUpperY.ThonsandsSeparator = true; - this.numericBoxUpperY.Value = 1000D; - this.numericBoxUpperY.WordWrap = false; - this.numericBoxUpperY.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBox_ValueChanged); - // // labelIntensity // resources.ApplyResources(this.labelIntensity, "labelIntensity"); this.labelIntensity.Name = "labelIntensity"; // - // numericBoxLowerY - // - resources.ApplyResources(this.numericBoxLowerY, "numericBoxLowerY"); - this.numericBoxLowerY.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxLowerY.DecimalPlaces = 2; - this.numericBoxLowerY.FooterBackColor = System.Drawing.SystemColors.Control; - this.numericBoxLowerY.HeaderBackColor = System.Drawing.SystemColors.Control; - this.numericBoxLowerY.Maximum = 1000D; - this.numericBoxLowerY.Minimum = 0D; - this.numericBoxLowerY.Name = "numericBoxLowerY"; - this.numericBoxLowerY.ShowUpDown = true; - this.numericBoxLowerY.SmartIncrement = true; - this.numericBoxLowerY.ThonsandsSeparator = true; - this.numericBoxLowerY.WordWrap = false; - this.numericBoxLowerY.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBox_ValueChanged); - // // labelD // resources.ApplyResources(this.labelD, "labelD"); this.labelD.Name = "labelD"; // - // numericBoxUpperX - // - resources.ApplyResources(this.numericBoxUpperX, "numericBoxUpperX"); - this.numericBoxUpperX.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxUpperX.DecimalPlaces = 2; - this.numericBoxUpperX.FooterBackColor = System.Drawing.SystemColors.Control; - this.numericBoxUpperX.HeaderBackColor = System.Drawing.SystemColors.Control; - this.numericBoxUpperX.Maximum = 30D; - this.numericBoxUpperX.Minimum = 0D; - this.numericBoxUpperX.Name = "numericBoxUpperX"; - this.numericBoxUpperX.RadianValue = 0.52359877559829882D; - this.numericBoxUpperX.ShowUpDown = true; - this.numericBoxUpperX.SmartIncrement = true; - this.numericBoxUpperX.ThonsandsSeparator = true; - this.numericBoxUpperX.Value = 30D; - this.numericBoxUpperX.WordWrap = false; - this.numericBoxUpperX.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBox_ValueChanged); - this.numericBoxUpperX.LimitChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxUpperX_LimitChanged); - // // labelTwoTheta // resources.ApplyResources(this.labelTwoTheta, "labelTwoTheta"); this.labelTwoTheta.Name = "labelTwoTheta"; // - // numericBoxLowerX - // - resources.ApplyResources(this.numericBoxLowerX, "numericBoxLowerX"); - this.numericBoxLowerX.BackColor = System.Drawing.SystemColors.Control; - this.numericBoxLowerX.DecimalPlaces = 2; - this.numericBoxLowerX.FooterBackColor = System.Drawing.SystemColors.Control; - this.numericBoxLowerX.HeaderBackColor = System.Drawing.SystemColors.Control; - this.numericBoxLowerX.Maximum = 30D; - this.numericBoxLowerX.Minimum = 0D; - this.numericBoxLowerX.Name = "numericBoxLowerX"; - this.numericBoxLowerX.ShowUpDown = true; - this.numericBoxLowerX.SmartIncrement = true; - this.numericBoxLowerX.ThonsandsSeparator = true; - this.numericBoxLowerX.WordWrap = false; - this.numericBoxLowerX.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBox_ValueChanged); - this.numericBoxLowerX.LimitChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxUpperX_LimitChanged); - // // label11 // resources.ApplyResources(this.label11, "label11"); @@ -1272,23 +1075,6 @@ private void InitializeComponent() this.checkDataGridViewCheckBoxColumn2.Name = "checkDataGridViewCheckBoxColumn2"; this.checkDataGridViewCheckBoxColumn2.ReadOnly = true; // - // colorDataGridViewTextBoxColumn - // - this.colorDataGridViewTextBoxColumn.DataPropertyName = "Color"; - resources.ApplyResources(this.colorDataGridViewTextBoxColumn, "colorDataGridViewTextBoxColumn"); - this.colorDataGridViewTextBoxColumn.Name = "colorDataGridViewTextBoxColumn"; - this.colorDataGridViewTextBoxColumn.ReadOnly = true; - this.colorDataGridViewTextBoxColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colorDataGridViewTextBoxColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - // - // profileDataGridViewTextBoxColumn - // - this.profileDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.profileDataGridViewTextBoxColumn.DataPropertyName = "Profile"; - resources.ApplyResources(this.profileDataGridViewTextBoxColumn, "profileDataGridViewTextBoxColumn"); - this.profileDataGridViewTextBoxColumn.Name = "profileDataGridViewTextBoxColumn"; - this.profileDataGridViewTextBoxColumn.ReadOnly = true; - // // bindingSourceProfile // this.bindingSourceProfile.DataMember = "DataTableProfile"; @@ -1382,26 +1168,6 @@ private void InitializeComponent() this.checkDataGridViewCheckBoxColumn1.ReadOnly = true; this.checkDataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False; // - // PeakColor - // - this.PeakColor.DataPropertyName = "PeakColor"; - resources.ApplyResources(this.PeakColor, "PeakColor"); - this.PeakColor.Name = "PeakColor"; - this.PeakColor.ReadOnly = true; - this.PeakColor.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.PeakColor.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - // - // Crystal - // - this.Crystal.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.Crystal.DataPropertyName = "Crystal"; - dataGridViewCellStyle6.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Crystal.DefaultCellStyle = dataGridViewCellStyle6; - resources.ApplyResources(this.Crystal, "Crystal"); - this.Crystal.Name = "Crystal"; - this.Crystal.ReadOnly = true; - this.Crystal.Resizable = System.Windows.Forms.DataGridViewTriState.False; - // // bindingSourceCrystal // this.bindingSourceCrystal.DataMember = "DataTableCrystal"; @@ -3597,6 +3363,280 @@ private void InitializeComponent() this.dataGridViewTextBoxColumn108.ReadOnly = true; this.dataGridViewTextBoxColumn108.Resizable = System.Windows.Forms.DataGridViewTriState.False; // + // dataGridViewImageColumn84 + // + this.dataGridViewImageColumn84.DataPropertyName = "Color"; + resources.ApplyResources(this.dataGridViewImageColumn84, "dataGridViewImageColumn84"); + this.dataGridViewImageColumn84.Name = "dataGridViewImageColumn84"; + this.dataGridViewImageColumn84.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridViewImageColumn84.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // dataGridViewTextBoxColumn109 + // + this.dataGridViewTextBoxColumn109.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.dataGridViewTextBoxColumn109.DataPropertyName = "Profile"; + resources.ApplyResources(this.dataGridViewTextBoxColumn109, "dataGridViewTextBoxColumn109"); + this.dataGridViewTextBoxColumn109.Name = "dataGridViewTextBoxColumn109"; + // + // dataGridViewImageColumn85 + // + this.dataGridViewImageColumn85.DataPropertyName = "PeakColor"; + resources.ApplyResources(this.dataGridViewImageColumn85, "dataGridViewImageColumn85"); + this.dataGridViewImageColumn85.Name = "dataGridViewImageColumn85"; + this.dataGridViewImageColumn85.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewImageColumn85.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // dataGridViewTextBoxColumn110 + // + this.dataGridViewTextBoxColumn110.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.dataGridViewTextBoxColumn110.DataPropertyName = "Crystal"; + dataGridViewCellStyle73.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.dataGridViewTextBoxColumn110.DefaultCellStyle = dataGridViewCellStyle73; + resources.ApplyResources(this.dataGridViewTextBoxColumn110, "dataGridViewTextBoxColumn110"); + this.dataGridViewTextBoxColumn110.Name = "dataGridViewTextBoxColumn110"; + this.dataGridViewTextBoxColumn110.Resizable = System.Windows.Forms.DataGridViewTriState.False; + // + // horizontalAxisUserControl + // + resources.ApplyResources(this.horizontalAxisUserControl, "horizontalAxisUserControl"); + this.horizontalAxisUserControl.AxisMode = Crystallography.HorizontalAxis.Angle; + this.horizontalAxisUserControl.ElectronAccVoltage = 8.04114721308336D; + this.horizontalAxisUserControl.ElectronAccVoltageText = "8.04114721308336"; + this.horizontalAxisUserControl.EnergyUnit = Crystallography.EnergyUnitEnum.eV; + this.horizontalAxisUserControl.Name = "horizontalAxisUserControl"; + this.horizontalAxisUserControl.TakeoffAngle = 0D; + this.horizontalAxisUserControl.TakeoffAngleText = "0"; + this.horizontalAxisUserControl.TofAngle = 1.5707963267948966D; + this.horizontalAxisUserControl.TofAngleText = "90"; + this.horizontalAxisUserControl.TofLength = 90D; + this.horizontalAxisUserControl.WaveColor = Crystallography.WaveColor.Monochrome; + this.horizontalAxisUserControl.WaveLength = 0.15418710666666666D; + this.horizontalAxisUserControl.WaveLengthText = "1.54187106666667"; + this.horizontalAxisUserControl.WaveSource = Crystallography.WaveSource.Xray; + this.horizontalAxisUserControl.XrayWaveSourceElementNumber = 29; + this.horizontalAxisUserControl.XrayWaveSourceLine = Crystallography.XrayLine.Ka; + this.horizontalAxisUserControl.AxisPropertyChanged += new Crystallography.Controls.HorizontalAxisUserControl.MyEventHandler(this.horizontalAxisUserControl_AxisPropertyChanged); + // + // numericalTextBoxIncreasingPixels + // + resources.ApplyResources(this.numericalTextBoxIncreasingPixels, "numericalTextBoxIncreasingPixels"); + this.numericalTextBoxIncreasingPixels.BackColor = System.Drawing.SystemColors.Control; + this.numericalTextBoxIncreasingPixels.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericalTextBoxIncreasingPixels.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericalTextBoxIncreasingPixels.Name = "numericalTextBoxIncreasingPixels"; + this.numericalTextBoxIncreasingPixels.RadianValue = 17.872171540421935D; + this.numericalTextBoxIncreasingPixels.RestrictLimitValue = false; + this.numericalTextBoxIncreasingPixels.SkipEventDuringInput = false; + this.numericalTextBoxIncreasingPixels.TextFont = new System.Drawing.Font("Segoe UI Symbol", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.numericalTextBoxIncreasingPixels.Value = 1024D; + this.numericalTextBoxIncreasingPixels.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.radioButtonMultiProfileMode_CheckChanged); + // + // colorControlScaleText + // + this.colorControlScaleText.Argb = -16777216; + resources.ApplyResources(this.colorControlScaleText, "colorControlScaleText"); + this.colorControlScaleText.Blue = 0; + this.colorControlScaleText.BlueF = 0F; + this.colorControlScaleText.BoxSize = new System.Drawing.Size(20, 20); + this.colorControlScaleText.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.colorControlScaleText.FlowDirection = System.Windows.Forms.FlowDirection.LeftToRight; + this.colorControlScaleText.Green = 0; + this.colorControlScaleText.GreenF = 0F; + this.colorControlScaleText.Name = "colorControlScaleText"; + this.colorControlScaleText.Red = 0; + this.colorControlScaleText.RedF = 0F; + this.toolTip.SetToolTip(this.colorControlScaleText, resources.GetString("colorControlScaleText.ToolTip")); + this.colorControlScaleText.ColorChanged += new System.EventHandler(this.Draw); + // + // colorControlScaleLine + // + this.colorControlScaleLine.Argb = -2894893; + resources.ApplyResources(this.colorControlScaleLine, "colorControlScaleLine"); + this.colorControlScaleLine.Blue = 211; + this.colorControlScaleLine.BlueF = 0.827451F; + this.colorControlScaleLine.BoxSize = new System.Drawing.Size(20, 20); + this.colorControlScaleLine.Color = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(211)))), ((int)(((byte)(211))))); + this.colorControlScaleLine.FlowDirection = System.Windows.Forms.FlowDirection.LeftToRight; + this.colorControlScaleLine.Green = 211; + this.colorControlScaleLine.GreenF = 0.827451F; + this.colorControlScaleLine.Name = "colorControlScaleLine"; + this.colorControlScaleLine.Red = 211; + this.colorControlScaleLine.RedF = 0.827451F; + this.toolTip.SetToolTip(this.colorControlScaleLine, resources.GetString("colorControlScaleLine.ToolTip")); + this.colorControlScaleLine.ColorChanged += new System.EventHandler(this.Draw); + // + // colorControlBack + // + this.colorControlBack.Argb = -1; + resources.ApplyResources(this.colorControlBack, "colorControlBack"); + this.colorControlBack.Blue = 255; + this.colorControlBack.BlueF = 1F; + this.colorControlBack.BoxSize = new System.Drawing.Size(20, 20); + this.colorControlBack.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.colorControlBack.FlowDirection = System.Windows.Forms.FlowDirection.LeftToRight; + this.colorControlBack.Green = 255; + this.colorControlBack.GreenF = 1F; + this.colorControlBack.Name = "colorControlBack"; + this.colorControlBack.Red = 255; + this.colorControlBack.RedF = 1F; + this.toolTip.SetToolTip(this.colorControlBack, resources.GetString("colorControlBack.ToolTip")); + this.colorControlBack.ColorChanged += new System.EventHandler(this.Draw); + // + // graphControlFrequency + // + this.graphControlFrequency.AllowMouseOperation = true; + resources.ApplyResources(this.graphControlFrequency, "graphControlFrequency"); + this.graphControlFrequency.BackgroundColor = System.Drawing.Color.White; + this.graphControlFrequency.BottomMargin = 0D; + this.graphControlFrequency.DivisionLineColor = System.Drawing.Color.Gray; + this.graphControlFrequency.DivisionSubLineColor = System.Drawing.Color.LightGray; + this.graphControlFrequency.FixRangeHorizontal = false; + this.graphControlFrequency.FixRangeVertical = false; + this.graphControlFrequency.GraphName = ""; + this.graphControlFrequency.HorizontalGradiationTextVisivle = true; + this.graphControlFrequency.Interpolation = false; + this.graphControlFrequency.IsIntegerX = true; + this.graphControlFrequency.IsIntegerY = true; + this.graphControlFrequency.LabelX = "X:"; + this.graphControlFrequency.LabelY = "Y:"; + this.graphControlFrequency.LeftMargin = 0F; + this.graphControlFrequency.LineColor = System.Drawing.Color.Red; + this.graphControlFrequency.LineWidth = 1F; + this.graphControlFrequency.LowerX = 0D; + this.graphControlFrequency.LowerY = 0D; + this.graphControlFrequency.MaximalX = 1D; + this.graphControlFrequency.MaximalY = 1D; + this.graphControlFrequency.MinimalX = 0D; + this.graphControlFrequency.MinimalY = 0D; + this.graphControlFrequency.Mode = Crystallography.Controls.GraphControl.DrawingMode.Line; + this.graphControlFrequency.MousePositionVisible = true; + this.graphControlFrequency.Name = "graphControlFrequency"; + this.graphControlFrequency.OriginPosition = new System.Drawing.Point(40, 20); + this.graphControlFrequency.Smoothing = false; + this.graphControlFrequency.TextFont = new System.Drawing.Font("Arial", 9F); + this.graphControlFrequency.UnitX = ""; + this.graphControlFrequency.UnitY = ""; + this.graphControlFrequency.UpperText = ""; + this.graphControlFrequency.UpperTextVisible = true; + this.graphControlFrequency.UpperX = 1D; + this.graphControlFrequency.UpperY = 1D; + this.graphControlFrequency.UseLineWidth = true; + this.graphControlFrequency.VerticalGradiationTextVisivle = true; + this.graphControlFrequency.XLog = true; + this.graphControlFrequency.XScaleLineVisible = true; + this.graphControlFrequency.YLog = true; + this.graphControlFrequency.YScaleLineVisible = true; + this.graphControlFrequency.LinePositionChanged += new Crystallography.Controls.GraphControl.LinePositionChengedEventHandler(this.graphControlFrequency_LinePositionChanged); + // + // numericBoxUpperY + // + resources.ApplyResources(this.numericBoxUpperY, "numericBoxUpperY"); + this.numericBoxUpperY.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxUpperY.DecimalPlaces = 2; + this.numericBoxUpperY.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxUpperY.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxUpperY.Maximum = 1000D; + this.numericBoxUpperY.Minimum = 0D; + this.numericBoxUpperY.Name = "numericBoxUpperY"; + this.numericBoxUpperY.RadianValue = 17.453292519943293D; + this.numericBoxUpperY.ShowUpDown = true; + this.numericBoxUpperY.SmartIncrement = true; + this.numericBoxUpperY.ThonsandsSeparator = true; + this.numericBoxUpperY.Value = 1000D; + this.numericBoxUpperY.WordWrap = false; + this.numericBoxUpperY.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBox_ValueChanged); + // + // numericBoxLowerY + // + resources.ApplyResources(this.numericBoxLowerY, "numericBoxLowerY"); + this.numericBoxLowerY.BackColor = System.Drawing.SystemColors.Control; + this.numericBoxLowerY.DecimalPlaces = 2; + this.numericBoxLowerY.FooterBackColor = System.Drawing.SystemColors.Control; + this.numericBoxLowerY.HeaderBackColor = System.Drawing.SystemColors.Control; + this.numericBoxLowerY.Maximum = 1000D; + this.numericBoxLowerY.Minimum = 0D; + this.numericBoxLowerY.Name = "numericBoxLowerY"; + this.numericBoxLowerY.ShowUpDown = true; + this.numericBoxLowerY.SmartIncrement = true; + this.numericBoxLowerY.ThonsandsSeparator = true; + this.numericBoxLowerY.WordWrap = false; + this.numericBoxLowerY.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBox_ValueChanged); + // + // colorDataGridViewTextBoxColumn + // + this.colorDataGridViewTextBoxColumn.DataPropertyName = "Color"; + resources.ApplyResources(this.colorDataGridViewTextBoxColumn, "colorDataGridViewTextBoxColumn"); + this.colorDataGridViewTextBoxColumn.Name = "colorDataGridViewTextBoxColumn"; + this.colorDataGridViewTextBoxColumn.ReadOnly = true; + this.colorDataGridViewTextBoxColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colorDataGridViewTextBoxColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // profileDataGridViewTextBoxColumn + // + this.profileDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.profileDataGridViewTextBoxColumn.DataPropertyName = "Profile"; + resources.ApplyResources(this.profileDataGridViewTextBoxColumn, "profileDataGridViewTextBoxColumn"); + this.profileDataGridViewTextBoxColumn.Name = "profileDataGridViewTextBoxColumn"; + this.profileDataGridViewTextBoxColumn.ReadOnly = true; + // + // PeakColor + // + this.PeakColor.DataPropertyName = "PeakColor"; + resources.ApplyResources(this.PeakColor, "PeakColor"); + this.PeakColor.Name = "PeakColor"; + this.PeakColor.ReadOnly = true; + this.PeakColor.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.PeakColor.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // Crystal + // + this.Crystal.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.Crystal.DataPropertyName = "Crystal"; + dataGridViewCellStyle6.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Crystal.DefaultCellStyle = dataGridViewCellStyle6; + resources.ApplyResources(this.Crystal, "Crystal"); + this.Crystal.Name = "Crystal"; + this.Crystal.ReadOnly = true; + this.Crystal.Resizable = System.Windows.Forms.DataGridViewTriState.False; + // + // numericBoxLowerX + // + this.numericBoxLowerX.AllowMouseControl = false; + this.numericBoxLowerX.BackColor = System.Drawing.Color.Transparent; + this.numericBoxLowerX.DecimalPlaces = 2; + resources.ApplyResources(this.numericBoxLowerX, "numericBoxLowerX"); + this.numericBoxLowerX.Maximum = 30D; + this.numericBoxLowerX.Minimum = 0D; + this.numericBoxLowerX.MouseDirection = Crystallography.VH_DirectionEnum.Vertical; + this.numericBoxLowerX.MouseSpeed = 1D; + this.numericBoxLowerX.Name = "numericBoxLowerX"; + this.numericBoxLowerX.ShowUpDown = true; + this.numericBoxLowerX.SmartIncrement = true; + this.numericBoxLowerX.ThonsandsSeparator = true; + this.numericBoxLowerX.WordWrap = false; + this.numericBoxLowerX.LimitChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxUpperX_LimitChanged); + this.numericBoxLowerX.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBox_ValueChanged); + // + // numericBoxUpperX + // + this.numericBoxUpperX.AllowMouseControl = false; + this.numericBoxUpperX.BackColor = System.Drawing.Color.Transparent; + this.numericBoxUpperX.DecimalPlaces = 2; + resources.ApplyResources(this.numericBoxUpperX, "numericBoxUpperX"); + this.numericBoxUpperX.Maximum = 30D; + this.numericBoxUpperX.Minimum = 0D; + this.numericBoxUpperX.MouseDirection = Crystallography.VH_DirectionEnum.Vertical; + this.numericBoxUpperX.MouseSpeed = 1D; + this.numericBoxUpperX.Name = "numericBoxUpperX"; + this.numericBoxUpperX.RadianValue = 0.52359877559829882D; + this.numericBoxUpperX.ShowUpDown = true; + this.numericBoxUpperX.SmartIncrement = true; + this.numericBoxUpperX.ThonsandsSeparator = true; + this.numericBoxUpperX.Value = 30D; + this.numericBoxUpperX.WordWrap = false; + this.numericBoxUpperX.LimitChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBoxUpperX_LimitChanged); + this.numericBoxUpperX.ValueChanged += new Crystallography.Controls.NumericBox.MyEventHandler(this.numericBox_ValueChanged); + // // FormMain // this.AllowDrop = true; @@ -3958,7 +3998,6 @@ private void InitializeComponent() private DataGridViewTextBoxColumn dataGridViewTextBoxColumn82; private DataGridViewImageColumn dataGridViewImageColumn58; private DataGridViewTextBoxColumn dataGridViewTextBoxColumn83; - private Crystallography.Controls.NumericBox numericBoxLowerX; private DataGridViewImageColumn dataGridViewImageColumn59; private DataGridViewTextBoxColumn dataGridViewTextBoxColumn84; private DataGridViewImageColumn dataGridViewImageColumn60; @@ -3973,7 +4012,6 @@ private void InitializeComponent() private DataGridViewTextBoxColumn dataGridViewTextBoxColumn89; private Crystallography.Controls.NumericBox numericBoxUpperY; private Crystallography.Controls.NumericBox numericBoxLowerY; - private Crystallography.Controls.NumericBox numericBoxUpperX; private DataGridViewImageColumn dataGridViewImageColumn65; private DataGridViewTextBoxColumn dataGridViewTextBoxColumn90; private DataGridViewImageColumn dataGridViewImageColumn66; @@ -4013,5 +4051,11 @@ private void InitializeComponent() private DataGridViewTextBoxColumn dataGridViewTextBoxColumn106; private DataGridViewImageColumn dataGridViewImageColumn83; private DataGridViewTextBoxColumn dataGridViewTextBoxColumn108; + private Crystallography.Controls.NumericBoxWithMenu numericBoxLowerX; + private DataGridViewImageColumn dataGridViewImageColumn84; + private DataGridViewTextBoxColumn dataGridViewTextBoxColumn109; + private DataGridViewImageColumn dataGridViewImageColumn85; + private DataGridViewTextBoxColumn dataGridViewTextBoxColumn110; + private Crystallography.Controls.NumericBoxWithMenu numericBoxUpperX; } } \ No newline at end of file diff --git a/PDIndexer/FormMain.cs b/PDIndexer/FormMain.cs index 0ae5e82..7fc0165 100644 --- a/PDIndexer/FormMain.cs +++ b/PDIndexer/FormMain.cs @@ -1,4 +1,6 @@ -using System; +#region using + +using System; using System.Drawing; using System.ComponentModel; using System.Windows.Forms; @@ -20,13 +22,15 @@ using IronPython.Hosting; using System.Net; +#endregion + namespace PDIndexer { /// /// PDIndexer の概要の説明です。 /// /// - public partial class FormMain : System.Windows.Forms.Form + public partial class FormMain : Form { #region enum public enum FileType @@ -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 { diff --git a/PDIndexer/FormMain.resx b/PDIndexer/FormMain.resx index 0648916..4adbe44 100644 --- a/PDIndexer/FormMain.resx +++ b/PDIndexer/FormMain.resx @@ -238,7 +238,7 @@ horizontalAxisUserControl - Crystallography.Controls.HorizontalAxisUserControl, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.HorizontalAxisUserControl, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null tabPage1 @@ -572,7 +572,7 @@ 3, 4, 3, 4 - 1000, 27 + 1000, 25 1, 25 @@ -581,7 +581,7 @@ 1, 1, 1, 1 - 74, 27 + 74, 25 4 @@ -590,7 +590,7 @@ numericalTextBoxIncreasingPixels - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null groupBox3 @@ -836,7 +836,7 @@ colorControlScaleText - Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null groupBox2 @@ -893,7 +893,7 @@ colorControlScaleLine - Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null groupBox2 @@ -950,7 +950,7 @@ colorControlBack - Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.ColorControl, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null groupBox2 @@ -1562,7 +1562,7 @@ graphControlFrequency - Crystallography.Controls.GraphControl, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.GraphControl, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null tabPage3 @@ -1664,6 +1664,42 @@ 11 + + Fill + + + Segoe UI Symbol, 9.75pt + + + 110, 0 + + + 0, 0, 0, 0 + + + 1000, 25 + + + 1, 25 + + + 75, 25 + + + 89 + + + numericBoxUpperX + + + Crystallography.Controls.NumericBoxWithMenu, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel2 + + + 0 + GrowAndShrink @@ -1698,13 +1734,49 @@ numericBoxUpperY - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null tableLayoutPanel2 - 0 + 1 + + + Fill + + + Segoe UI Symbol, 9.75pt + + + 23, 0 + + + 0, 0, 0, 0 + + + 1000, 25 + + + 1, 25 + + + 75, 25 + + + 89 + + + numericBoxLowerX + + + Crystallography.Controls.NumericBoxWithMenu, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel2 + + + 2 Top, Left, Right @@ -1740,7 +1812,7 @@ tableLayoutPanel2 - 1 + 3 GrowAndShrink @@ -1776,13 +1848,13 @@ numericBoxLowerY - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null + Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.8.30.345, Culture=neutral, PublicKeyToken=null tableLayoutPanel2 - 2 + 4 Top, Left, Right @@ -1818,49 +1890,7 @@ tableLayoutPanel2 - 3 - - - GrowAndShrink - - - Fill - - - Segoe UI Symbol, 9.75pt - - - 110, 0 - - - 0, 0, 0, 0 - - - 1000, 25 - - - 1, 25 - - - 0, 0, 1, 0 - - - 75, 25 - - - 2 - - - numericBoxUpperX - - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null - - - tableLayoutPanel2 - - - 4 + 5 Top, Left, Right @@ -1896,48 +1926,6 @@ tableLayoutPanel2 - 5 - - - GrowAndShrink - - - Fill - - - Segoe UI Symbol, 9.75pt - - - 23, 0 - - - 0, 0, 0, 0 - - - 1000, 25 - - - 1, 25 - - - 0, 0, 1, 0 - - - 75, 25 - - - 1 - - - numericBoxLowerX - - - Crystallography.Controls.NumericBox, Crystallography.Controls, Version=2020.8.29.1033, Culture=neutral, PublicKeyToken=null - - - tableLayoutPanel2 - - 6 @@ -2106,7 +2094,7 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="numericBoxUpperY" Row="0" RowSpan="1" Column="7" ColumnSpan="1" /><Control Name="labelIntensity" Row="0" RowSpan="1" Column="10" ColumnSpan="1" /><Control Name="numericBoxLowerY" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="labelD" Row="0" RowSpan="1" Column="9" ColumnSpan="1" /><Control Name="numericBoxUpperX" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="labelTwoTheta" Row="0" RowSpan="1" Column="8" ColumnSpan="1" /><Control Name="numericBoxLowerX" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="label11" Row="0" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="label10" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="labelX" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label9" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,11.76471,AutoSize,0,Percent,11.76471,AutoSize,0,Percent,11.76471,AutoSize,0,Percent,11.76471,Percent,17.64706,Percent,17.64706,Percent,17.64706" /><Rows Styles="Percent,100" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="numericBoxUpperX" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="numericBoxUpperY" Row="0" RowSpan="1" Column="7" ColumnSpan="1" /><Control Name="numericBoxLowerX" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelIntensity" Row="0" RowSpan="1" Column="10" ColumnSpan="1" /><Control Name="numericBoxLowerY" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="labelD" Row="0" RowSpan="1" Column="9" ColumnSpan="1" /><Control Name="labelTwoTheta" Row="0" RowSpan="1" Column="8" ColumnSpan="1" /><Control Name="label11" Row="0" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="label10" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="labelX" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label9" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,11.76471,AutoSize,0,Percent,11.76471,AutoSize,0,Percent,11.76471,AutoSize,0,Percent,11.76471,Percent,17.64706,Percent,17.64706,Percent,17.64706" /><Rows Styles="Percent,100" /></TableLayoutSettings> Top @@ -4748,6 +4736,36 @@ 10 + + Color + + + 10 + + + 22 + + + Profile + + + 10 + + + PeakColor + + + 10 + + + 20 + + + Crystal + + + 10 + True @@ -4785,6 +4803,9 @@ AABtbQAAq20AAKurAACrqwAAx6sAAMerAADvqwAA76sAAP/HAAD/xwAA/8cAAP/HAAD/7wAA/+8AAA== + + NoControl + 795, 482 @@ -4821,18 +4842,6 @@ System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - colorDataGridViewTextBoxColumn - - - System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - profileDataGridViewTextBoxColumn - - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - bindingSourceProfile @@ -4851,18 +4860,6 @@ System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - PeakColor - - - System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Crystal - - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - bindingSourceCrystal @@ -6393,6 +6390,54 @@ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + dataGridViewImageColumn84 + + + System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + dataGridViewTextBoxColumn109 + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + dataGridViewImageColumn85 + + + System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + dataGridViewTextBoxColumn110 + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + colorDataGridViewTextBoxColumn + + + System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + profileDataGridViewTextBoxColumn + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + PeakColor + + + System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Crystal + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + FormMain diff --git a/PDIndexer/FormProfileSetting.cs b/PDIndexer/FormProfileSetting.cs index 5de36f6..e9e3b76 100644 --- a/PDIndexer/FormProfileSetting.cs +++ b/PDIndexer/FormProfileSetting.cs @@ -15,78 +15,41 @@ namespace PDIndexer { public partial class FormProfileSetting : Form { - public double TwoThetaOffsetCoeff0 { set { numericBoxTwhoThetaOffsetCoeff0.Value=value; }get { return numericBoxTwhoThetaOffsetCoeff0.Value; } } - public double TwoThetaOffsetCoeff1 { set { numericBoxTwhoThetaOffsetCoeff1.Value=value; }get { return numericBoxTwhoThetaOffsetCoeff1.Value; } } - public double TwoThetaOffsetCoeff2 { set { numericBoxTwhoThetaOffsetCoeff2.Value=value; }get { return numericBoxTwhoThetaOffsetCoeff2.Value; } } + #region vpeBAtB[h + public double TwoThetaOffsetCoeff0 { set => numericBoxTwhoThetaOffsetCoeff0.Value = value; get => numericBoxTwhoThetaOffsetCoeff0.Value; } + public double TwoThetaOffsetCoeff1 { set => numericBoxTwhoThetaOffsetCoeff1.Value = value; get => numericBoxTwhoThetaOffsetCoeff1.Value; } + public double TwoThetaOffsetCoeff2 { set => numericBoxTwhoThetaOffsetCoeff2.Value = value; get => numericBoxTwhoThetaOffsetCoeff2.Value; } public int SelectedMaskIndex { set { if (listBoxMaskRanges.Items.Count > value && listBoxMaskRanges.SelectedIndex != value) - listBoxMaskRanges.SelectedIndex = value; + listBoxMaskRanges.SelectedIndex = value; } - get { return listBoxMaskRanges.SelectedIndex; } + get => listBoxMaskRanges.SelectedIndex; } + public FormMain formMain; + #endregion - public void AddMaskRange(DiffractionProfile.MaskingRange range) - { - if (bindingSourceProfile.Position < 0) return; - DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; - dp.maskingRanges.Add(range); - listBoxMaskRanges.Items.Add(range); - } - public DiffractionProfile.MaskingRange[] GetMaskRanges() - { - if (bindingSourceProfile.Position < 0) return null; - DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; - return dp.maskingRanges.ToArray(); - } - public bool SortMaskRanges() - { - if (bindingSourceProfile.Position < 0) return false; - DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; - bool flag = dp.SortMaskRanges(); - skipEvent = true; - for(int i= 0 ; i< dp.maskingRanges.Count; i++) - listBoxMaskRanges.Items[i] = dp.maskingRanges[i]; - skipEvent = false; - return flag; - } - public void SetMaskRange(int[] index, double x) + public FormProfileSetting() { - skipEvent = true; - if (index == null || index.Length != 2) return; - if (bindingSourceProfile.Position < 0) return; - DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; - if (index[0] >= 0 && index[0] < dp.maskingRanges.Count && index[1] >= 0 && index[1] < 2) - { - dp.maskingRanges[index[0]].X[index[1]] = x; - listBoxMaskRanges.Items[index[0]] = dp.maskingRanges[index[0]]; - } - skipEvent = false; + InitializeComponent(); + bindingSourceProfile.CurrentChanged += new EventHandler(bindingSource_CurrentChanged); } - public void DeleteMaskRange(int index) + private void FormProfileSetting_FormClosing(object sender, FormClosingEventArgs e) { - if (bindingSourceProfile.Position < 0) return; - DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; - if (listBoxMaskRanges.Items.Count > index && dp.maskingRanges.Count > index) - { - dp.maskingRanges.RemoveAt(index); - listBoxMaskRanges.Items.RemoveAt(index); - } + e.Cancel = true; + formMain.checkBoxProfileParameter.Checked = false; } + + - public FormMain formMain; - - public FormProfileSetting() - { - InitializeComponent(); - bindingSourceProfile.CurrentChanged += new EventHandler(bindingSource_CurrentChanged); - } + + //vt@C폜{^ꂽƂ private void buttonDeleteProfile_Click(object sender, EventArgs e) { @@ -113,10 +76,7 @@ public void DeleteProfiles(int n) } - private void buttonDeleteAllProfiles_Click(object sender, EventArgs e) - { - DeleteAllProfiles(); - } + private void buttonDeleteAllProfiles_Click(object sender, EventArgs e) => DeleteAllProfiles(); public void DeleteAllProfiles(bool alert = true) { if (alert && MessageBox.Show("Do you want to delete all profiles?", "Warning", MessageBoxButtons.OKCancel) != DialogResult.OK) return; @@ -336,17 +296,9 @@ private void setShiftOption(DiffractionProfile dp) dp.SetConvertedProfile(formMain.AxisMode, formMain.WaveLength, formMain.TakeoffAngle, formMain.TofAngle, formMain.TofLength); } - private void setCommentOption(DiffractionProfile dp) - { - dp.Comment = textBoxComment.Text; - } - + private void setCommentOption(DiffractionProfile dp) => dp.Comment = textBoxComment.Text; - private void FormProfileSetting_FormClosing(object sender, FormClosingEventArgs e) - { - e.Cancel = true; - formMain.checkBoxProfileParameter.Checked = false; - } + private void buttonSetDefaultProfile_Click(object sender, EventArgs e) { @@ -491,6 +443,7 @@ public void bindingSource_CurrentChanged(object sender, EventArgs e) // numericBoxKalpha1.Value = textBoxProfileName.Text = dp.Name; + numericUpDownLineWidth.Value = (decimal)dp.LineWidth; skipEvent = false; formMain.setFrequencyProfile(); @@ -757,6 +710,55 @@ public void buttonCalculate_Click(object sender, EventArgs e) catch { } } + #region }XN֘A + + public void AddMaskRange(DiffractionProfile.MaskingRange range) + { + if (bindingSourceProfile.Position < 0) return; + DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; + dp.maskingRanges.Add(range); + listBoxMaskRanges.Items.Add(range); + } + public DiffractionProfile.MaskingRange[] GetMaskRanges() + { + if (bindingSourceProfile.Position < 0) return null; + DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; + return dp.maskingRanges.ToArray(); + } + public bool SortMaskRanges() + { + if (bindingSourceProfile.Position < 0) return false; + DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; + bool flag = dp.SortMaskRanges(); + skipEvent = true; + for (int i = 0; i < dp.maskingRanges.Count; i++) + listBoxMaskRanges.Items[i] = dp.maskingRanges[i]; + skipEvent = false; + return flag; + } + public void SetMaskRange(int[] index, double x) + { + skipEvent = true; + if (index == null || index.Length != 2) return; + if (bindingSourceProfile.Position < 0) return; + DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; + if (index[0] >= 0 && index[0] < dp.maskingRanges.Count && index[1] >= 0 && index[1] < 2) + { + dp.maskingRanges[index[0]].X[index[1]] = x; + listBoxMaskRanges.Items[index[0]] = dp.maskingRanges[index[0]]; + } + skipEvent = false; + } + public void DeleteMaskRange(int index) + { + if (bindingSourceProfile.Position < 0) return; + DiffractionProfile dp = (DiffractionProfile)((DataRowView)bindingSourceProfile.Current).Row[1]; + if (listBoxMaskRanges.Items.Count > index && dp.maskingRanges.Count > index) + { + dp.maskingRanges.RemoveAt(index); + listBoxMaskRanges.Items.RemoveAt(index); + } + } private void buttonDeleteMask_Click(object sender, EventArgs e) { if (bindingSourceProfile.Position < 0 || listBoxMaskRanges.SelectedIndex < 0) return; @@ -873,20 +875,11 @@ private void listBoxMaskRanges_DragEnter(object sender, DragEventArgs e) else e.Effect = DragDropEffects.None;//t@CȊO͎󂯕tȂ } - - private void checkBoxAll_CheckedChanged(object sender, EventArgs e) - { - - } - - private void buttonTwoThetaCalibration_Click(object sender, EventArgs e) - { - formMain.formTwoThetaCalibration.Visible = !formMain.formTwoThetaCalibration.Visible; - } + #endregion + private void buttonTwoThetaCalibration_Click(object sender, EventArgs e) + => formMain.formTwoThetaCalibration.Visible = !formMain.formTwoThetaCalibration.Visible; private void buttonTwoThetaOffsetReset_Click(object sender, EventArgs e) - { - TwoThetaOffsetCoeff0 = TwoThetaOffsetCoeff1 = TwoThetaOffsetCoeff2 = 0; - } + => TwoThetaOffsetCoeff0 = TwoThetaOffsetCoeff1 = TwoThetaOffsetCoeff2 = 0; } } \ No newline at end of file diff --git a/PDIndexer/Properties/AssemblyInfo.cs b/PDIndexer/Properties/AssemblyInfo.cs index 9d0c338..2f62213 100644 --- a/PDIndexer/Properties/AssemblyInfo.cs +++ b/PDIndexer/Properties/AssemblyInfo.cs @@ -27,7 +27,7 @@ // ɂ悤ɁA'*' gāAׂĂ̒lw肷邩A // rhуrWԍlɂ邱Ƃł܂B -[assembly: AssemblyVersion("2020.8.30.0301")] +[assembly: AssemblyVersion("2020.8.30.0400")] // // AZuɏɂ́AgpL[w肵Ȃ΂Ȃ܂B @@ -57,6 +57,6 @@ [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] -[assembly: AssemblyFileVersion("2020.8.30.0301")] +[assembly: AssemblyFileVersion("2020.8.30.0400")] [assembly: ComVisible(false)]