コード例 #1
0
        private void ExtractInformation(MatchEventArgs e)
        {
            if (GameEnded)
            {
                Winner = e.WinnerName;
                OnPropertyChanged(nameof(Winner));
            }
            else
            {
                Word = e.Word;
                OnPropertyChanged(nameof(Word));
            }

            foreach (dynamic info in e.Players)
            {
                Player p = new Player(false, info["UserID"], info["Username"]);
                p.Score = info["Points"];
                if (!GameEnded)
                {
                    var points = info["NewPoints"];
                    p.PointsRecentlyGained = points;
                }

                Players.Add(p);
            }

            Players = new ObservableCollection <Player>(Players.OrderByDescending(p => p.Score));
            OnPropertyChanged(nameof(Players));
        }
コード例 #2
0
ファイル: QueryProcessor.cs プロジェクト: sakpung/webstudy
        void find_MatchInstance
        (
            object sender,
            MatchEventArgs <CompositeObjectInstance> e
        )
        {
            try
            {
                InstanceData instance = new InstanceData( );

                instance.InstanceNumber    = e.Info.InstanceNumber.ToString( );
                instance.PatientID         = e.Dataset.GetValue <string> (DicomTag.PatientID, string.Empty);
                instance.SeriesInstanceUID = e.Info.SeriesInstanceUID;
                instance.SOPClassUID       = e.Info.SOPClassUID;
                instance.SOPInstanceUID    = e.Info.SOPInstanceUID;
                instance.StationName       = e.Dataset.GetValue <string> (DicomTag.StationName, string.Empty);
                instance.StudyInstanceUID  = e.Dataset.GetValue <string> (DicomTag.StudyInstanceUID, string.Empty);
                instance.TransferSyntax    = e.Dataset.GetValue <string> (DicomTag.TransferSyntaxUID, string.Empty);

                Matches.Add(instance as T);
            }
            catch (Exception exception)
            {
                System.Diagnostics.Debug.Assert(false, exception.Message);

                throw;
            }
        }
コード例 #3
0
ファイル: QueryProcessor.cs プロジェクト: sakpung/webstudy
        private void find_MatchStudy(object sender, MatchEventArgs <Study> e)
        {
            StudyData study = new StudyData( );

            study.Patient = new PatientData( );

            study.AccessionNumber = e.Info.AccessionNumber;
            study.AdmittingDiagnosesDescription = e.Info.AdmitDiagDescrp;
            study.Age                      = (e.Info.Age == null) ? null : e.Info.Age.Value.Number.ToString( ) + e.Info.Age.Value.Reference.ToString( );//TODO: this needs to be replaced with the DICOM encoding
            study.Date                     = (e.Info.Date == null) ? null : e.Info.Date.Value.ToString( );
            study.Description              = e.Info.Description;
            study.Id                       = e.Info.Id;
            study.InstanceUID              = e.Info.InstanceUID;
            study.ModalitiesInStudy        = (null != e.Info.ModalitiesInStudy) ? e.Info.ModalitiesInStudy.ToArray( ) : null;
            study.NumberOfRelatedInstances = e.Info.NumberOfRelatedInstances;
            study.NumberOfRelatedSeries    = e.Info.NumberofRelatedSeries;
            study.ReferringPhysiciansName  = e.Info.ReferringPhysiciansName.FullDicomEncoded;
            study.Size                     = (e.Info.Size == null) ? null : e.Info.Size.ToString( );
            study.Weight                   = (e.Info.Weight == null) ? null : e.Info.Weight.ToString( );
            study.Patient.ID               = e.Info.Patient.Id;
            study.Patient.Name             = e.Info.Patient.Name.FullDicomEncoded;
            study.Patient.BirthDate        = (e.Info.Patient.BirthDate == null) ? null : e.Info.Patient.BirthDate.ToString( );
            study.AdditionalPatientHistory = e.Dataset.GetValue <string> (DicomTag.AdditionalPatientHistory, string.Empty);

//study.NameOfDoctorsReading
            Matches.Add(study as T);
        }
コード例 #4
0
    // when matchmaker finds a match, start the meeting if not expecting anymore to join
    void OnMatchMakerFoundMatch(object sender, MatchEventArgs e)
    {
        Log("Matchmaker found a match.");

//		if (e.realTimeMatch.expectedPlayerCount == 0)
        StartMeeting();
    }
コード例 #5
0
 public LeaderBoard(MatchEventArgs e, bool gameEnded)
 {
     GameEnded = gameEnded;
     OnPropertyChanged(nameof(GameEnded));
     Players = new ObservableCollection <Player>();
     ExtractInformation(e);
     InitializeComponent();
 }
コード例 #6
0
 private void RaiseMatchingChangedEvent(MatchEventArgs e)
 {
     if (e.RoutedEvent == null)
     {
         e.RoutedEvent = MatchingChangedEvent;
     }
     RaiseEvent(e);
 }
