• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DataEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DataEventArgs的典型用法代码示例。如果您正苦于以下问题:C# DataEventArgs类的具体用法?C# DataEventArgs怎么用?C# DataEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataEventArgs类属于命名空间,在下文中一共展示了DataEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DeleteCompleted

		private void DeleteCompleted(object sender, DataEventArgs<ServiceResponse<PagedResult<ScalarResult>>> e)
		{
			((IServiceCallState<PagedResult<ScalarResult>>)sender).OperationCompleted -= DeleteCompleted;

			if (e.Data.Error == null && e.Data.Body.Count == 1 && e.Data.Body.Results[0].Value == 1) //TODO: Check and handle other values.
				SessionChanged(this, new DataEventArgs<Session>(null));
		}
开发者ID:CHAOS-Community,项目名称:CHAOS.Portal.Client-.NET,代码行数:7,代码来源:ASessionExtension.cs


示例2: UpdateCompleted

		private void UpdateCompleted(object sender, DataEventArgs<ServiceResponse<PagedResult<Session>>> e)
		{
			((IServiceCallState<PagedResult<Session>>)sender).OperationCompleted -= UpdateCompleted;

			if (e.Data.Error == null && e.Data.Body.Count == 1) //TODO: Handle if there is less or more than one Session returned.
				SessionChanged(this, new DataEventArgs<Session>(e.Data.Body.Results[0]));
		}
开发者ID:CHAOS-Community,项目名称:CHAOS.Portal.Client-.NET,代码行数:7,代码来源:ASessionExtension.cs


示例3: Shell_LoadInquiry

        void Shell_LoadInquiry(object sender, DataEventArgs<string> e)
        {
            if (string.IsNullOrEmpty(e.Value))
                return;

            if (e.Value == curLook && window != null && window.IsVisible)
                return;


            ClassEntity clsEntity = Shell.CboEntity.SelectedItem as ClassEntity;

            IQueriesPresenter presenter = container.Resolve<IQueriesPresenter>();
            bool result = presenter.LoadShortCut(e.Value, clsEntity.ShortcutColumnID);

            if (result)
            {
                window = Util.GetInternalWindow(Shell.ParentContent.WindowsContainer, "Inquiry Shortcut");
                presenter.Window = window;
                window.GridContent.Children.Add((QueriesView)presenter.View);
                window.Show();
                curLook = e.Value;
                return;
            }

            if (e.Value == curLook)
                return;

            curLook = e.Value;
            Util.ShowMessage("No record found.");
            
        }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:31,代码来源:ShellPresenter.cs


示例4: UrlAliasBeforeWrite

 public static void UrlAliasBeforeWrite(object sender, DataEventArgs eventArgs)
 {
     var urlAlias = eventArgs.Data as IUrlAlias;
     urlAlias.UrlAlias = "/" + urlAlias.UrlAlias.Trim(new[] { '/' });
     urlAlias.RedirectLocation = urlAlias.RedirectLocation.StartsWith("http") ? urlAlias.RedirectLocation
         : "/" + urlAlias.RedirectLocation.Trim(new[] { '/' });
 }
开发者ID:CPHCloud,项目名称:c1packages-urlaliases,代码行数:7,代码来源:UrlAliasStartupHandler.cs


示例5: _rfidscanner_DataEvent

        void _rfidscanner_DataEvent(object sender, DataEventArgs e)
        {
            string str = "Number of tags read: " + scanner.TagCount.ToString() + "\r\n";

            for (int i = 0; i < scanner.TagCount; i++)
            {
                if (i == 0)
                {
                    scanner.FirstTag();
                    UpdateRFIDData(scanner);
                }
                else
                    scanner.NextTag();

                str += "Tag: " + i.ToString() + "\r\n";
                str += "\tId:        " + BitConverter.ToString(scanner.CurrentTagId) + "\r\n";
                str += "\tProtocol:  " + scanner.CurrentTagProtocol.ToString() + "\r\n";
                str += "\tUser data: " + Encoding.ASCII.GetString(scanner.CurrentTagUserData).Trim('\0') + "\r\n";
            }
            if (scanner.TagCount > 0)
                scanner.FirstTag();

            DisplayMessage(str);

            if (scanner.ContinuousReadMode)
                scanner.DataEventEnabled = true;
        }
开发者ID:ahaha0807,项目名称:num_banda,代码行数:27,代码来源:RFIDScannerScreen.cs


示例6: OnDataEvent

    public void OnDataEvent(object sender, DataEventArgs dataEventArgs)
    {
        log.Info("Cash Unit Data Event registered");
        if (cashUnit.DepositAmount < sum)
        {
            
            TotalPaid = TotalPaid + cashUnit.DepositAmount;
            Remaining = sum - TotalPaid;
            if (Remaining <= 0)
            {
                //Hier steht, was passiert, wenn die Summe oder mehr als die Summe bezahlt wurde
                log.Info("Gesamte Summe bezahlt.");
                cashUnit.Close();
            }
            else
            {
                //Hier steht, was passiert, wenn noch nciht die gesamte Summe beglichen wurde
                log.Info("Es fehlen noch " + Remaining.ToString() + " Euro");
            }
        }
        else
        {
            //Hier steht, was passiert, wenn die Summe oder mehr als die Summe bezahlt wurde
            log.Info("Gesamte Summe bezahlt.");
            cashUnit.Close();
        }


    }
开发者ID:cstrobbe,项目名称:C4A-TVM,代码行数:29,代码来源:CashUnit.cs


示例7: OnViewChanged

        public void OnViewChanged(object sender, DataEventArgs<NavigationArgs> args)
        {
            //rec_CityOfService.Opacity = 0.7d;
            //rec_TypeOfJourney.Opacity = 0.7d;
            //rec_PickUpAddress.Opacity = 0.7d;
            //rec_DropOffAddress.Opacity = 0.7d;
            //rec_DateAndPickupTime.Opacity = 0.7d;
            //rec_DropOffTime.Opacity = 0.7d;
            //rec_TypeOfVehicle.Opacity = 0.7d;
            //rec_AdditionalStops.Opacity = 0.7d;
            //rec_Charges.Opacity = 0.7d;


            //if (args.Value.CurrentView == eMainView.GetQuote)
            //{
            //    switch (args.Value.CurrentSubView)
            //    {
            //        case eSubView.CityOfService: rec_CityOfService.Opacity = 0; break;
            //        case eSubView.TypeOfJourney: rec_TypeOfJourney.Opacity = 0; break;
            //        case eSubView.PickUpAddress: rec_PickUpAddress.Opacity = 0; break;
            //        case eSubView.DropOffAddress: rec_DropOffAddress.Opacity = 0; break;
            //        case eSubView.DateAndPickupTime: rec_DateAndPickupTime.Opacity = 0; 
            //                                         rec_DropOffTime.Opacity = 0; break;
            //        case eSubView.TypeOfVehicle: rec_TypeOfVehicle.Opacity = 0; break;
            //        case eSubView.AdditionalStops: rec_AdditionalStops.Opacity = 0; break;
            //        case eSubView.Charges: rec_Charges.Opacity = 0; break;
            //    }
            //}
        }
开发者ID:felixthehat,项目名称:Limo,代码行数:29,代码来源:QuoteEntryView.xaml.cs


示例8: OnProfileSelected

 public void OnProfileSelected(object sender, DataEventArgs<AssociationUser> e)
 {
     if ((sender as ProfilesViewModel).AssociationManagerId == _manager.Id)
     {
         _selectedProfile = e.Value;
     }
 }
开发者ID:felixthehat,项目名称:Limo,代码行数:7,代码来源:SavedAddressListViewModel.cs


