コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        private void LoadConfigs()
        {
            string path = AppDomain.CurrentDomain.BaseDirectory + @"Configs\Settings.txt";

            processNo         = Ultils.GetLine(path, 2);
            inputLog          = Ultils.GetLine(path, 4);
            extentionInputLog = Ultils.GetLine(path, 6);
            outputLog         = Ultils.GetLine(path, 8);
            barcodeLength     = Ultils.GetLine(path, 10);
            stationNo         = Ultils.GetLine(path, 12);

            if (StringHelper.IsEmptyOrNull(processNo) ||
                StringHelper.IsEmptyOrNull(inputLog) ||
                StringHelper.IsEmptyOrNull(extentionInputLog) ||
                StringHelper.IsEmptyOrNull(outputLog) ||
                StringHelper.IsEmptyOrNull(barcodeLength) ||
                StringHelper.IsEmptyOrNull(stationNo)
                )
            {
                btnStart.PerformClick();
            }
            else
            {
                XtraMessageBox.Show("Error Message!", "Vui lòng kiểm tra lại file cài đặt!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                var config = new FormConfigs();
                config.ShowDialog();
                LoadConfigs();
            }
        }
コード例 #2
0
        private void lblConfigs_Click(object sender, EventArgs e)
        {
            var config = new FormConfigs();

            config.ShowDialog();
            LoadConfigs();
        }