예제 #1
0
 public EditableProgramItemControl(ProgramItemBase programItem)
 {
     ProgramItem = programItem;
     DataContext = ProgramItem;
     InitializeComponent();
     if (ProgramItem is SteamProgramItem)
     {
         ProgramLocationGrid.Visibility = Visibility.Collapsed;
     }
 }
예제 #2
0
        private void SaveProgramItem(object sender, EventArgs e)
        {
            ProgramItemBase update = (sender as EditableProgramItemControl).ProgramItem;

            ProgramItem.ProgramName   = update.ProgramName;
            ProgramItem.ImageLocation = update.ImageLocation;

            if (update is ProgramItem)
            {
                (ProgramItem as ProgramItem).ProgramLocation = (update as ProgramItem).ProgramLocation;
            }

            CloseEditGrid();
        }