Exemple #1
0
        private void rtw_MainContentView_AddingNewTab(object sender, Telerik.Windows.Controls.TabbedWindow.AddingNewTabEventArgs e)
        {
            //clicking the add button means that it adds a default item to the main contol - eg; if logistics is open it will add a new delivery advice

            if ((rtw_MainContentView.SelectedItem as ModelViewItem).UserControlCatagoryApplicationType == UserControlApplicationsCatagoryType.Logistic)
            {
                ModelViewTabComponents.Add(new ModelViewItem()
                {
                    Content    = new GAMS.Applications.Logistics.DeliveryAdviceSingleView((rtw_MainContentView.SelectedItem as ModelViewItem).Content, -1),
                    HeaderIcon = "pack://application:,,,/GAMS;component/SharedImages/LogisticsNew-40x40.png",
                    Header     = "New DA",
                    UserControlCatagoryApplicationType = UserControlApplicationsCatagoryType.Logistic
                });
            }
            else if ((rtw_MainContentView.SelectedItem as ModelViewItem).UserControlCatagoryApplicationType == UserControlApplicationsCatagoryType.WorkOrder)
            {
                ModelViewTabComponents.Add(new ModelViewItem()
                {
                    Content    = new GAMS.Applications.WorkOrder.WorkOrderSingleView(this, -1),
                    HeaderIcon = "pack://application:,,,/GAMS;component/SharedImages/WorkOrderNew-40x40.png",
                    Header     = "New WO",
                    UserControlCatagoryApplicationType = UserControlApplicationsCatagoryType.WorkOrder
                });
            }
        }
Exemple #2
0
 public void RadTabbedWindow_CreateNewTab(UserControl control, string title)
 {
     ModelViewTabComponents.Add(new ModelViewItem()
     {
         Content = control, Header = title
     });
 }
Exemple #3
0
        private void rmi_MainTabbedWindow_CloseAllButThis(object sender, RoutedEventArgs e)
        {
            var targetModelViewItem = (e.Source as MenuItem);

            if (targetModelViewItem != null)
            {
                ModelViewTabComponents.Delete(targetModelViewItem.DataContext as ModelViewItem, true);
            }
        }
Exemple #4
0
        private void WorkOrderViewCmd_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            ModelViewTabComponents.Add(new ModelViewItem()
            {
                Content    = new GAMS.Applications.WorkOrder.WorkOrderListView(this),
                Header     = "Work Order List",
                HeaderIcon = "pack://application:,,,/GAMS;component/SharedImages/List-40x40.png",
                UserControlCatagoryApplicationType = UserControlApplicationsCatagoryType.WorkOrder
            });

            rtw_MainContentView.Focus();
        }
Exemple #5
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();
        }
Exemple #6
0
 private void rmi_MainTabbedWindow_CloseAll(object sender, RoutedEventArgs e)
 {
     ModelViewTabComponents.Clear();
     rm_MainMenuLeft.Focus();
 }