Exemple #1
0
 private void Form_Chatting_FormClosing(object sender, FormClosingEventArgs e)
 {
     ini.SetString("Server", "IP", tbIP.Text);
     ini.SetString("Server", "Port", tbPort.Text);
     if (threadClient != null)
     {
         threadClient.Abort();
     }
 }
        private void frmSocket_FormClosing(object sender, FormClosingEventArgs e)
        {
            ini.SetString("Server", "IP", sAddress);
            ini.SetString("Server", "Port", sPort);

            ini.SetString("Client", "IP", cAddress);
            ini.SetString("Client", "Port", cPort);

            ini.SetString("Form", "LocationX", $"{Location.X}");
            ini.SetString("Form", "LocationY", $"{Location.Y}");
            ini.SetString("Form", "SizeX", $"{Size.Width}");
            ini.SetString("Form", "SizeY", $"{Size.Height}");

            if (threadServer != null)
            {
                threadServer.Abort();
            }
            if (threadRead != null)
            {
                threadRead.Abort();
            }
            if (threadSession != null)
            {
                threadSession.Abort();
            }
        }
Exemple #3
0
        private void FormServer_FormClosing(object sender, FormClosingEventArgs e)
        {
            ini.SetString("Form", "LocX", $"{Location.X}");
            ini.SetString("Form", "LocY", $"{Location.Y}");

            ini.SetString("Form", "SizeX", $"{Size.Width}");
            ini.SetString("Form", "SizeY", $"{Size.Height}");

            ini.SetString("Form", "Splitter", $"{splitContainer1.SplitterDistance}");

            if (thread != null)
            {
                thread.Abort(); // Thread 종료
            }
        }
        private void FormServer_FormClosing(object sender, FormClosingEventArgs e)
        {
            inif.SetString("Server", "Port", tbServPort.Text);
            inif.SetString("Form", "LocationX", $"{Location.X}");
            inif.SetString("Form", "LocationY", $"{Location.Y}");
            inif.SetString("Form", "SizeX", $"{Size.Width}");
            inif.SetString("Form", "SizeY", $"{Size.Height}");

            if (threadServer != null)
            {
                threadServer.Abort();
            }
            if (threadRead != null)
            {
                threadRead.Abort();
            }
        }
Exemple #5
0
 private void FormClient_FormClosing(object sender, FormClosingEventArgs e)
 {
     ini.SetString("Comm", "IP", tbIP.Text);     // Section [Comm], Key[IP   Port], ...FileName
     ini.SetString("Comm", "Port", tbPort.Text); //Init_Port = int.Parse(sb.ToString());
     ini.SetString("Form", "LocX", $"{Location.X}");
     ini.SetString("Form", "LocY", $"{Location.Y}");
     ini.SetString("Form", "SizeX", $"{Size.Width}");
     ini.SetString("Form", "SizeY", $"{Size.Height}");
     ini.SetString("Form", "Splitter", $"{splitContainer1.SplitterDistance}");
 }
Exemple #6
0
        private void Form_Client_FormClosing(object sender, FormClosingEventArgs e)
        {
            ini.SetString("Server", "IP", tbIP.Text);  // Form Closing시 값 저장
            ini.SetString("Server", "Port", tbPort.Text);

            ini.SetString("Form", "LocationX", $"{Location.X}");
            ini.SetString("Form", "LocationY", $"{Location.Y}");

            ini.SetString("Form", "SizeX", $"{Size.Width}");
            ini.SetString("Form", "SizeY", $"{Size.Height}");
        }
Exemple #7
0
        private void FormClient_FormClosing(object sender, FormClosingEventArgs e)
        {
            ini.SetString("Comm", "IP", tbIP.Text);
            ini.SetString("Comm", "Port", tbPort.Text);
            ini.SetString("Form", "LocX", $"{Location.X}");
            ini.SetString("Form", "LocY", $"{Location.Y}");
            ini.SetString("Form", "SizeX", $"{Size.Width}");
            ini.SetString("Form", "SizeY", $"{Size.Height}");
            ini.SetString("Form", "Splitter", $"{splitContainer1.SplitterDistance}");

            if (thread != null)
            {
                thread.Abort();
            }
            if (SessionThread != null)
            {
                SessionThread.Abort();
            }
        }
Exemple #8
0
        private void Manager_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (threadServer != null)
            {
                threadServer.Abort();
            }
            if (threadRead != null)
            {
                threadRead.Abort();
            }

            ini.SetString("Server", "Port", tbServerPort.Text);
            ini.SetString("Form", "LocationX", $"{Location.X}");
            ini.SetString("Form", "LocationY", $"{Location.Y}");
            ini.SetString("Form", "SizeX", $"{Size.Width}");
            ini.SetString("Form", "SizeY", $"{Size.Height}");
            ini.SetString("Form", "TabIndex", $"{tabControl.SelectedIndex}");
            ini.SetString("Database", "ConnectionString", connString);
        }
Exemple #9
0
        private void EquipManager_FormClosing(object sender, FormClosingEventArgs e)
        {
            ini.SetString("Connection", "Port", tbPort.Text);

            ini.SetString("Form", "LocationX", this.Location.X.ToString());
            ini.SetString("Form", "LocationY", this.Location.Y.ToString());
            ini.SetString("Form", "SizeX", this.Size.Width.ToString());
            ini.SetString("Form", "SizeY", this.Size.Height.ToString());

            ini.SetString("Form", "TabIndex", $"{ tabControl1.SelectedIndex}");

            ini.SetString("Database", "ConnectionString", connectionStr);

            if (serverThread != null)
            {
                serverThread.Abort();
            }
            if (readThread != null)
            {
                readThread.Abort();
            }
        }
Exemple #10
0
        private void Main_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (threadRead != null)
            {
                threadRead.Abort();
            }

            ini.SetString("Equipment", "EqCode", tbEqCode.Text);
            ini.SetString("Equipment", "EqModel", tbEqModel.Text);
            ini.SetString("Equipment", "EqLine", tbEqLine.Text);
            ini.SetString("Equipment", "EqBat", tbEqBat.Text);
            ini.SetString("Equipment", "EqState", tbEqState.Text);
            ini.SetString("Equipment", "EqCount", tbEqCount.Text);

            ini.SetString("Enviroment", "EnvTemp", tbEnvTemp.Text);
            ini.SetString("Enviroment", "EnvHum", tbEnvHum.Text);
            ini.SetString("Enviroment", "EnvWind", tbEnvWind.Text);
            ini.SetString("Enviroment", "EnvOz", tbEnvOz.Text);
            ini.SetString("Enviroment", "EnvAir", tbEnvAir.Text);
            ini.SetString("Enviroment", "EnvTotal", tbEnvTotal.Text);

            ini.SetString("Operation", "StartDate", dtStartDate.Value.Ticks.ToString());
            ini.SetString("Operation", "StopDate", dtStopDate.Value.Ticks.ToString());
            ini.SetString("Operation", "StartTime", dtStartTime.Value.Ticks.ToString());
            ini.SetString("Operation", "StopTime", dtStopTime.Value.Ticks.ToString());
            ini.SetString("Operation", "Interval", tbInterval.Text);

            ini.SetString("Server", "IP", sblabel1.Text);
            ini.SetString("Server", "Port", sblabel2.Text);
            ini.SetString("Form", "LocationX", $"{Location.X}");
            ini.SetString("Form", "LocationY", $"{Location.Y}");
            ini.SetString("Form", "SizeX", $"{Size.Width}");
            ini.SetString("Form", "SizeY", $"{Size.Height}");
        }
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (readThread != null)
            {
                readThread.Abort();
            }
            ini.SetString("Equipment", "Code", tbEqcode.Text);             //장비 코드 5
            ini.SetString("Equipment", "Model", tbEqModel.Text);           //장비 모델 6
            ini.SetString("Equipment", "Line", tbEqLine.Text);             //라인 번호 5
            ini.SetString("Equipment", "Battery", tbEqBatt.Text);          //배터리 잔량 5
            ini.SetString("Equipment", "State", tbEqState.Text);           //현재 상태 1
            ini.SetString("Equipment", "Count", tbEqCount.Text);           //사용 횟수 5

            ini.SetString("Environment", "Temperature", tbEqCelsius.Text); //온도 4
            ini.SetString("Environment", "Humidity", tbEqHumi.Text);       //습도 4
            ini.SetString("Environment", "Wind_Speed", tbEqWind.Text);     //풍속 4
            ini.SetString("Environment", "Atmosphere", tbEqAtmos.Text);    //대기 1
            ini.SetString("Environment", "Ozone", tbEqOz.Text);            //오존 4
            ini.SetString("Environment", "Total", tbEqTotal.Text);         //종합 4 : total 48bytes

            ini.SetString("Operation", "Start_Time_Days", dtStart_Days.Value.Ticks.ToString());
            ini.SetString("Operation", "Start_Time_HMS", dtStart_HMS.Value.Ticks.ToString());
            ini.SetString("Operation", "End_Time_Days", dtEnd_Days.Value.Ticks.ToString());
            ini.SetString("Operation", "End_Time_HMS", dtEnd_HMS.Value.Ticks.ToString());

            ini.SetString("Operation", "Interval", tbInterval.Text);

            ini.SetString("Connection", "IP", sb_IP.Text);
            ini.SetString("Connection", "Port", sb_Port.Text);

            ini.SetString("Form", "LocationX", this.Location.X.ToString());
            ini.SetString("Form", "LocationY", this.Location.Y.ToString());
            ini.SetString("Form", "SizeX", this.Size.Width.ToString());
            ini.SetString("Form", "SizeY", this.Size.Height.ToString());
        }
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            inif.SetString("Equipment", "EqCode", tbEqCode.Text);
            inif.SetString("Equipment", "EqModel", tbEqModel.Text);
            inif.SetString("Equipment", "EqLineNum", tbEqLineNum.Text);
            inif.SetString("Equipment", "EqBattery", tbEqBattery.Text);
            inif.SetString("Equipment", "EqOperState", tbEqOperState.Text);
            inif.SetString("Equipment", "EqOperCount", tbEqOperCount.Text);

            inif.SetString("Environment", "EqTemp", tbEqTemp.Text);
            inif.SetString("Environment", "EqHumid", tbEqHumid.Text);
            inif.SetString("Environment", "EqWind", tbEqWind.Text);
            inif.SetString("Environment", "EqOzon", tbEqOzon.Text);
            inif.SetString("Environment", "EqAtmos", tbEqAtmos.Text);
            inif.SetString("Environment", "EqTotal", tbEqTotal.Text);

            inif.SetString("Operation", "StartDate", dtBegin.Value.Ticks.ToString());
            inif.SetString("Operation", "StopDate", dtEnd.Value.Ticks.ToString());
            inif.SetString("Operation", "StartTime", dtBeginClock.Value.Ticks.ToString());
            inif.SetString("Operation", "StopTime", dtEndClock.Value.Ticks.ToString());
            inif.SetString("Operation", "Interval", tbEqInterval.Text);

            inif.SetString("Server", "IP", sbLabel1.Text);
            inif.SetString("Server", "Port", sbLabel2.Text);

            inif.SetString("Form", "LocationX", $"{Location.X}");
            inif.SetString("Form", "LocationY", $"{Location.Y}");
            inif.SetString("Form", "SizeX", $"{Size.Width}");
            inif.SetString("Form", "SizeY", $"{Size.Height}");

            if (threadRead != null)
            {
                threadRead.Abort();
            }
        }
