예제 #1
0
 /// <summary>
 /// Handler raises event about edit begun.
 /// </summary>
 /// <param name="sender">View sender.</param>
 /// <param name="e">Event args.</param>
 private void _ViewEditBegun(object sender, DataObjectEventArgs e)
 {
     // Raise event to OptimizeAndEdit page about editing was started.
     if (EditBegun != null)
     {
         EditBegun(this, e);
     }
 }
예제 #2
0
 /// <summary>
 /// Hndler raises event about editing was commited.
 /// </summary>
 /// <param name="sender">View sender.</param>
 /// <param name="e">Event args.</param>
 private void _ViewEditCommitted(object sender, DataObjectEventArgs e)
 {
     // Raise event to OptimizeAndEdit page about editing was commited.
     if (EditCommitted != null)
     {
         EditCommitted(this, e);
     }
 }
예제 #3
0
 /// <summary>
 /// Handler raises event about new object was created.
 /// </summary>
 /// <param name="sender">View sender.</param>
 /// <param name="e">Event args.</param>
 private void _ViewNewObjectCreated(object sender, DataObjectEventArgs e)
 {
     // Raise event to OptimizeAndEdit page about new object was created.
     if (NewObjectCreated != null)
     {
         NewObjectCreated(this, e);
     }
 }
        private void DataGridCollectionViewSource_NewItemCommitted(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (NewObjectCommitted != null)
            {
                NewObjectCommitted(this, args);
            }
        }
예제 #5
0
        /// <summary>
        /// Handler raises event about editing was started.
        /// </summary>
        /// <param name="sender">Data grid control sender.</param>
        /// <param name="e">Item event args.</param>
        private void _DataGridCollectionViewSourceEditBegun(object sender, DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((AppData.DataObject)e.Item);

            if (EditBegun != null)
            {
                EditBegun(this, args);
            }
        }
        private void DataGridCollectionViewSource_EditBegun(object sender, DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (EditBegun != null)
            {
                EditBegun(this, args);
            }
        }
예제 #7
0
        private void DataGridCollectionViewSource_EditCanceled(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (EditCanceled != null)
            {
                EditCanceled(this, args);
            }
            _SetSelectionStatus();
        }
예제 #8
0
        /// <summary>
        /// Raises event about new item was commited.
        /// </summary>
        /// <param name="sender">Data grid control sender.</param>
        /// <param name="e">Item event args.</param>
        private void _DataGridCollectionViewSourceNewItemCommitted(object sender,
                                                                   DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((AppData.DataObject)e.Item);

            if (NewObjectCommitted != null)
            {
                NewObjectCommitted(this, args);
            }
        }
예제 #9
0
        private void DataGridCollectionViewSource_NewItemCanceled(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            IsEditingInProgress = false;
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (NewObjectCanceled != null)
            {
                NewObjectCanceled(this, args);
            }
            _SetSelectionStatus();
        }
예제 #10
0
        private void DataGridCollectionViewSource_NewItemCanceled(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (NewObjectCanceled != null)
            {
                NewObjectCanceled(this, args);
            }

            _geocodablePage.OnNewItemCancelling();
            _SetSelectionStatus();
        }
예제 #11
0
        private void DataGridCollectionViewSource_NewItemCommitted(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (NewObjectCommitted != null)
            {
                NewObjectCommitted(this, args);
            }

            // remove handler to property changed event when new item is commited
            _UnsubscribeFromMobileDevicePropertyChanged((MobileDevice)e.Item);
        }
예제 #12
0
        /// <summary>
        /// Handler raise event about Editing was commited.
        /// </summary>
        /// <param name="sender">Data grid control sender.</param>
        /// <param name="e">Item event args.</param>
        private void _DataGridCollectionViewSourceEditCommitted(object sender,
                                                                DataGridItemEventArgs e)
        {
            BarriersDayStatusesManager.Instance.OnBarrierChanged();

            DataObjectEventArgs args = new DataObjectEventArgs((AppData.DataObject)e.Item);

            if (EditCommitted != null)
            {
                EditCommitted(this, args);
            }
        }
