Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddStorageClicked(object sender, EventArgs e)
        {
            using (AddStorageLocationForm Form = new AddStorageLocationForm())
            {
                if (Form.ShowDialog(this) == DialogResult.OK)
                {
                    Program.Settings.StorageLocations.Add(Form.Settings);
                    Program.SaveSettings();

                    RefreshItems();
                }
            }
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditClicked(object sender, EventArgs e)
        {
            if (storageLocationList.SelectedItems.Count == 0)
            {
                return;
            }

            using (AddStorageLocationForm Form = new AddStorageLocationForm())
            {
                Form.Settings = storageLocationList.SelectedItems[0].Tag as StorageLocation;
                if (Form.ShowDialog(this) == DialogResult.OK)
                {
                    Program.SaveSettings();

                    RefreshItems();
                }
            }
        }