Exemple #13
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            ini.SetString("Equipment", "EqCode", tbEqCode.Text);     // 5
            ini.SetString("Equipment", "EqModel", tbEqModel.Text);   // 6
            ini.SetString("Equipment", "EqLine", tbEqLine.Text);     // 5
            ini.SetString("Equipment", "EqBatt", tbEqBatt.Text);     // 5
            ini.SetString("Equipment", "EqState", tbEqState.Text);   // 1
            ini.SetString("Equipment", "EqCount", tbEqCount.Text);   // 5

            ini.SetString("Environment", "EqTemp", tbEqTemp.Text);   // 4
            ini.SetString("Environment", "EqHum", tbEqHum.Text);     // 4
            ini.SetString("Environment", "EqWind", tbEqWind.Text);   // 4
            ini.SetString("Environment", "EqOzon", tbEqOzon.Text);   // 4
            ini.SetString("Environment", "EqAir", tbEqAir.Text);     // 1
            ini.SetString("Environment", "EqTotal", tbEqTotal.Text); // 4  : total 48 byte

            ini.SetString("Operation", "StartDate", dtStart.Value.Ticks.ToString());
            ini.SetString("Operation", "StopDate", dtStop.Value.Ticks.ToString());
            ini.SetString("Operation", "StartTime", dtStartTime.Value.Ticks.ToString());
            ini.SetString("Operation", "StopTime", dtStopTime.Value.Ticks.ToString());
            ini.SetString("Operation", "Interval", tbInterval.Text);

            ini.SetString("Server", "IP", sbLabel1.Text);
            ini.SetString("Server", "Port", sbLabel2.Text);

            ini.SetString("Form", "LocationX", $"{Location.X}");
            ini.SetString("Form", "LocationY", $"{Location.Y}");
            ini.SetString("Form", "SizeX", $"{Size.Width}");
            ini.SetString("Form", "SizeY", $"{Size.Height}");

            if (threadRead != null)
            {
                threadRead.Abort();
            }
        }