예제 #13
0
        /// <summary>
        /// Handler raises event about editing was cancelled.
        /// </summary>
        /// <param name="sender">Data grid control sender.</param>
        /// <param name="e">Item event args.</param>
        private void _DataGridCollectionViewSourceEditCanceled(object sender,
                                                               DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((AppData.DataObject)e.Item);

            if (EditCanceled != null)
            {
                EditCanceled(this, args);
            }

            _regionsPage.OnEditCanceled(e);
            _SetSelectionStatus(((ICollection <Barrier>)e.CollectionView.SourceCollection).Count);
        }
예제 #14
0
        private void DataGridCollectionViewSource_EditCanceled(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (EditCanceled != null)
            {
                EditCanceled(this, args);
            }

            // remove handler to property changed event when editing is cancelled
            _UnsubscribeFromMobileDevicePropertyChanged((MobileDevice)e.Item);
            _SetSelectionStatus();
        }
예제 #15
0
        /// <summary>
        /// Raises event about new item was cancelled.
        /// </summary>
        /// <param name="sender">Data grid control sender.</param>
        /// <param name="e">Item event args.</param>
        private void _DataGridCollectionViewSourceNewItemCanceled(object sender,
                                                                  DataGridItemEventArgs e)
        {
            var args = new DataObjectEventArgs((AppData.DataObject)e.Item);

            if (NewObjectCanceled != null)
            {
                NewObjectCanceled(this, args);
            }

            IsEditingInProgress = false;
            _SetSelectionStatus(((ICollection <Barrier>)e.CollectionView.SourceCollection).Count);
        }
예제 #16
0
        private void DataGridCollectionViewSource_NewItemCreated(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            // Invoking changing of the item's name. Those method must be invoked, otherwise
            // grid will not understand that item in insertion ro was changed and grid wouldnt allow
            // to commit this item.
            Dispatcher.BeginInvoke(new Action <Xceed.Wpf.DataGrid.DataGridItemEventArgs>(_ChangeName),
                                   DispatcherPriority.DataBind, e);

            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (NewObjectCreated != null)
            {
                NewObjectCreated(this, args);
            }
        }
예제 #17
0
        /// <summary>
        /// Handler raises event about new item was created and invoking changing name of zone.
        /// </summary>
        /// <param name="sender">Data grid control sender.</param>
        /// <param name="e">Item event args.</param>
        private void _DataGridCollectionViewSourceNewItemCreated(object sender,
                                                                 DataGridItemEventArgs e)
        {
            // Invoking changing of the item's name. Those method must be invoked, otherwise
            // grid will not understand that item in insertion ro was changed and grid wouldnt allow
            // to commit this item.
            Dispatcher.BeginInvoke(new ParamsDelegate(_ChangeName),
                                   System.Windows.Threading.DispatcherPriority.Render, e);

            DataObjectEventArgs args = new DataObjectEventArgs((AppData.DataObject)e.Item);

            if (NewObjectCreated != null)
            {
                NewObjectCreated(this, args);
            }
        }
예제 #18
0
        private void DataGridCollectionViewSource_NewItemCreated(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            // Invoking changing of the item's name. Those method must be invoked, otherwise
            // grid will not understand that item in insertion ro was changed and grid wouldnt allow
            // to commit this item.
            Dispatcher.BeginInvoke(new ParamsDelegate(_ChangeName),
                                   System.Windows.Threading.DispatcherPriority.Render, e, _insertionRow);

            IsEditingInProgress = true;
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (NewObjectCreated != null)
            {
                NewObjectCreated(this, args);
            }
        }
예제 #19
0
        private void DataGridCollectionViewSource_NewItemCreated(object sender, Xceed.Wpf.DataGrid.DataGridItemEventArgs e)
        {
            // Invoking changing of the item's name. Those method must be invoked, otherwise
            // grid will not understand that item in insertion ro was changed and grid wouldnt allow
            // to commit this item.
            Dispatcher.BeginInvoke(new ParamsDelegate(_ChangeName),
                                   System.Windows.Threading.DispatcherPriority.Render, e);

            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (NewObjectCreated != null)
            {
                NewObjectCreated(this, args);
            }

            // when user creates new item add handler to property changed event for show validation
            _SubscribeToMobileDevicePropertyChanged((MobileDevice)e.Item);
        }
