Ejemplo n.º 1
0
        //---------------------------------------------------------------------
        private void SaveData()
        {
            m_aXML.SetValue("/USBWatch/USBInfo/CameraName", txtCamera.Text.Trim());
            m_aXML.SetValue("/USBWatch/USBInfo/PrinterName", txtPrinter.Text.Trim());

            m_aXML.SaveFile(m_szFileXML);

            MyApp.SetNodeValue("/AppData/MachineNo", this.MachineNo.ToString());
            MyApp.SetNodeValue("/AppData/CodeNo", txtCodeNo.Text.Trim());
            MyApp.SetNodeValue("/AppData/DeviceID", txtDeviceID.Text.Trim());
            MyApp.SetNodeValue("/AppData/ShopName", txtShopName.Text.Trim());
            MyApp.SetNodeValue("/AppData/PhotoCount", m_szPhotoCount.Trim());

            if (MyString.CInt(m_szPhotoCount) == 0)
            {
                string szToday = DateTime.Now.ToString("yyyy-MM-dd");
                MyApp.SetNodeValue("/AppData/StartDate", szToday);
            }

            MyApp.Save();

            string buf = MyApp.Path + @"Sys\Setup.xml";

            MyXML aXML = new MyXML();

            aXML.LoadFile(buf);

            aXML.SetValue("/Setup/PrintHeaderInfo/ShopName", txtShopName.Text.Trim());
            aXML.SetValue("/Setup/PrintHeaderInfo/CodeNo", txtCodeNo.Text.Trim());
            aXML.SetValue("/Setup/PrintHeaderInfo/MachineNo", txtDeviceID.Text.Trim());

            aXML.SaveFile(buf);
        }
Ejemplo n.º 2
0
        //---------------------------------------------------------------------
        public dlgShopInfo()
        {
            InitializeComponent();

            m_szFileXML = MyApp.Path + @"Sys\USBWatch.xml";

            m_aXML = new MyXML();
            m_aXML.LoadFile(m_szFileXML);

            txtCamera.Text  = m_aXML.GetValue("/USBWatch/USBInfo/CameraName");
            txtPrinter.Text = m_aXML.GetValue("/USBWatch/USBInfo/PrinterName");
        }