Esempio n. 1
0
        private void btnSavePos_Click(object sender, EventArgs e)
        {
            try
            {
                dic.Clear();
                if (radioStartePos.Checked)
                {
                    dic.Add("StartPositionX", lbPointX.Text);
                    dic.Add("StartPositionY", lbPointY.Text);
                }
                if (radioEndPos.Checked)
                {
                    dic.Add("EndPositionX", lbPointX.Text);
                    dic.Add("EndPositionY", lbPointY.Text);
                }
                if (radioWeldPos1.Checked)
                {
                    dic.Add("WeltPosition1X", lbPointX.Text);
                    dic.Add("WeltPosition1Y", lbPointY.Text);
                }
                if (radioWeldPos2.Checked)
                {
                    dic.Add("WeltPosition2X", lbPointX.Text);
                    dic.Add("WeltPosition2Y", lbPointY.Text);
                }
                if (rabReserve1.Checked)
                {
                    dic.Add("Reserve1Z", lbPointZ.Text);
                    dic.Add("Reserve1W", lbPointW.Text);
                }
                if (rabReserve2.Checked)
                {
                    dic.Add("Reserve2Z", lbPointZ.Text);
                    dic.Add("Reserve2W", lbPointW.Text);
                }

                FormMain.SaveXmlData(dic);
                FormMain.AnalysisDictionary();

                MessageBox.Show("保存成功!");
            }
            catch (Exception ex)
            {
                MessageBox.Show("保存失败!" + ex.Message);
            }
        }