예제 #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
                });
            }
        }
예제 #2
0
 public void RadTabbedWindow_CreateNewTab(UserControl control, string title)
 {
     ModelViewTabComponents.Add(new ModelViewItem()
     {
         Content = control, Header = title
     });
 }
예제 #3
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();
        }
예제 #4
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();
        }