public static String GetMLModelSourcePath()
        {
            LotteryAppConfiguration lotteryAppConfiguration = LotteryAppConfiguration.GetInstance();

            if (String.IsNullOrEmpty(lotteryAppConfiguration.MLModelPath) || !Directory.Exists(lotteryAppConfiguration.MLModelPath))
            {
                throw new Exception(String.Format(ResourcesUtils.GetMessage("app_settings_msg_1"), lotteryAppConfiguration.MLModelPath));
            }
            return(lotteryAppConfiguration.MLModelPath);
        }
Exemplo n.º 2
0
        public LotterySettingsFrm(LotteryDataServices lotteryDataServices)
        {
            InitializeComponent();

            if (lotteryDataServices != null)
            {
                this.lotteryDataServices = lotteryDataServices;
                this.lotteryTicketPanel  = this.lotteryDataServices.GetLotteryTicketPanel();
            }
            this.lotteryAppConfiguration = LotteryAppConfiguration.GetInstance();
            txtConfigDBSource.Text       = this.lotteryAppConfiguration.DBSourcePath;
            txtConfigFolderML.Text       = this.lotteryAppConfiguration.MLModelPath;
            txtConfigNotes.Text          = String.Format(ResourcesUtils.GetMessage("lott_app_config_notes"),
                                                         Environment.NewLine + Environment.NewLine, Environment.NewLine + Environment.NewLine,
                                                         Environment.NewLine + Environment.NewLine, Environment.NewLine + Environment.NewLine);
        }
        private bool IsSourceFileComplete()
        {
            LotteryAppConfiguration appConfig = LotteryAppConfiguration.GetInstance();

            return(appConfig.IsDataSourceComplete());
        }