Beispiel #1
0
 private void IsUnitCheckBox_Checked(object sender, RoutedEventArgs e)
 {
     //ItemCompleteBar.Value = DetermineProgress();
     if (IsUnitCheckBox.IsChecked == true)
     {
         item.Name   = NameTextBox.Text;
         item.IsUnit = true;
         var thumb     = ItemImageBox;
         var transform = thumb.RenderTransform as RotateTransform;
         item.ImageRotation = transform.Angle;
         SelectRack();
         Globals.SaveItem(item);
         EditItem eItem = new EditItem(item);
         this.NavigationService.Navigate(eItem);
     }
 }
Beispiel #2
0
        private void ItemsListGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Item item = (Item)ItemListGrid.SelectedItem;

            try
            {
                if (item.IsUnit == true)
                {
                    EditItem editItem = new EditItem(item);
                    this.NavigationService.Navigate(editItem);
                }
                else
                {
                    EditItemNonUnit editItem = new EditItemNonUnit(item);
                    this.NavigationService.Navigate(editItem);
                }
            }
            catch
            {
                return;
            }
        }
Beispiel #3
0
 private void ItemsListGrid_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         Item item = (Item)ItemListGrid.SelectedItem;
         try
         {
             if (item.IsUnit == true)
             {
                 EditItem editItem = new EditItem(item);
                 this.NavigationService.Navigate(editItem);
             }
             else
             {
                 EditItemNonUnit editItem = new EditItemNonUnit(item);
                 this.NavigationService.Navigate(editItem);
             }
         }
         catch
         {
             return;
         }
     }
 }