Example #1
0
 private void ClearCacheToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         TreeNode        connectionNode = ClientUtility.GetContextMenuTreeviewNode(dataSourceTreeView, sender);
         IConnection     connection     = ApplicationState.Default.ActiveProject.Connections[connectionNode.Index];
         ConnectionCache cache          = new ConnectionCache(connection);
         cache.Clear();
         ApplicationState.Default.RaiseNotification(new NotificationEventArgs(NotificationType.Information, string.Format(Properties.Resources.DataSourceFormCacheClearSucceeded, connection.Name)));
     }
     catch (Exception ex)
     {
         ApplicationState.Default.RaiseNotification(new NotificationEventArgs(NotificationType.Error, ex.Message, ex));
     }
 }