Esempio n. 1
0
        private void DoDisconnect()
        {
            try
            {
                //if (_zk != null) _zk.Dispose();
                _zk = null;

                //added by Yang Li
                this.MyMainWindow.Title = "JZooKeeperViewer";
                //added by Yang Li
                this.ConnectionString = string.Empty;

                ListViewDataContext.Clear();
                TreeViewDataContext.Clear();
                Data = null;

                this.AddLog(LogType.Info, "Disconnect successfully.");
            }
            catch (Exception ex)
            {
                this.AddLog(LogType.Fatal, ex.Message);
            }
            finally
            {
                this.RaiseToolBarCanExecuteChanged();
            }
        }
 public void GetZookeeperNodes()
 {
     if (_zk != null)
     {
         TreeViewDataContext.Clear();
         var node = new ZookeeperTreeNodeModel("/", "/", null);
         TreeViewDataContext.Add(node);
         GetZookeeperNodesLoop(node);
     }
 }
 private void DoDisconnect()
 {
     try
     {
         //if (_zk != null) _zk.Dispose();
         _zk = null;
         ListViewDataContext.Clear();
         TreeViewDataContext.Clear();
         Data = null;
     }
     catch (Exception ex)
     {
         this.AddLog(LogType.Fatal, ex.Message);
     }
     finally
     {
         this.RaiseToolBarCanExecuteChanged();
     }
 }