コード例 #1
0
        private void NewMI_Click(object sender, EventArgs e)
        {
            try
            {
                KeyValuePair <string, string> parameter = new ParameterEditDlg().ShowDialog(new KeyValuePair <string, string>());

                if (String.IsNullOrEmpty(parameter.Key))
                {
                    return;
                }

                AddItem(parameter);
                AdjustColumns();
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
コード例 #2
0
        private void EditMI_Click(object sender, EventArgs e)
        {
            try
            {
                if (ItemsLV.SelectedItems.Count != 1)
                {
                    return;
                }

                KeyValuePair <string, string> parameter = new ParameterEditDlg().ShowDialog((KeyValuePair <string, string>)ItemsLV.SelectedItems[0].Tag);

                if (String.IsNullOrEmpty(parameter.Key))
                {
                    return;
                }

                UpdateItem(ItemsLV.SelectedItems[0], parameter);
                AdjustColumns();
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
コード例 #3
0
        private void NewMI_Click(object sender, EventArgs e)
        {
            try
            {
                KeyValuePair<string,string> parameter = new ParameterEditDlg().ShowDialog(new KeyValuePair<string,string>());

                if (String.IsNullOrEmpty(parameter.Key))
                {
                    return;
                }

                AddItem(parameter);
                AdjustColumns();
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
コード例 #4
0
        private void EditMI_Click(object sender, EventArgs e)
        {
            try
            {
                if (ItemsLV.SelectedItems.Count != 1)
                {
                    return;
                }

                KeyValuePair<string,string> parameter = new ParameterEditDlg().ShowDialog((KeyValuePair<string,string>)ItemsLV.SelectedItems[0].Tag);

                if (String.IsNullOrEmpty(parameter.Key))
                {
                    return;
                }

                UpdateItem(ItemsLV.SelectedItems[0], parameter);
                AdjustColumns();
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }