/// <summary> /// Initializes a new instance of the <see cref="DbCardStyle"/> class. /// </summary> /// <param name="id">The id.</param> /// <param name="checkId">if set to <c>true</c> [check id].</param> /// <param name="parentClass">The parent class.</param> /// <remarks>Documented by Dev03, 2009-01-13</remarks> public DbCardStyle(int id, bool checkId, ParentClass parentClass) { parent = parentClass; if (checkId) connector.CheckId(id); this.id = id; String XmlValue = connector.GetCardStyle(id); if ((XmlValue != null) && (XmlValue.Length > 0)) { try { xmlStyle = (XmlCardStyle)styleSerializer.Deserialize(new StringReader(XmlValue)); } catch { Debug.WriteLine("Failed to deserialize card style!"); xmlStyle = new XmlCardStyle(parentClass); } } else { xmlStyle = new XmlCardStyle(parentClass); } }
public PreviewWord(string word, WordType type, bool isDefault, ParentClass parent) { this.word = word; this.type = type; this._default = isDefault; this.parent = parent; }
internal XmlDistractor(XmlElement card, string distractor,ParentClass parent) { m_Distractor = card.OwnerDocument.CreateElement(m_XPathDistractor); XmlHelper.CreateAndAppendAttribute(m_Distractor, m_XPathId, Convert.ToString(-1)); m_Distractor.InnerText = distractor; this.parent = parent; }
/// <summary> /// Initializes a new instance of the <see cref="DbChapter"/> class. /// </summary> /// <param name="id">The id.</param> /// <param name="CheckId">if set to <c>true</c> [check id].</param> /// <param name="parent">The parent.</param> /// <remarks>Documented by Dev03, 2009-01-13</remarks> public DbChapter(int id, bool CheckId, ParentClass parent) { this.parent = parent; if (CheckId) connector.CheckChapterId(id); this.id = id; }
internal XmlAudio(XmlDictionary dictionary, string filename, bool active, bool defaultAudio, bool exampleAudio, ParentClass parent) : base(dictionary, EMedia.Audio, filename, parent) { m_active = active; m_default = defaultAudio; m_example = exampleAudio; }
internal DbUser(UserStruct? user, ParentClass parent, ConnectionStringStruct connection, DataAccessErrorDelegate errorMessageDelegate, bool standAlone) { this.parent = parent; connectionString = connection; ErrorMessageDelegate = errorMessageDelegate; cache = new Cache(true); if (!user.HasValue) throw new NoValidUserException(); this.authenticationStruct = user.Value; this.username = user.Value.UserName; this.hashedPassword = user.Value.Password; this.standAlone = standAlone; this.user = user; securityFramework = MLifter.DAL.Security.SecurityFramework.GetDataAdapter(this); if (username != null && securityFramework != null) { try { securityToken = securityFramework.CreateSecurityToken(this.username); securityToken.IsCaching = cachePermissions; } catch (Exception ex) { Debug.WriteLine("Failed to create security token! (" + ex.Message + ")"); } } Login(); }
/// <summary> /// Cards the added. /// </summary> /// <param name="parent">The parent.</param> /// <remarks>Documented by Dev05, 2009-05-25</remarks> public static void CardAdded(ParentClass parent) { if (parent.CurrentUser.ConnectionString.Typ == DatabaseType.Xml) return; else GetSessionConnector(parent).CardAdded(lastSessionId); }
internal XmlImage(XmlDictionary dictionary, string filename, int width, int height, bool active, ParentClass parent) : base(dictionary, EMedia.Image, filename, parent) { m_active = active; m_width = width; m_height = height; }
protected XmlMedia(XmlDictionary dictionary, EMedia mediaType, string filename, ParentClass parent) { this.parent = parent; m_mediaIdentifier = mediaType; m_oDictionary = dictionary; m_filename = filename; }
internal XmlWord(string word, WordType type, bool isDefault, ParentClass parent) { m_word = (word == null) ? String.Empty : word; m_type = type; m_default = isDefault; this.parent = parent; }
public DbWords(int CardId, Side ListSide, WordType ListType, ParentClass parentClass) { id = CardId; side = ListSide; type = ListType; parent = parentClass; }
internal XmlAnswerExample(XmlCard card, ParentClass parent) : base(parent) { base.m_basePath = m_basePath; this.m_Culture = card.Dictionary.AnswerCulture; Initialize(card, WordType.Sentence); }
internal XmlChapters(XmlDictionary dictionary, ParentClass parent) { this.parent = parent; m_oDictionary = dictionary; m_dictionary = dictionary.Dictionary; Initialize(); PrepareIdNavigator(); }
internal XmlAnswerDistractors(XmlDictionary dic, XmlCard card, ParentClass parent) : base(parent) { base.m_oDictionary = dic; base.m_XPathBasePath = m_XPathBasePath; this.m_Culture = card.Dictionary.AnswerCulture; Initialize(card); }
/// <summary> /// Initializes a new instance of the <see cref="WebUser"/> class. /// </summary> /// <param name="userId">The user id.</param> /// <param name="authenticationStruct">The authentication struct.</param> /// <param name="connection">The connection.</param> /// <param name="service">The service.</param> /// <param name="parent">The parent.</param> /// <remarks>Documented by Dev05, 2009-03-06</remarks> internal WebUser(int userId, UserStruct authenticationStruct, ConnectionStringStruct connection, MLifterLearningModulesService service, ParentClass parent) { id = userId; authStruct = authenticationStruct; ConnectionString = connection; WebService = service; this.parent = parent; }
internal XmlQueryOptions(XmlDictionary dictionary, ParentClass parentClass) { parent = parentClass; m_dictionary = dictionary.Dictionary; m_userSettings = (XmlElement)m_dictionary.SelectSingleNode(m_basePath); m_MultipleChoiceOptions = new XmlQueryMultipleChoiceOptions(dictionary, Parent.GetChildParentClass(this)); }
public DbQueryMultipleChoiceOptions(int id, bool checkId, ParentClass parent) { this.parent = parent; if (checkId) connector.CheckId(id); this.id = id; }
public static MsSqlCeChapterConnector GetInstance(ParentClass parentClass) { ConnectionStringStruct connection = parentClass.CurrentUser.ConnectionString; if (!instances.ContainsKey(connection)) instances.Add(connection, new MsSqlCeChapterConnector(parentClass)); return instances[connection]; }
/// <summary> /// Initializes a new instance of the <see cref="PreviewDictionary"/> class. /// </summary> /// <param name="user">The user.</param> /// <remarks>Documented by Dev03, 2009-03-23</remarks> public PreviewDictionary(IUser user) { parent = new ParentClass(user, this); cards = new PreviewCards(parent.GetChildParentClass(this)); userSettings = new PreviewSettings(parent.GetChildParentClass(this)); allowedSettings = new PreviewSettings(parent.GetChildParentClass(this)); defaultSettings = new PreviewSettings(parent.GetChildParentClass(this)); statistics = new PreviewStatistics(); }
internal XmlCards(XmlDictionary dictionary, ParentClass parentClass) { parent = parentClass; m_oDictionary = dictionary; m_dictionary = dictionary.Dictionary; PrepareIdNavigator(); Initialize(); }
public static PgSqlDictionariesConnector GetInstance(ParentClass parentClass) { ConnectionStringStruct connection = parentClass.CurrentUser.ConnectionString; if (!instances.ContainsKey(connection)) instances.Add(connection, new PgSqlDictionariesConnector(parentClass)); return instances[connection]; }
public DbQueryDirections(int id, bool checkId, ParentClass parent) { this.parent = parent; if (checkId) connector.CheckId(id); this.id = id; }
public DbGradeSynonyms(int id, bool checkId, ParentClass parent) { this.parent = parent; if (checkId) connector.CheckId(id); this.id = id; }
/// <summary> /// Initializes a new instance of the <see cref="DbSettings"/> class. /// </summary> /// <param name="id">The id.</param> /// <param name="checkId">if set to <c>true</c> [check id].</param> /// <param name="parent">The parent.</param> /// <remarks>Documented by Dev03, 2009-01-15</remarks> public DbSettings(int id, bool checkId, ParentClass parent) { this.parent = parent; if (checkId) connector.CheckSettingsId(id); this.id = id; }
public DbWord(int id, string word, WordType type, bool isDefault, ParentClass parent) { loading = true; this.id = id; Word = word; Type = type; Default = isDefault; this.parent = parent; loading = false; }
public DbWord(int id, ParentClass parent) { loading = true; this.id = id; Word = connector.GetWord(id); Type = connector.GetType(id); Default = connector.GetDefault(id); this.parent = parent; loading = false; }
public DbStatistics(int lmId, ParentClass parentClass) { this.parent = parentClass; this.learningModuleId = lmId; //Update the whole Statistics list stats.Clear(); List<int> learnSessions = connector.GetLearnSessions(learningModuleId); foreach (int id in learnSessions) stats.Add(new DbStatistic(id, parent)); }
public static PgSqlQueryMultipleChoiceOptionsConnector GetInstance(ParentClass parentClass) { lock (instances) { ConnectionStringStruct connection = parentClass.CurrentUser.ConnectionString; if (!instances.ContainsKey(connection)) instances.Add(connection, new PgSqlQueryMultipleChoiceOptionsConnector(parentClass)); return instances[connection]; } }
public static PgSqlStatisticConnector GetInstance(ParentClass parent) { lock (instance) { ConnectionStringStruct connection = parent.CurrentUser.ConnectionString; if (!instance.ContainsKey(connection)) instance.Add(connection, new PgSqlStatisticConnector(parent)); return instance[connection]; } }
public static MsSqlCeQueryTypesConnector GetInstance(ParentClass ParentClass) { lock (instances) { ConnectionStringStruct connection = ParentClass.CurrentUser.ConnectionString; if (!instances.ContainsKey(connection)) instances.Add(connection, new MsSqlCeQueryTypesConnector(ParentClass)); return instances[connection]; } }