コード例 #1
0
        /// <summary>
        /// Persists all modified writing systems.
        /// </summary>
        public void Save()
        {
            lock (m_syncRoot)
            {
                DateTime now = DateTime.UtcNow;
                foreach (PalasoWritingSystem ws in m_localStore.AllWritingSystems)
                {
                    if (ws.Modified || ws.DateModified.Ticks == 0)
                    {
                        ws.DateModified = now;
                    }

                    if (ws.MarkedForDeletion)
                    {
                        m_handleWss.Remove(ws.Handle);
                        if (m_userWritingSystem == ws)
                        {
                            m_userWritingSystem = null;
                        }
                    }
                }
                m_localStore.Save();
                Settings.Default.LocalKeyboards = UnionSettingsKeyboardsWithLocalStore();
                Settings.Default.Save();
            }
        }
コード例 #2
0
 /// <summary>
 /// Saves this instance.
 /// </summary>
 public override void Save()
 {
     base.Save();
     if (m_globalStore != null && Settings.Default.UpdateGlobalWSStore)
     {
         m_globalStore.Save();
     }
 }
コード例 #3
0
        /// <summary>
        /// Saves this instance.
        /// </summary>
        public override void Save()
        {
            int wsIgnoreCount = WritingSystemsToIgnore.Count;

            base.Save();
            if (wsIgnoreCount != WritingSystemsToIgnore.Count)
            {
                WriteGlobalWritingSystemsToIgnore();
            }
            if (m_globalStore != null)
            {
                m_globalStore.Save();
            }
        }