Example #1
0
        void TasksViewC1_Loaded(object sender, RoutedEventArgs e)
        {
            //BCheck.Data.ViewModel.Current.Refresh(false);   
            ViewModel.Current.PropertyChanged +=  ViewModel_PropertyChanged1;
            //The event is needed because there is a requirement to change the layout when
            //new data is fetched and custom search is used with manager specified.
            ViewModel.Current.Tasks.CollectionChanged += Tasks_CollectionChanged;
            _thisGrid = this;

            //do this for identifying a column in the absence of any other naming, July 9
            TaskGrid.Columns[11].SetColumnID(COMPLETED_COLUMNNAME);
            TaskGrid.Columns[12].SetColumnID(APPROVED_COLUMNNAME );
            TaskGrid.Columns[13].SetColumnID(REJECTED_COLUMNNAME );
            //do this for identifying a column in the absence of any other naming, july 9
            DependencyObject depParent = this.Parent;
            var qryParent = from p in depParent.GetVisualAncestors() where p.GetType().Equals(typeof(MainPage)) select p;
            if (!qryParent.Any()) throw new InvalidOperationException("Could not retreive an instance of the MainPage from within TasksViewC1");

            MainPage parentPage = (MainPage)(qryParent.First());
            parentPage.ApplicationExitingEvent += new EventHandler<EventArgs>(parentPage_ApplicationExitingEvent);
            LoadColumnWidths();//shoudl be uncommented for Mar , 2011 release
        }
Example #2
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Bcheck.TaskUI;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.LeftNavTaskView = ((System.Windows.Controls.Grid)(this.FindName("LeftNavTaskView")));
     this.gridLeftNav = ((System.Windows.Controls.ColumnDefinition)(this.FindName("gridLeftNav")));
     this.gridTaskRows = ((System.Windows.Controls.ColumnDefinition)(this.FindName("gridTaskRows")));
     this.gridStatusBar = ((System.Windows.Controls.RowDefinition)(this.FindName("gridStatusBar")));
     this.ucStatusBar = ((BCheck.TaskUI.StatusBar)(this.FindName("ucStatusBar")));
     this.acc = ((System.Windows.Controls.Accordion)(this.FindName("acc")));
     this.AccordionSummary = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionSummary")));
     this.AccordionSearch = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionSearch")));
     this.AccordionAlerts = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionAlerts")));
     this.TasksControl = ((BCheck.TaskUI.TasksViewC1)(this.FindName("TasksControl")));
     this.borderGrabber = ((System.Windows.Controls.Border)(this.FindName("borderGrabber")));
     this.txtGrabberExpandor = ((System.Windows.Controls.TextBlock)(this.FindName("txtGrabberExpandor")));
     this.grabberRotate = ((System.Windows.Media.RotateTransform)(this.FindName("grabberRotate")));
     this.grabberTranslate = ((System.Windows.Media.TranslateTransform)(this.FindName("grabberTranslate")));
     this.BusyIndicator = ((System.Windows.Controls.BusyIndicator)(this.FindName("BusyIndicator")));
 }