This commit is contained in:
chi
2023-10-19 12:37:49 +09:00
parent 2f66e3cca1
commit aaa794ea97
58 changed files with 1264 additions and 654 deletions

View File

@@ -20,22 +20,22 @@ namespace FCOMMON
public static partial class Util
{
#region "flag"
//public static Boolean getBit(ref Int32 flag_, int idx)
//{
// return getBit(ref (UInt32)flag_, idx);
//}
public static Boolean getBit( Int32 flag_, int idx)
public static Boolean getBit(Int32 flag_, int idx)
{
var offset = (UInt32)(1 << (int)idx);
return ((flag_ & offset) != 0);
}
public static void toggleBit(ref Int32 flag_, int idx)
{
var curValue = getBit( flag_, idx);
var curValue = getBit(flag_, idx);
setBit(ref flag_, idx, !curValue);
}
// public static void setBit(ref Int32 flag_, int idx, Boolean value)
@@ -61,8 +61,68 @@ namespace FCOMMON
#endregion
public static string Number2Hangle(long lngNumber)
{
string[] NumberChar = new string[] { "", "일", "이", "삼"
, "사", "오", "육"
, "칠", "팔", "구" };
string[] LevelChar = new string[] { "", "십", "백", "천" };
string[] DecimalChar = new string[] { "", "만", "억", "조", "경" };
string strMinus = string.Empty;
if (lngNumber < 0)
{
strMinus = "마이너스";
lngNumber *= -1;
}
string strValue = string.Format("{0}", lngNumber);
string NumToKorea = string.Empty;
bool UseDecimal = false;
if (lngNumber == 0) return "영";
for (int i = 0; i < strValue.Length; i++)
{
int Level = strValue.Length - i;
if (strValue.Substring(i, 1) != "0")
{
UseDecimal = true;
if (((Level - 1) % 4) == 0)
{
if (DecimalChar[(Level - 1) / 4] != string.Empty
&& strValue.Substring(i, 1) == "1")
NumToKorea = NumToKorea + DecimalChar[(Level - 1) / 4];
else
NumToKorea = NumToKorea
+ NumberChar[int.Parse(strValue.Substring(i, 1))]
+ DecimalChar[(Level - 1) / 4];
UseDecimal = false;
}
else
{
if (strValue.Substring(i, 1) == "1")
NumToKorea = NumToKorea
+ LevelChar[(Level - 1) % 4];
else
NumToKorea = NumToKorea
+ NumberChar[int.Parse(strValue.Substring(i, 1))]
+ LevelChar[(Level - 1) % 4];
}
}
else
{
if ((Level % 4 == 0) && UseDecimal)
{
NumToKorea = NumToKorea + DecimalChar[Level / 4];
UseDecimal = false;
}
}
}
return strMinus + NumToKorea;
}
public static bool IsNumeric(string input)
@@ -281,12 +341,12 @@ namespace FCOMMON
m = string.Format(m, args);
MessageBox.Show(m, "확인", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
public static void MsgE(string m,params string[] args)
public static void MsgE(string m, params string[] args)
{
m = string.Format(m, args);
MessageBox.Show(m, "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public static DialogResult MsgQ(string m,params string[] args)
public static DialogResult MsgQ(string m, params string[] args)
{
m = string.Format(m, args);
DialogResult dlg = MessageBox.Show(m, "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

View File

@@ -33,6 +33,8 @@ namespace FCOMMON
this.radM = new System.Windows.Forms.RadioButton();
this.panel1 = new System.Windows.Forms.Panel();
this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
this.label16 = new System.Windows.Forms.Label();
this.nudSFIOffice = new System.Windows.Forms.NumericUpDown();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.nudOsavetime = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
@@ -40,8 +42,10 @@ namespace FCOMMON
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label15 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.numericUpDown10 = new System.Windows.Forms.NumericUpDown();
this.nudShiftCnt = new System.Windows.Forms.NumericUpDown();
this.label11 = new System.Windows.Forms.Label();
this.numericUpDown9 = new System.Windows.Forms.NumericUpDown();
this.nudMSaveCnt = new System.Windows.Forms.NumericUpDown();
@@ -49,7 +53,7 @@ namespace FCOMMON
this.nudMsavetime = new System.Windows.Forms.NumericUpDown();
this.label13 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();
this.nudSFIMFG = new System.Windows.Forms.NumericUpDown();
this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
@@ -57,18 +61,24 @@ namespace FCOMMON
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label();
this.nudCnt = new System.Windows.Forms.NumericUpDown();
this.label17 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudSFIOffice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudOsavetime)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudShiftCnt)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudMSaveCnt)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudMsavetime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudSFIMFG)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudCnt)).BeginInit();
this.SuspendLayout();
//
// radO
@@ -91,9 +101,9 @@ namespace FCOMMON
this.radM.Location = new System.Drawing.Point(21, 200);
this.radM.Margin = new System.Windows.Forms.Padding(6, 10, 6, 10);
this.radM.Name = "radM";
this.radM.Size = new System.Drawing.Size(155, 41);
this.radM.Size = new System.Drawing.Size(258, 41);
this.radM.TabIndex = 0;
this.radM.Text = "MFG 인원";
this.radM.Text = "MFG 인원(단위:분)";
this.radM.UseVisualStyleBackColor = true;
this.radM.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
@@ -101,6 +111,8 @@ namespace FCOMMON
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.panel1.Controls.Add(this.numericUpDown3);
this.panel1.Controls.Add(this.label16);
this.panel1.Controls.Add(this.nudSFIOffice);
this.panel1.Controls.Add(this.numericUpDown2);
this.panel1.Controls.Add(this.nudOsavetime);
this.panel1.Controls.Add(this.label3);
@@ -114,20 +126,45 @@ namespace FCOMMON
//
// numericUpDown3
//
this.numericUpDown3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.numericUpDown3.DecimalPlaces = 2;
this.numericUpDown3.Location = new System.Drawing.Point(233, 58);
this.numericUpDown3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.numericUpDown3.Location = new System.Drawing.Point(515, 57);
this.numericUpDown3.Maximum = new decimal(new int[] {
999999999,
0,
0,
0});
this.numericUpDown3.Name = "numericUpDown3";
this.numericUpDown3.Size = new System.Drawing.Size(161, 43);
this.numericUpDown3.TabIndex = 5;
this.numericUpDown3.Tag = "o";
this.numericUpDown3.Size = new System.Drawing.Size(147, 43);
this.numericUpDown3.TabIndex = 18;
this.numericUpDown3.Tag = "";
this.numericUpDown3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(400, 60);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(109, 37);
this.label16.TabIndex = 17;
this.label16.Text = "Indirect";
//
// nudSFIOffice
//
this.nudSFIOffice.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.nudSFIOffice.DecimalPlaces = 2;
this.nudSFIOffice.Location = new System.Drawing.Point(233, 58);
this.nudSFIOffice.Maximum = new decimal(new int[] {
999999999,
0,
0,
0});
this.nudSFIOffice.Name = "nudSFIOffice";
this.nudSFIOffice.Size = new System.Drawing.Size(161, 43);
this.nudSFIOffice.TabIndex = 5;
this.nudSFIOffice.Tag = "o";
this.nudSFIOffice.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudSFIOffice.ValueChanged += new System.EventHandler(this.nudSIFOffice_ValueChanged);
//
// numericUpDown2
//
this.numericUpDown2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
@@ -209,8 +246,11 @@ namespace FCOMMON
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.panel2.Controls.Add(this.label17);
this.panel2.Controls.Add(this.numericUpDown1);
this.panel2.Controls.Add(this.label15);
this.panel2.Controls.Add(this.label12);
this.panel2.Controls.Add(this.numericUpDown10);
this.panel2.Controls.Add(this.nudShiftCnt);
this.panel2.Controls.Add(this.label11);
this.panel2.Controls.Add(this.numericUpDown9);
this.panel2.Controls.Add(this.nudMSaveCnt);
@@ -218,7 +258,7 @@ namespace FCOMMON
this.panel2.Controls.Add(this.nudMsavetime);
this.panel2.Controls.Add(this.label13);
this.panel2.Controls.Add(this.label9);
this.panel2.Controls.Add(this.numericUpDown4);
this.panel2.Controls.Add(this.nudSFIMFG);
this.panel2.Controls.Add(this.numericUpDown5);
this.panel2.Controls.Add(this.numericUpDown6);
this.panel2.Controls.Add(this.label5);
@@ -231,39 +271,64 @@ namespace FCOMMON
this.panel2.Size = new System.Drawing.Size(720, 223);
this.panel2.TabIndex = 2;
//
// numericUpDown1
//
this.numericUpDown1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.numericUpDown1.Location = new System.Drawing.Point(515, 169);
this.numericUpDown1.Maximum = new decimal(new int[] {
999999999,
0,
0,
0});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(147, 43);
this.numericUpDown1.TabIndex = 16;
this.numericUpDown1.Tag = "";
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(400, 172);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(109, 37);
this.label15.TabIndex = 15;
this.label15.Text = "Indirect";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(597, 67);
this.label12.Location = new System.Drawing.Point(588, 67);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(73, 37);
this.label12.TabIndex = 14;
this.label12.Text = "Shift";
//
// numericUpDown10
// nudShiftCnt
//
this.numericUpDown10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.numericUpDown10.Location = new System.Drawing.Point(529, 64);
this.numericUpDown10.Maximum = new decimal(new int[] {
this.nudShiftCnt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.nudShiftCnt.Location = new System.Drawing.Point(520, 64);
this.nudShiftCnt.Maximum = new decimal(new int[] {
999999999,
0,
0,
0});
this.numericUpDown10.Name = "numericUpDown10";
this.numericUpDown10.Size = new System.Drawing.Size(62, 43);
this.numericUpDown10.TabIndex = 13;
this.numericUpDown10.Tag = "m";
this.numericUpDown10.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown10.Value = new decimal(new int[] {
this.nudShiftCnt.Name = "nudShiftCnt";
this.nudShiftCnt.Size = new System.Drawing.Size(62, 43);
this.nudShiftCnt.TabIndex = 13;
this.nudShiftCnt.Tag = "m";
this.nudShiftCnt.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudShiftCnt.Value = new decimal(new int[] {
4,
0,
0,
0});
this.nudShiftCnt.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(496, 67);
this.label11.Location = new System.Drawing.Point(487, 67);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(30, 37);
this.label11.TabIndex = 12;
@@ -274,7 +339,7 @@ namespace FCOMMON
this.numericUpDown9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.numericUpDown9.DecimalPlaces = 2;
this.numericUpDown9.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.numericUpDown9.Location = new System.Drawing.Point(317, 64);
this.numericUpDown9.Location = new System.Drawing.Point(264, 65);
this.numericUpDown9.Maximum = new decimal(new int[] {
999999999,
0,
@@ -336,9 +401,9 @@ namespace FCOMMON
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(8, 67);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(313, 37);
this.label13.Size = new System.Drawing.Size(250, 37);
this.label13.TabIndex = 6;
this.label13.Text = "1 Shift 당 개선절감 횟수";
this.label13.Text = "1 Shift 당 개선절감";
//
// label9
//
@@ -349,21 +414,22 @@ namespace FCOMMON
this.label9.TabIndex = 6;
this.label9.Text = "1회 당 절감시간";
//
// numericUpDown4
// nudSFIMFG
//
this.numericUpDown4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.numericUpDown4.DecimalPlaces = 2;
this.numericUpDown4.Location = new System.Drawing.Point(233, 169);
this.numericUpDown4.Maximum = new decimal(new int[] {
this.nudSFIMFG.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.nudSFIMFG.DecimalPlaces = 2;
this.nudSFIMFG.Location = new System.Drawing.Point(233, 169);
this.nudSFIMFG.Maximum = new decimal(new int[] {
999999999,
0,
0,
0});
this.numericUpDown4.Name = "numericUpDown4";
this.numericUpDown4.Size = new System.Drawing.Size(429, 43);
this.numericUpDown4.TabIndex = 5;
this.numericUpDown4.Tag = "m";
this.numericUpDown4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudSFIMFG.Name = "nudSFIMFG";
this.nudSFIMFG.Size = new System.Drawing.Size(161, 43);
this.nudSFIMFG.TabIndex = 5;
this.nudSFIMFG.Tag = "m";
this.nudSFIMFG.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudSFIMFG.ValueChanged += new System.EventHandler(this.numericUpDown4_ValueChanged);
//
// numericUpDown5
//
@@ -444,7 +510,7 @@ namespace FCOMMON
//
// button1
//
this.button1.Location = new System.Drawing.Point(43, 487);
this.button1.Location = new System.Drawing.Point(43, 483);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(720, 55);
this.button1.TabIndex = 3;
@@ -452,11 +518,52 @@ namespace FCOMMON
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(510, 20);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(125, 37);
this.label14.TabIndex = 8;
this.label14.Text = "적용대수";
//
// nudCnt
//
this.nudCnt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.nudCnt.Location = new System.Drawing.Point(641, 16);
this.nudCnt.Maximum = new decimal(new int[] {
999999999,
0,
0,
0});
this.nudCnt.Name = "nudCnt";
this.nudCnt.Size = new System.Drawing.Size(121, 43);
this.nudCnt.TabIndex = 6;
this.nudCnt.Tag = "";
this.nudCnt.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudCnt.Value = new decimal(new int[] {
1,
0,
0,
0});
this.nudCnt.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(435, 70);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(44, 37);
this.label17.TabIndex = 17;
this.label17.Text = "분";
//
// fSFI
//
this.AutoScaleDimensions = new System.Drawing.SizeF(15F, 37F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(774, 553);
this.ClientSize = new System.Drawing.Size(774, 545);
this.Controls.Add(this.nudCnt);
this.Controls.Add(this.label14);
this.Controls.Add(this.button1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
@@ -467,20 +574,24 @@ namespace FCOMMON
this.Name = "fSFI";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "fSFI";
this.Load += new System.EventHandler(this.fSFI_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudSFIOffice)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudOsavetime)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown10)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudShiftCnt)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudMSaveCnt)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudMsavetime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudSFIMFG)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudCnt)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -493,9 +604,9 @@ namespace FCOMMON
private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown numericUpDown3;
private System.Windows.Forms.NumericUpDown nudSFIOffice;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.NumericUpDown numericUpDown4;
private System.Windows.Forms.NumericUpDown nudSFIMFG;
private System.Windows.Forms.NumericUpDown numericUpDown5;
private System.Windows.Forms.NumericUpDown numericUpDown6;
private System.Windows.Forms.Label label5;
@@ -505,7 +616,7 @@ namespace FCOMMON
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.NumericUpDown numericUpDown9;
private System.Windows.Forms.NumericUpDown numericUpDown10;
private System.Windows.Forms.NumericUpDown nudShiftCnt;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
@@ -515,5 +626,12 @@ namespace FCOMMON
public System.Windows.Forms.NumericUpDown nudOsavetime;
public System.Windows.Forms.NumericUpDown nudMSaveCnt;
public System.Windows.Forms.NumericUpDown nudMsavetime;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.NumericUpDown nudCnt;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.NumericUpDown numericUpDown3;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17;
}
}

View File

@@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -12,7 +13,7 @@ namespace FCOMMON
{
public partial class fSFI : Form
{
public fSFI(string sfi_type, float time, float cnt)
public fSFI(string sfi_type, float time, float cnt, double shiftcount, int itemcnt)
{
InitializeComponent();
if (sfi_type == "M")
@@ -23,10 +24,12 @@ namespace FCOMMON
else
{
radO.Checked = true;
nudOsavetime.Value= (decimal)time;
nudOsavetime.Value = (decimal)time;
}
nudMSaveCnt.Value = (decimal)cnt;
nudShiftCnt.Value = (decimal)shiftcount;
this.nudCnt.Value = (decimal)itemcnt;
}
private void label1_Click(object sender, EventArgs e)
@@ -46,7 +49,7 @@ namespace FCOMMON
var nud = sender as NumericUpDown;
if (nud.Tag.ToString().ToLower() == "o")
{
updateOFF();
UpdateOffice();
}
else
{
@@ -58,36 +61,60 @@ namespace FCOMMON
var nud = sender as NumericUpDown;
//mfg의 총 절감 시간이 변경되었다
var = (double)nud.Value;
var sfi = / (int)numericUpDown5.Value;
numericUpDown4.Value = (Decimal)sfi;
var sfi = / (float)numericUpDown5.Value;
nudSFIMFG.Value = (Decimal)sfi;
}
public double Value { get; set; } = 0;
void updateMFG()
{
var = (double)nudMsavetime.Value;
var SHIFT수 = (int)nudMSaveCnt.Value;
var SHIFT수 = (float)nudMSaveCnt.Value;
var shift총수 = (double)( * SHIFT수);
numericUpDown9.Value = (decimal)shift총수; //1쉬프트 개선절감횟수
var = (int)numericUpDown10.Value;
numericUpDown6.Value = (decimal)(shift총수 * );
if (numericUpDown9.Value != (decimal)shift총수)
numericUpDown9.Value = (decimal)shift총수; //1쉬프트 개선절감횟수
var = (int)nudShiftCnt.Value;
var = (int)nudCnt.Value;
numericUpDown6.Value = (decimal)(shift총수 * * );
}
void updateOFF()
void UpdateOffice()
{
var savetime = (double)nudOsavetime.Value;
var min = (int)numericUpDown2.Value;
var sfi = savetime / min;
numericUpDown3.Value = (decimal)sfi;
var cnt = (int)nudCnt.Value;
nudSFIOffice.Value = (decimal)(sfi * cnt);
}
private void button1_Click(object sender, EventArgs e)
{
this.Invalidate();
if (radO.Checked)
this.Value = (double)numericUpDown3.Value;
this.Value = (double)nudSFIOffice.Value;
else
this.Value = (double)numericUpDown4.Value;
this.Value = (double)nudSFIMFG.Value;
DialogResult = DialogResult.OK;
}
private void fSFI_Load(object sender, EventArgs e)
{
nudMSaveCnt.DecimalPlaces = 1;
}
private void nudSIFOffice_ValueChanged(object sender, EventArgs e)
{
//offcie update
var sfi = (double)nudSFIOffice.Value;
numericUpDown3.Value = (decimal)(sfi * 1.25);
}
private void numericUpDown4_ValueChanged(object sender, EventArgs e)
{
//mfg update
var sfi = (double)nudSFIMFG.Value;
numericUpDown1.Value = (decimal)(sfi * 1.25);
}
}
}