private void OnConnectionRemoved(object sender, DatabaseConnectionContextEventArgs args)
 {
     if (builder.MoveToObject(args.ConnectionContext))
     {
         builder.Remove();
         builder.MoveToParent();
     }
 }
        private void OnConnectionAdded(object sender, DatabaseConnectionContextEventArgs args)
        {
            TreeIter newIter = store.AppendValues(args.ConnectionContext.ConnectionSettings.Name, args.ConnectionContext);
            TreeIter iter;

            if (!GetActiveIter(out iter))
            {
                SetActiveIter(newIter);
            }
        }
Пример #3
0
        private void OnConnectionRemoved(object sender, DatabaseConnectionContextEventArgs args)
        {
            ITreeBuilder builder = Context.GetTreeBuilder(args.ConnectionContext);

            if (builder.MoveToObject(args.ConnectionContext))
            {
                builder.Remove();
                builder.MoveToParent();
                builder.UpdateAll();
            }
        }
        private void OnConnectionRemoved(object sender, DatabaseConnectionContextEventArgs args)
        {
            TreeIter iter = GetTreeIter(args.ConnectionContext);
            TreeIter selected;

            if (GetActiveIter(out selected))
            {
                if (iter.Equals(selected))
                {
                    store.Remove(ref iter);
                    if (store.GetIterFirst(out iter))
                    {
                        SetActiveIter(iter);
                    }
                }
            }
            store.Remove(ref iter);
        }
        private void OnConnectionRefreshed(object sender, DatabaseConnectionContextEventArgs args)
        {
            TreeIter iter = GetTreeIter(args.ConnectionContext);

            store.SetValue(iter, 0, args.ConnectionContext.ConnectionSettings.Name);
        }
Пример #6
0
 private void OnConnectionAdded(object sender, DatabaseConnectionContextEventArgs args)
 {
     builder.AddChild(args.ConnectionContext);
 }