/// <summary> /// /// </summary> /// <param name="ws">The ws.</param> protected override void OnChangeNotifySharedStore(IWritingSystemDefinition ws) { base.OnChangeNotifySharedStore(ws); if (m_globalStore != null) { IWritingSystemDefinition globalWs; if (m_globalStore.TryGet(ws.Id, out globalWs)) { if (ws.DateModified > globalWs.DateModified) { WritingSystemDefinition newWs = ws.Clone(); newWs.Modified = true; // ensure any existing file for this WS is overwritten try { m_globalStore.Remove(ws.Id); m_globalStore.Set(newWs); } catch (UnauthorizedAccessException) { // Live with it if we can't update the global store. In a CS world we might // well not have permission. } } } else { m_globalStore.Set(ws.Clone()); } } }
public IWritingSystemDefinition MakeDuplicate(IWritingSystemDefinition definition) { if (definition == null) { throw new ArgumentNullException("definition"); } return(definition.Clone()); }
/// <summary> /// /// </summary> /// <param name="ws">The ws.</param> protected override void OnChangeNotifySharedStore(IWritingSystemDefinition ws) { base.OnChangeNotifySharedStore(ws); if (m_globalStore != null) { if (m_globalStore.Contains(ws.Id)) { if (ws.DateModified > m_globalStore.Get(ws.Id).DateModified) { WritingSystemDefinition newWs = ws.Clone(); newWs.Modified = true; m_globalStore.Remove(ws.Id); m_globalStore.Set(newWs); } } else { m_globalStore.Set(ws.Clone()); } } }
public IWritingSystemDefinition MakeDuplicate(IWritingSystemDefinition definition) { if (definition == null) { throw new ArgumentNullException("definition"); } return definition.Clone(); }
/// <summary> /// Makes a duplicate of an existing writing system definition. Set will need /// to be called with this new duplicate once identifying information has been changed /// in order to place the new definition in the store. /// </summary> public IWritingSystemDefinition MakeDuplicate(IWritingSystemDefinition definition) { return definition.Clone(); }
public DialectSuggestion(IWritingSystemDefinition primary) { _templateDefinition = primary.Clone(); this.Label = string.Format("new dialect of {0}", _templateDefinition.LanguageName); }
public VoiceSuggestion(IWritingSystemDefinition primary) { _templateDefinition = primary.Clone(); _templateDefinition.IsVoice = true; SetLabelDetail("voice"); }
/// <summary> /// Makes a duplicate of an existing writing system definition. Set will need /// to be called with this new duplicate once identifying information has been changed /// in order to place the new definition in the store. /// </summary> public IWritingSystemDefinition MakeDuplicate(IWritingSystemDefinition definition) { return(definition.Clone()); }