コード例 #1
0
        private void addSnippetButton_Click(object sender, EventArgs e)
        {
            var selectedGroupIndex = groupsList.SelectedIndex;
            var addForm            = new AddSnippetForm();

            addForm.SelectedId = groupsList.SelectedIndex;
            addForm.ShowDialog();
            // Execute after dialog finished?
            ReloadGroupsUI();
            UpdateTrayMenu();
            groupsList.SelectedIndex = selectedGroupIndex;
        }
コード例 #2
0
        private void editSnippetButton_Click(object sender, EventArgs e)
        {
            int selectionCount = snippetsList.SelectedIndices.Count;

            if (selectionCount != 1)
            {
                return;
            }
            var snippet = currentSnippets[snippetsList.SelectedIndex];

            var selectedGroupIndex = groupsList.SelectedIndex;
            var editForm           = new AddSnippetForm(snippet);

            editForm.SelectedId = selectedGroupIndex;
            editForm.ShowDialog();
            // Execute after dialog finished?
            ReloadGroupsUI();
            ReloadSnippetsList(selectedGroupIndex);
            UpdateTrayMenu();
            groupsList.SelectedIndex = selectedGroupIndex;
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: venj/Clipy
 private void editSnippetButton_Click(object sender, EventArgs e)
 {
     int selectionCount = snippetsList.SelectedIndices.Count;
     if (selectionCount != 1) { return; }
     var snippet = currentSnippets[snippetsList.SelectedIndex];
     
     var selectedGroupIndex = groupsList.SelectedIndex;
     var editForm = new AddSnippetForm(snippet);
     editForm.SelectedId = selectedGroupIndex;
     editForm.ShowDialog();
     // Execute after dialog finished?
     ReloadGroupsUI();
     ReloadSnippetsList(selectedGroupIndex);
     UpdateTrayMenu();
     groupsList.SelectedIndex = selectedGroupIndex;
 }
コード例 #4
0
ファイル: Form1.cs プロジェクト: venj/Clipy
 private void addSnippetButton_Click(object sender, EventArgs e)
 {
     var selectedGroupIndex = groupsList.SelectedIndex;
     var addForm = new AddSnippetForm();
     addForm.SelectedId = groupsList.SelectedIndex;
     addForm.ShowDialog();
     // Execute after dialog finished?
     ReloadGroupsUI();
     UpdateTrayMenu();
     groupsList.SelectedIndex = selectedGroupIndex;
 }