Beispiel #1
0
        /// <summary>
        /// Launches the UI to edit an item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditItemButtonClick(object sender, RoutedEventArgs e)
        {
            Control control = sender as Control;

            // The item to edit is bound to the "Tag" property
            ModifyItemChildWindow window = new ModifyItemChildWindow(
                ((Item)control.Tag));

            window.NewItem = false;

            window.Closed += new EventHandler(ModifyItemWindowClosed);

            window.Show();
        }
Beispiel #2
0
        /// <summary>
        /// Handles launching a UI for creating a new window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void NewItemButtonClick(object sender, RoutedEventArgs e)
        {
            Control control = sender as Control;

            // The parent list is bound to the "Tag" property
            ModifyItemChildWindow window = new ModifyItemChildWindow(
                ((ModelList)control.Tag));

            window.NewItem = true;

            window.Closed += new EventHandler(ModifyItemWindowClosed);

            window.Show();
        }
Beispiel #3
0
        /// <summary>
        /// Launches the UI to edit an item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditItemButtonClick(object sender, RoutedEventArgs e)
        {
            Control control = sender as Control;

            // The item to edit is bound to the "Tag" property
            ModifyItemChildWindow window = new ModifyItemChildWindow(
                ((Item)control.Tag));

            window.NewItem = false;

            window.Closed += new EventHandler(ModifyItemWindowClosed);

            window.Show();
        }
Beispiel #4
0
        /// <summary>
        /// Handles launching a UI for creating a new window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void NewItemButtonClick(object sender, RoutedEventArgs e)
        {
            Control control = sender as Control;

            // The parent list is bound to the "Tag" property
            ModifyItemChildWindow window = new ModifyItemChildWindow(
                ((ModelList)control.Tag));
            window.NewItem = true;

            window.Closed += new EventHandler(ModifyItemWindowClosed);

            window.Show();
        }