public override DataTable Clone()
            {
                TypesDataTable cln = ((TypesDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
Esempio n. 2
0
        public MainWindowViewModel()
        {
            Weapon = new Weapon();

            var typesTableAdapter = new Database1DataSetTableAdapters.TypesTableAdapter();

            TypesDataTable = typesTableAdapter.GetData();

            WeaponTypes = new ObservableCollection <Type>(TypesDataTable.Select(typesRow => new Type(typesRow)));

            var variantsTableAdapter = new Database1DataSetTableAdapters.VariantsTableAdapter();

            VariantsDataTable = variantsTableAdapter.GetData();

            var weaponsTableAdapter = new Database1DataSetTableAdapters.WeaponsTableAdapter();

            WeaponsDataTable = weaponsTableAdapter.GetData();

            //var weapons = WeaponsDataTable.Select(weaponsRow => new Weapon(weaponsRow)).ToList();

            BaseBulletDamageString = "100";
            XString                 = "0,6";
            Firearms                = 100;
            ReloadSpeedString       = "0,5";
            HeadshotDamageString    = "1,5";
            CriticalHitChanceString = "0,5";
            CriticalHitDamageString = "0,5";
            MagazineSizeBonusString = "0,5";

            PropertyChanged += OnPropertyChanged;
        }
 private void InitClass()
 {
     this.DataSetName        = "Map_Features_DataSet";
     this.Prefix             = "";
     this.Namespace          = "";
     this.Locale             = new System.Globalization.CultureInfo("en-US");
     this.CaseSensitive      = false;
     this.EnforceConstraints = true;
     this.tableFeatures      = new FeaturesDataTable();
     this.Tables.Add(this.tableFeatures);
     this.tableTypes = new TypesDataTable();
     this.Tables.Add(this.tableTypes);
 }
 private void InitClass()
 {
     DataSetName        = "Map_Features_DataSet";
     Prefix             = "";
     Namespace          = "";
     Locale             = new CultureInfo("en-US");
     CaseSensitive      = false;
     EnforceConstraints = true;
     tableFeatures      = new FeaturesDataTable();
     Tables.Add(tableFeatures);
     tableTypes = new TypesDataTable();
     Tables.Add(tableTypes);
 }
 public void InitVars()
 {
     this.tableFeatures = ((FeaturesDataTable)(this.Tables["Features"]));
     if ((this.tableFeatures != null))
     {
         this.tableFeatures.InitVars();
     }
     this.tableTypes = ((TypesDataTable)(this.Tables["Types"]));
     if ((this.tableTypes != null))
     {
         this.tableTypes.InitVars();
     }
 }
Esempio n. 6
0
        public LinguaSpaceDataSet()
        {
            // Vocabulary
            tableVocabularies = new VocabulariesDataTable();
            tableTypes = new TypesDataTable();
            tableWords = new WordsDataTable();
            tableMeanings = new MeaningsDataTable();
            tableTranslations = new TranslationsDataTable();
            tableSynonyms = new SynonymsDataTable();
            tableAntonyms = new AntonymsDataTable();

            // Profile
            tableProfiles = new ProfilesDataTable();
            tableActions = new ActionsDataTable();
            tableHistory = new HistoryDataTable();

            this.Tables.AddRange(new DataTable[] { tableVocabularies, tableTypes, tableWords, tableMeanings, tableTranslations, tableSynonyms, tableAntonyms, tableProfiles, tableActions, tableHistory });

            tableTypes.DefaultView.Sort = Strings.POSITION;
            tableWords.DefaultView.Sort = "Word, TypeId";
            tableMeanings.DefaultView.Sort = "WordId, Position";
            tableTranslations.DefaultView.Sort = "MeaningId, Position";
            tableSynonyms.DefaultView.Sort = "MeaningId, Position";
            tableAntonyms.DefaultView.Sort = "MeaningId, Position";
            tableHistory.DefaultView.Sort = "MeaningId";

            AddForeignKey(tableTypes, tableWords, Strings.TYPE_ID, Strings.FK_WORDS_TYPES, false);
            AddForeignKey(tableWords, tableMeanings, Strings.WORD_ID, Strings.FK_MEANINGS_WORDS, true);
            AddForeignKey(tableMeanings, tableTranslations, Strings.MEANING_ID, Strings.FK_TRANSLATIONS_MEANINGS, true);
            AddForeignKey(tableMeanings, tableSynonyms, Strings.MEANING_ID, Strings.FK_SYNONYMS_MEANINGS, true);
            AddForeignKey(tableMeanings, tableAntonyms, Strings.MEANING_ID, Strings.FK_ANTONYMS_MEANINGS, true);
            AddForeignKey(tableWords, tableSynonyms, Strings.WORD_ID, Strings.FK_SYNONYMS_WORDS, true);
            AddForeignKey(tableWords, tableAntonyms, Strings.WORD_ID, Strings.FK_ANTONYMS_WORDS, true);
            AddForeignKey(tableMeanings, tableHistory, Strings.MEANING_ID, Strings.MEANING_ID, Strings.FK_HISTORY_MEANINGS, false, false);
            AddForeignKey(tableVocabularies, tableHistory, Strings.VOCABULARY_ID, Strings.VOCABULARY_ID, Strings.FK_HISTORY_VOCABULARIES, false, false);

            this.EnforceConstraints = true;
        }
 public TypesRow(DataRowBuilder rb) :
     base(rb)
 {
     this.tableTypes = ((TypesDataTable)(this.Table));
 }
 public TypesRow(DataRowBuilder rb) : 
         base(rb) {
     this.tableTypes = ((TypesDataTable)(this.Table));
 }
 private void InitClass() {
     this.DataSetName = "Map_Features_DataSet";
     this.Prefix = "";
     this.Namespace = "";
     this.Locale = new System.Globalization.CultureInfo("en-US");
     this.CaseSensitive = false;
     this.EnforceConstraints = true;
     this.tableFeatures = new FeaturesDataTable();
     this.Tables.Add(this.tableFeatures);
     this.tableTypes = new TypesDataTable();
     this.Tables.Add(this.tableTypes);
 }
 public void InitVars() {
     this.tableFeatures = ((FeaturesDataTable)(this.Tables["Features"]));
     if ((this.tableFeatures != null)) {
         this.tableFeatures.InitVars();
     }
     this.tableTypes = ((TypesDataTable)(this.Tables["Types"]));
     if ((this.tableTypes != null)) {
         this.tableTypes.InitVars();
     }
 }
 private void InitClass() {
     DataSetName = "Map_Features_DataSet";
     Prefix = "";
     Namespace = "";
     Locale = new CultureInfo("en-US");
     CaseSensitive = false;
     EnforceConstraints = true;
     tableFeatures = new FeaturesDataTable();
     Tables.Add(tableFeatures);
     tableTypes = new TypesDataTable();
     Tables.Add(tableTypes);
 }