예제 #20
0
        private void DataGridCollectionViewSource_EditBegun(object sender, DataGridItemEventArgs e)
        {
            DataObjectEventArgs args = new DataObjectEventArgs((ESRI.ArcLogistics.Data.DataObject)e.Item);

            if (EditBegun != null)
            {
                EditBegun(this, args);
            }

            var currentDevice = (MobileDevice)e.Item;

            if (_devicesEditor != null)
            {
                _devicesEditor.BeginEditing(currentDevice);
            }

            // add handler to property changed event when user starts editing
            _SubscribeToMobileDevicePropertyChanged((MobileDevice)e.Item);
        }
예제 #21
0
 private void _optimizePage_EditCanceled(object sender, ESRI.ArcLogistics.App.Pages.DataObjectEventArgs e)
 {
     _CheckEnabled();
 }
 /// <summary>
 /// Handler raises event about edit begun.
 /// </summary>
 /// <param name="sender">View sender.</param>
 /// <param name="e">Event args.</param>
 private void _ViewEditBegun(object sender, DataObjectEventArgs e)
 {
     // Raise event to OptimizeAndEdit page about editing was started.
     if (EditBegun != null)
         EditBegun(this, e);
 }
예제 #23
0
 private void _SchedulePage_EditCanceled(object sender, AppPages.DataObjectEventArgs e)
 {
     _CheckEnabled();
 }
 /// <summary>
 /// Handler raises event about new object was created.
 /// </summary>
 /// <param name="sender">View sender.</param>
 /// <param name="e">Event args.</param>
 private void _ViewNewObjectCreated(object sender, DataObjectEventArgs e)
 {
     // Raise event to OptimizeAndEdit page about new object was created.
     if (NewObjectCreated != null)
         NewObjectCreated(this, e);
 }
 /// <summary>
 /// Hndler raises event about editing was commited.
 /// </summary>
 /// <param name="sender">View sender.</param>
 /// <param name="e">Event args.</param>
 private void _ViewEditCommitted(object sender, DataObjectEventArgs e)
 {
     // Raise event to OptimizeAndEdit page about editing was commited.
     if (EditCommitted != null)
         EditCommitted(this, e);
 }
예제 #26
0
 /// <summary>
 /// Checks whether command is enabled when editing cancelled.
 /// </summary>
 /// <param name="sender">OptimizeAndEdit page.</param>
 /// <param name="e">Event args.</param>
 private void _SchedulePageEditCanceled(object sender, DataObjectEventArgs e)
 {
     _CheckEnabled();
 }
 private void _optimizePage_EditCommitted(object sender, DataObjectEventArgs e)
 {
     _CheckEnabled();
 }
예제 #28
0
 private void _optimizePage_NewObjectCreated(object sender, DataObjectEventArgs e)
 {
     _CheckEnabled();
 }
예제 #29
0
 private void OptimizePage_NewObjectCreated(object sender, ESRI.ArcLogistics.App.Pages.DataObjectEventArgs e)
 {
     _CheckEnabled();
 }
 private void ParentPage_EditCanceled(object sender, DataObjectEventArgs e)
 {
     _CheckEnabled();
 }
예제 #31
0
        /// <summary>
        /// Checks whether command is enabled and updates collection of options when editing saved.
        /// </summary>
        /// <param name="sender">OptimizeAndEdit page.</param>
        /// <param name="e">Event args.</param>
        private void _SchedulePageEditCommitted(object sender, DataObjectEventArgs e)
        {
            if (null != _schedulePage.CurrentSchedule)
                _CreateOptions(_schedulePage.CurrentSchedule);

            _CheckEnabled();
        }
예제 #32
0
 private void _schedulePage_EditCanceled(object sender, ESRI.ArcLogistics.App.Pages.DataObjectEventArgs e)
 {
     _CheckEnabled();
     _UpdateTooltip();
 }