当前位置: 首页>>代码示例>>C#>>正文


C# DataEventArgs类代码示例

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


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


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