Пример #1
0
        private async void listBoxContainers_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var index = listBoxContainers.IndexFromPoint(e.Location);

            if (index < 0)
            {
                return;
            }

            var container = (Container)listBoxContainers.Items[index];

            using (var containerEditDialog = new ContainerDialog(_client, container))
            {
                if (containerEditDialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                try
                {
                    await GetAndDisplayContainersAsync();
                }
                catch (Exception exception)
                {
                    MessageBox.Show(exception.Message);
                }
            }
        }
Пример #2
0
 private async void addNewToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var containerEditDialog = new ContainerDialog(_client))
     {
         if (containerEditDialog.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         try
         {
             await GetAndDisplayContainersAsync();
         }
         catch (Exception exception)
         {
             MessageBox.Show(exception.Message);
         }
     }
 }
Пример #3
0
        private async void propertyToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            var container = (Container)listBoxContainers.SelectedItem;

            using (var containerEditDialog = new ContainerDialog(_client, container))
            {
                if (containerEditDialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                try
                {
                    await GetAndDisplayContainersAsync();
                }
                catch (Exception exception)
                {
                    MessageBox.Show(exception.Message);
                }
            }
        }