Exemplo n.º 1
0
        private void editToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ListViewItem selectedItem = GetSelectedEntry();

            if (selectedItem == null)
            {
                return;
            }

            String     hostname = (String)selectedItem.Tag;
            HostsEntry entry    = HostsFileManager.FindEntry(hostname);

            if (entry == null)
            {
                return;
            }

            EditDialog dialog = new EditDialog(entry);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                MarkUnsavedChanges();
                this.Refresh(false);
            }
        }
Exemplo n.º 2
0
        private void addNewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EditDialog dialog = new EditDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                MarkUnsavedChanges();
                this.Refresh(false);
            }
        }
Exemplo n.º 3
0
        private void addNewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EditDialog dialog = new EditDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                MarkUnsavedChanges();
                this.Refresh(false);
            }
        }
Exemplo n.º 4
0
        private void editToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ListViewItem selectedItem = GetSelectedEntry();

            if (selectedItem == null)
            {
                return;
            }

            String hostname = (String)selectedItem.Tag;
            HostsEntry entry = HostsFileManager.FindEntry(hostname);

            if (entry == null)
            {
                return;
            }

            EditDialog dialog = new EditDialog(entry);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                MarkUnsavedChanges();
                this.Refresh(false);
            }
        }