Ejemplo n.º 1
0
 private void mOptionSqlMonitor_Click(object sender, RoutedEventArgs e)
 {
     if (swSqlWriter == null)
     {
         swSqlWriter = SqlMonitor.OpenSqlFile();
     }
     else
     {
         swSqlWriter.Close();
         swSqlWriter.Dispose();
         swSqlWriter = null;
         MessageBox.Show("已停止监视。", "消息", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }
Ejemplo n.º 2
0
 public void WriteSqlLog(ZippyCoder.Entity.Col col, string oldColName)
 {
     if (_CurrentTreeViewItem.Tag is ZippyCoder.Entity.Table)
     {
         SqlMonitor.WriteSqlServerChangeLog(swSqlWriter, _CurrentTreeViewItem.Tag as ZippyCoder.Entity.Table, col, operation, oldColName);
     }
     else if (_CurrentTreeViewItem.Tag is ZippyCoder.Entity.Col)
     {
         TreeViewItem parentTVI = _CurrentTreeViewItem.Parent as TreeViewItem;
         if (parentTVI.Tag is ZippyCoder.Entity.Table)
         {
             SqlMonitor.WriteSqlServerChangeLog(swSqlWriter, parentTVI.Tag as ZippyCoder.Entity.Table, col, operation, oldColName);
         }
     }
 }