コード例 #7
0
        private void SocketClientCoopWordGuessed(object source, EventArgs args)
        {
            MatchEventArgs e = (MatchEventArgs)args;

            if (GameViewModel.Mode == GameModes.Coop || GameViewModel.Mode == GameModes.Solo)
            {
                GameViewModel.TeamPoints    = e.Points;
                GameViewModel.TeamNewPoints = e.NewPoints;
                Application.Current.Dispatcher.Invoke(() => AnimatePointsGained());
            }
        }
コード例 #8
0
 private void GetMatch(object sender, MatchEventArgs args)
 {
     if (_numberOfMatches == 0)
     {
         return;
     }
     StackLayout.HeightRequest += 180;
     FrameLayout.HeightRequest += 150;
     FrameLayout.Children.Add(_model.GenereateFrame(args.LeftSide, args.RightSide));
     _numberOfMatches--;
 }
コード例 #9
0
 public ScannerEventSupport(object source)
 {
     matchEvent		= new MatchEventArgs();
     messageEvent	= new MessageEventArgs();
     tokenEvent		= new TokenEventArgs();
     traceEvent		= new TraceEventArgs();
     semPredEvent	= new SemanticPredicateEventArgs();
     synPredEvent	= new SyntacticPredicateEventArgs();
     newLineEvent	= new NewLineEventArgs();
     listeners		= new Hashtable();
     this.source		= source;
 }
コード例 #10
0
ファイル: CFindGateway.cs プロジェクト: sakpung/webstudy
        private void find_MatchStudy(object sender, MatchEventArgs <Study> e)
        {
            try
            {
                if (Cancelling)
                {
                    return;
                }

                OnMatchFound(e.Dataset);
            }
            catch (Exception)
            { }
        }
コード例 #11
0
ファイル: CFindGateway.cs プロジェクト: sakpung/webstudy
        void find_MatchInstance
        (
            object sender,
            MatchEventArgs <CompositeObjectInstance> e
        )
        {
            try
            {
                if (Cancelling)
                {
                    return;
                }

                OnMatchFound(e.Dataset);
            }
            catch (Exception)
            { }
        }
コード例 #12
0
ファイル: CFindGateway.cs プロジェクト: sakpung/webstudy
        private void find_MatchSeries
        (
            object sender,
            MatchEventArgs <Leadtools.Dicom.Scu.Series> e
        )
        {
            try
            {
                if (Cancelling)
                {
                    return;
                }

                OnMatchFound(e.Dataset);
            }
            catch (Exception)
            { }
        }
コード例 #13
0
ファイル: QueryProcessor.cs プロジェクト: sakpung/webstudy
        private void find_MatchSeries
        (
            object sender,
            MatchEventArgs <Leadtools.Dicom.Scu.Series> e
        )
        {
            SeriesData series = new SeriesData( );

            series.Patient     = new PatientData();
            series.Date        = (e.Info.Date == null) ? null : e.Info.Date.Value.ToString( );
            series.Description = e.Info.Description;
            series.InstanceUID = e.Info.InstanceUID;
            series.Modality    = e.Info.Modality;
            series.Number      = (e.Info.Number == null) ? string.Empty : e.Info.Number.ToString( );
            series.NumberOfRelatedInstances = e.Info.NumberOfRelatedInstances.ToString( );
            //series.PatientID                = e.Dataset.GetValue <string> ( DicomTag.PatientID, string.Empty ) ;
            series.Patient.ID       = e.Dataset.GetValue <string> (DicomTag.PatientID, string.Empty);
            series.StudyInstanceUID = e.Dataset.GetValue <string> (DicomTag.StudyInstanceUID, string.Empty);

            Matches.Add(series as T);
        }
コード例 #14
0
 public virtual void  parserMismatchNot(object source, MatchEventArgs e)
 {
     System.Console.Out.WriteLine(indentString + e);
 }
コード例 #15
0
 public virtual void parserMismatchNot(object source, MatchEventArgs e)
 {
     System.Console.Out.WriteLine(indentString + e);
 }
コード例 #16
0
 /// <summary>
 /// Handle the "MisMatchNot" event.
 /// </summary>
 /// <param name="source">Event source object</param>
 /// <param name="e">Event data object</param>
 public virtual void  parserMismatchNot(object source, MatchEventArgs e)
 {
 }
コード例 #17
0
 private void HandleMatch(object s, MatchEventArgs e)
 {
     _eventService.SaveEvent(e.Log1, e.Log2);
 }
コード例 #18
0
 public void OnMatchFound(MatchEventArgs matchEventArgs)
 {
     MatchFound?.Invoke(this, matchEventArgs);
 }
コード例 #19
0
		/// <summary>
		/// Handle the "MisMatchNot" event.
		/// </summary>
		/// <param name="source">Event source object</param>
		/// <param name="e">Event data object</param>
		public virtual void  parserMismatchNot(object source, MatchEventArgs e)
		{
		}
コード例 #20
0
 void ReplaceHelper_MatchingChangedEvent(object sender, MatchEventArgs e)
 {
     RaiseMatchingChangedEvent(e);
 }