Beispiel #1
0
        public EditFVValue(SQLiteConnection arg_dbConnection, int arg_fuzzyVariableId)
        {
            dbConnection    = arg_dbConnection;
            fuzzyVariableId = arg_fuzzyVariableId;

            fuzzyVariableService = new FuzzyVariableService(dbConnection);

            InitializeComponent();
        }
Beispiel #2
0
        public MainForm()
        {
            //TODO: move DB connection to separate file
            var databasePath = Path.Combine(Environment.CurrentDirectory, "mp.db"); //TODO: change path later

            //Preparing DB commection
            dbConnection = new SQLiteConnection(databasePath);

            //Creating tables IF NOT EXISTS
            dbConnection.CreateTable <LinguisticVariable>();
            dbConnection.CreateTable <FuzzyVariable>();
            dbConnection.CreateTable <FuzzyVariableValue>();

            //Init fuzzy variable service
            fuzzyVariableService = new FuzzyVariableService(dbConnection);
            //Init subexpression service
            subexpressionService = new SubexpressionService(dbConnection);

            InitializeComponent();
        }
 /// <summary>
 /// Конструктор по умолчанию
 /// </summary>
 /// <param name="arg_dbConnection">Объект соединения с базой данных</param>
 public SubexpressionService(SQLiteConnection arg_dbConnection)
 {
     dbConnection         = arg_dbConnection;
     fuzzyVariableService = new FuzzyVariableService(dbConnection);
 }