Example #1
0
        private void LogisticsViewCmd_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var newControl = new ModelViewItem()
            {
                Content    = new GAMS.Applications.Logistics.Logistics(this),
                Header     = "Logistcs",
                HeaderIcon = "pack://application:,,,/GAMS;component/SharedImages/Logistics-40x40.png",
                UserControlCatagoryApplicationType = UserControlApplicationsCatagoryType.Logistic
            };

            ModelViewTabComponents.Add(newControl);

            //newControl.Content.Focus();
        }
Example #2
0
        public void Delete(ModelViewItem modelViewItem, bool deleteAllOthers = false)
        {
            if (deleteAllOthers)
            {
                foreach (var a in _modelViewItems)
                {
                    if (modelViewItem != a)
                    {
                        _modelViewItems.Remove(a);
                    }
                }
            }
            else
            {
                _modelViewItems.Remove(modelViewItem);
            }

            AddButtonVisibility = _modelViewItems == null || _modelViewItems.Count == 0 ? Visibility.Collapsed : Visibility.Visible;
        }
Example #3
0
 public void Add(ModelViewItem modelViewItem)
 {
     _modelViewItems.Add(modelViewItem);
     SelectedItem        = modelViewItem;
     AddButtonVisibility = Visibility.Visible;
 }