Beispiel #1
0
 private void ShowTerminalForm(NewTerminalForm frmNewTerminal)
 {
     if (frmNewTerminal.ShowDialog() != TerminalFormDialogResult.Cancel)
     {
         this.UpdateFavoritesBindingSource();
     }
 }
Beispiel #2
0
 private void EditFavorite(IFavorite favorite)
 {
     using (var frmNewTerminal = new NewTerminalForm(this.persistence, this.connectionManager, this.favoriteIcons, favorite))
     {
         this.ShowTerminalForm(frmNewTerminal);
     }
 }
Beispiel #3
0
 private void NewToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var newTerminal = new NewTerminalForm(this.persistence, this.connectionManager, this.favoriteIcons, String.Empty))
     {
         this.ShowTerminalForm(newTerminal);
     }
 }
 private void btnNew_Click(object sender, EventArgs e)
 {
     using (NewTerminalForm frmNewTerminal = new NewTerminalForm(String.Empty, false))
     {
         if (frmNewTerminal.ShowDialog() == DialogResult.OK)
         {
             Settings.AddFavorite(frmNewTerminal.Favorite, frmNewTerminal.ShowOnToolbar);
             LoadConnections();
         }
     }
 }
 private void btnNew_Click(object sender, EventArgs e)
 {
     using (NewTerminalForm frmNewTerminal = new NewTerminalForm(String.Empty, false))
     {
         if (frmNewTerminal.ShowDialog() == DialogResult.OK)
         {
             Settings.AddFavorite(frmNewTerminal.Favorite, frmNewTerminal.ShowOnToolbar);
             LoadConnections();
         }
     }
 }
Beispiel #6
0
        private void CreateFavoriteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var frmNewTerminal = new NewTerminalForm(this.persistence, this.connectionManager, this.favoriteIcons, string.Empty))
            {
                var groupNode = this.favsTree.SelectedGroupNode;
                if (groupNode != null)
                {
                    frmNewTerminal.AssingSelectedGroup(groupNode.Group);
                }

                frmNewTerminal.ShowDialog();
            }
        }
        private void EditFavorite(FavoriteConfigurationElement favorite)
        {
            NewTerminalForm frmNewTerminal = new NewTerminalForm(favorite);
            string          oldName        = favorite.Name;

            if (frmNewTerminal.ShowDialog() == DialogResult.OK)
            {
                if (oldName != frmNewTerminal.favorite.Name)
                {
                    Settings.DeleteFavorite(oldName);
                }
                LoadConnections();
            }
        }
Beispiel #8
0
        private void ShowManageTerminalForm(IFavorite favorite)
        {
            using (var frmNewTerminal = new NewTerminalForm(this.persistence, this.connectionManager, this.favoriteIcons, favorite))
            {
                TerminalFormDialogResult result = frmNewTerminal.ShowDialog();

                if (result != TerminalFormDialogResult.Cancel)
                {
                    if (result == TerminalFormDialogResult.SaveAndConnect)
                    {
                        this.ConnectionsUiFactory.CreateTerminalTab(frmNewTerminal.Favorite);
                    }
                }
            }
        }
 private void CreateNewTerminal(string name)
 {
     using(NewTerminalForm frmNewTerminal = new NewTerminalForm(name, true))
     {
         if(frmNewTerminal.ShowDialog() == DialogResult.OK)
         {
             Settings.AddFavorite(frmNewTerminal.Favorite, frmNewTerminal.ShowOnToolbar);
             LoadFavorites();
             //LoadFavorites(txtSearchFavorites.Text);
             //LoadTags(txtSearchTags.Text);
             tscConnectTo.SelectedIndex = tscConnectTo.Items.IndexOf(frmNewTerminal.Favorite.Name);
             CreateTerminalTab(frmNewTerminal.Favorite);
         }
     }
     LoadFavorites();
 }
 public void ShowManageTerminalForm(FavoriteConfigurationElement Favorite)
 {
     using(NewTerminalForm frmNewTerminal = new NewTerminalForm(Favorite)) {
         frmNewTerminal.ShowDialog();
         LoadFavorites();
     }
 }
Beispiel #11
0
        private void ShowManageTerminalForm(IFavorite favorite)
        {
            using (var frmNewTerminal = new NewTerminalForm(this.Persistence, favorite))
            {
                TerminalFormDialogResult result = frmNewTerminal.ShowDialog();

                if (result != TerminalFormDialogResult.Cancel)
                {
                    if (result == TerminalFormDialogResult.SaveAndConnect)
                        this.ConnectionsUiFactory.CreateTerminalTab(frmNewTerminal.Favorite);
                }
            }
        }
Beispiel #12
0
        private void CreateFavoriteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var frmNewTerminal = new NewTerminalForm(this.Persistence, string.Empty))
            {
                var groupNode = this.favsTree.SelectedGroupNode;
                if (groupNode != null)
                    frmNewTerminal.AssingSelectedGroup(groupNode.Group);

                frmNewTerminal.ShowDialog();
            }
        }
 private void NewToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var frmNewTerminal = new NewTerminalForm(this.persistence, String.Empty))
     {
         if (frmNewTerminal.ShowDialog() != TerminalFormDialogResult.Cancel)
         {
             UpdateFavoritesBindingSource();
         }
     }
 }
 private void EditFavorite(IFavorite favorite)
 {
     using (var frmNewTerminal = new NewTerminalForm(this.persistence, favorite))
     {
         if (frmNewTerminal.ShowDialog() != TerminalFormDialogResult.Cancel)
         {
             UpdateFavoritesBindingSource();
         }
     }
 }
 private void EditFavorite(FavoriteConfigurationElement favorite)
 {
     NewTerminalForm frmNewTerminal = new NewTerminalForm(favorite);
     string oldName = favorite.Name;
     if (frmNewTerminal.ShowDialog() == DialogResult.OK)
     {
         if (oldName != frmNewTerminal.favorite.Name) Settings.DeleteFavorite(oldName);
         LoadConnections();
     }
 }