示例9: scanner_DataEvent

 public void scanner_DataEvent(object sender, DataEventArgs e)
 {
     //sobald Scan erkannt, Daten ablegen in sData
     byte[] Data = scanner.ScanData;
     sData = System.Text.Encoding.ASCII.GetString(Data);
     sData = sData.Remove(0, 5);
 }
开发者ID:cstrobbe,项目名称:C4A-TVM,代码行数:7,代码来源:IDScanner.cs


示例10: DataEvents_OnNew

        static void DataEvents_OnNew(object sender, DataEventArgs dataEventArgs)
        {
            // here a minor update to the cache could be done
            // (like adding info about the new element only).

            return;
        }
开发者ID:moljac,项目名称:HolisticWareFtCompositeC1,代码行数:7,代码来源:News.cs


示例11: OnViewChanged

        public void OnViewChanged(object sender, DataEventArgs<NavigationArgs> args)
        {
            foreach (UserControl uc in BookingViewsPanel.Children)
            {
                uc.Visibility = Visibility.Collapsed;
                if (uc.Tag.ToString() == args.Value.CurrentSubView.ToString())
                {
                    uc.Visibility = Visibility.Visible;
                }
            }

            //if (args.Value.CurrentView == eMainView.GetQuote)
            //{
            //    switch (args.Value.CurrentSubView)
            //    {
            //        case eSubView.CityOfService: viewCityOfService.Visibility = Visibility.Visible; break;
            //        case eSubView.TypeOfJourney: viewTypeOfJourney.Visibility =Visibility.Visible; break;
            //        case eSubView.PickUpAddress: viewPickUpAddress.Visibility = Visibility.Visible; break;
            //        case eSubView.DropOffAddress: viewDropOffAddress.Visibility = Visibility.Visible; break;
            //        //case eSubView.PickUpAddress: tcAreas.SelectedIndex = 2; break;
            //        //case eSubView.DropOffAddress: tcAreas.SelectedIndex = 3; break;
            //        //case eSubView.DateAndPickupTime: tcAreas.SelectedIndex = 4; break;
            //        //case eSubView.TypeOfVehicle: tcAreas.SelectedIndex = 5; break;
            //        //case eSubView.AdditionalStops: tcAreas.SelectedIndex = 6; break;
            //        //case eSubView.Charges: tcAreas.SelectedIndex = 7; break;
            //    }
            //}
        }
开发者ID:felixthehat,项目名称:Limo,代码行数:28,代码来源:GetQuoteView.xaml.cs


示例12: OnViewChanged

        public void OnViewChanged(object sender, DataEventArgs<NavigationArgs> args)
        {
            if (args.Value.CurrentView == eMainView.BookingComplete)
            {
                gridBooking.Visibility = Visibility.Collapsed;
                viewBookingConfirmation.Visibility = Visibility.Visible;
            }

            //foreach (UserControl uc in BookingViewsGrid.Children)
            //{
            //    uc.Visibility = Visibility.Collapsed;
            //    if (uc.Tag.ToString() == args.Value.CurrentView.ToString())
            //    {
            //        uc.Visibility = Visibility.Visible;
            //    }
            //}

            //switch (args.Value.CurrentView)
            //{
            //    case eMainView.GetQuote: tcAreas.SelectedIndex = 0; break;
            //    //case eMainView.GetQuoteConfirmation: tcAreas.SelectedIndex = 1; break;
            //    //case eMainView.GetQuoteError: tcAreas.SelectedIndex = 2; break;
            //    //case eMainView.TripSummary: tcAreas.SelectedIndex = 3; break;
            //    case eMainView.ReviewBooking: tcAreas.SelectedIndex = 4; break;
            //    case eMainView.BookingComplete: tcAreas.SelectedIndex = 5; break;
            //}
        }
开发者ID:felixthehat,项目名称:Limo,代码行数:27,代码来源:BookingsView.xaml.cs


示例13: ShouldReturnDatasToStringWhenToStringOnEventArgsCalled

        public void ShouldReturnDatasToStringWhenToStringOnEventArgsCalled()
        {
            string data = "Here's my data";
            DataEventArgs<string> e = new DataEventArgs<string>(data);

            Assert.AreEqual(data, e.ToString());
        }
