private void RunItem(DataSynDefItem item) { if (m_guienv != null) { if (m_guienv.Filter != null && !m_guienv.Filter.Contains(item.Target.Table)) { return; } var it = new SynItem(this, item); SetItemState(it, SynItemState.Start); it.InitAndLoadFootprints(); it.ProcessFootprints(); if (m_guienv.CompareOnly) { SetItemState(it, SynItemState.Compared); } else { SetItemState(it, SynItemState.Synchronized); } it.DetachFromSynchronizer(); } else { using (var it = new SynItem(this, item)) { it.Run(); } } }
private void SetItemState(SynItem item, SynItemState state) { item.State = state; if (m_guienv != null) { m_guienv.OnItemEvent(item, state); } }
SynItem GetItem() { var key = m_item.Target.Table; SynItem res = null; m_form.m_items.TryGetValue(key, out res); return(res); }
public void OnItemEvent(SynItem it, SynItemState ev) { MainWindow.Instance.RunInMainWindow(() => { if (ItemEvent != null) { ItemEvent(this, new SynItemEventArgs { State = ev, Item = it }); } }); }
public void SetItem(DataSynDefItem item, SynItem synitem) { m_item = item; m_sourceHint = null; m_targetHint = null; if (m_item != null && !m_itemCache.ContainsKey(m_item)) { m_itemCache[m_item] = new CacheItem(); } m_synItem = synitem; RefreshData(); }