开发者ID:riseandcode,项目名称:open-wscf-2010,代码行数:7,代码来源:DataEventArgsFixture.cs


示例14: OnDocumentOpened

		protected void OnDocumentOpened(object sender, DataEventArgs<DocumentBase> args)
		{
			if (DocumentOpened != null)
			{
				DocumentOpened(sender, args);
			}
		}
开发者ID:ssethi,项目名称:TestFrameworks,代码行数:7,代码来源:DocumentController.cs


示例15: View_AddToSelected

        //void View_UpdateFilter(object sender, DataEventArgs<IqReportColumn> e)
        //{
        //    View.Model.AllColumns.Where(f => f.ReportColumnId == e.Value.ReportColumnId).First().Options = e.Value.Options;
        //    View.Model.AllColumns = View.Model.AllColumns;
        //}



        void View_AddToSelected(object sender, DataEventArgs<IqColumn> e)
        {
            if (e.Value == null)
                return;

            try
            {
                IqReportColumn rc = new IqReportColumn { 
                    Column = e.Value,
                    Alias = e.Value.Name,
                    CreatedBy = "system",
                    CreationDate = DateTime.Now,
                    ReportTable = View.Model.CurTable                                    
                };

                service.SaveIqReportColumn(rc);
                View.Model.CurTable.ReportColumns = service.GetIqReportColumn(
                    new IqReportColumn
                    {
                        ReportTable = new IqReportTable
                        {
                            ReportTableId = View.Model.CurTable.ReportTableId
                        }
                    }).ToList();

            }
            catch (Exception ex)
            {
                Util.ShowError("Error processing record.\n" + ex.Message);
            }
        }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:39,代码来源:IqToolPresenter.cs


示例16: OnLoadData

        //Carga los datos al seleccionar un registro de la lista
        private void OnLoadData(object sender, DataEventArgs<Company> e)
        {
            if (e.Value == null)
                return;

            LoadData(e.Value);
        }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:8,代码来源:CompanyPresenter.cs


示例17: OnSupplierOpened

 public void OnSupplierOpened(object sender, DataEventArgs<DispatchSupplier> e)
 {
     if (OpenedSuppliers.SingleOrDefault(s => s.Id == e.Value.Id) == null)
     {
         OpenedSuppliers.Add(e.Value);
         OnPropertyChanged(() => HasOpenedSuppliers);
     }
 }
开发者ID:felixthehat,项目名称:Limo,代码行数:8,代码来源:DispatcherViewModel.cs


示例18: viewModel_ShowDialogWindow

            private void viewModel_ShowDialogWindow(object sender, DataEventArgs<ShowWindowEvent> e)
            {
                if (e == null)
                    throw new ArgumentNullException("e");

                bool? result = _dialogService.ShowWindow(e.Data.IWindow, this);
                e.Data.Result = result;
            }
开发者ID:judwhite,项目名称:NsqMon,代码行数:8,代码来源:WindowViewBase.cs


示例19: DataEvents_OnDeleted

        static void DataEvents_OnDeleted(object sender, DataEventArgs dataEventArgs)
        {
            // here a minor update to the cache could be done
            // (like adding info about the new element only).
            RegenerateSiteMaps();

            return;
        }
开发者ID:moljac,项目名称:HolisticWareFtCompositeC1,代码行数:8,代码来源:SiteMapsDynamic.cs


示例20: OnLoadChilds

        //Carga los datos al seleccionar un registro de la lista
        private void OnLoadChilds(object sender, DataEventArgs<ConnectionType> e)
        {
            if (e.Value == null)
                return;

            LoadChilds(e.Value);

        }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:9,代码来源:ConnectionPresenter.cs



注:本文中的DataEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataFieldCollection类代码示例发布时间:2022-05-24
下一篇:
C# DataEntryFormMode类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap