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


C# Event.ToString方法代码示例

本文整理汇总了C#中Event.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Event.ToString方法的具体用法?C# Event.ToString怎么用?C# Event.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Event的用法示例。


在下文中一共展示了Event.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddMessageForEvent

 public static void AddMessageForEvent(Event eventToPrint, StringBuilder output)
 {
     if (eventToPrint != null)
     {
         output.Append(eventToPrint.ToString() + Environment.NewLine);
     }
 }
开发者ID:vasilkrvasilev,项目名称:QualityCode,代码行数:7,代码来源:Message.cs

示例2: PrintEvent

 public static void PrintEvent(Event eventToPrint)
 {
     if (eventToPrint != null)
     {
         EventEngine.AddOutput(eventToPrint.ToString());
     }
 }
开发者ID:RamiAmaire,项目名称:TelerikAcademy,代码行数:7,代码来源:Messages.cs

示例3: AddEvent

 public void AddEvent(Event evt)
 {
     evt.Added();
     evts.Add(evt);
     mailService.SendMail("[email protected]", "Event Notification", evt.ToString());
     display.ShowEvent(evt);
 }
开发者ID:joel-costigliola,项目名称:meetupswc,代码行数:7,代码来源:Scheduler.cs

示例4: EventToString

        public void EventToString()
        {
            Event<long> e = new Event<long>();
            e.Time = new Time(2000, 1, 2);
            e.Value = 172;

            string datetString = new DateTime(2000, 1, 2).ToString();
            e.ToString().Should().Be(datetString + "\t172");
            Console.WriteLine(e);
        }
开发者ID:ShaneCastle,项目名称:TeaFiles.Net,代码行数:10,代码来源:EventTest.cs

示例5: onEvent

        private void onEvent(Event scenarioEvent, string tag)
        {
            Console.WriteLine(scenarioEvent.ToString() + ':' + tag);
            if (tag == null) tag = "";

            foreach (ScenarioTrigger trigger in Triggers)
            {
                if (trigger.Trigger != scenarioEvent.ToString()) continue;
                if (tag != trigger.Tag) continue;

                if (Events.ContainsKey(trigger.Event_id))
                {
                    Events[trigger.Event_id].Execute(this);
                    return;
                }
            }
        }
开发者ID:ndssia,项目名称:Project-Corsair,代码行数:17,代码来源:Scenario.cs

示例6: notifyEvent

    public void notifyEvent(Event ev, object data)
    {
        switch (ev)
        {

        case Event.CHANGE_IN_TASK_PRIORITY :
            Task.TaskPriorityChange tpc = (Task.TaskPriorityChange) data;
            removeTask( tpc.task);
            addTask((int) tpc.newTaskPriority, tpc.task);
            break;

        case Event.TASK_COMPLETED :
            Task task = data as Task;
            Debug.Log("Task " + task.taskName + " is complete, removing");
            removeTask(task);
            break;

        default :
            Debug.LogWarning("Undefined event sent to TaskManager " + ev.ToString());
            break;

        }
    }
开发者ID:SymphonyX,项目名称:VAST,代码行数:23,代码来源:TaskManager.cs

示例7: EventList

        public void EventList()
        {
            var ev = new Event();
            Assert.Null(ev.Account);
            Assert.Null(ev.Created);
            Assert.Null(ev.RelatedObject);
            Assert.Null(ev.RelatedObjectPreviousState);
            Assert.Null(ev.TestMode);
            Assert.Null(ev.Type);

            // Generate 3 events for some invoice - created, changed, deleted
            var inv = Invoice.Create(new Invoice
            {
                Amount = 13,
                Currency = "RUB"
            });
            inv.Amount = 14;
            inv.Save();
            inv.Delete();

            var events = Event.List(new Dictionary<string, object>
            {
                {"invoice", inv.Id},
                {"type", "invoice.deleted"},
            });
            Assert.AreEqual(1, events.Count);

            ev = Event.Get(events[0].Id);
            Assert.AreEqual(events[0].ToString(), ev.ToString());
            Assert.AreEqual(inv.Account, ev.Account);
            Assert.AreEqual(inv.TestMode, ev.TestMode);
            Assert.AreEqual("invoice.deleted", ev.Type);
            Assert.True(ev.RelatedObject is Invoice);
            var evInv = (Invoice) ev.RelatedObject;
            Assert.AreEqual(evInv.Amount, inv.Amount);
            Assert.True(evInv.Deleted);
        }
开发者ID:unipag,项目名称:unipag-net,代码行数:37,代码来源:EventTests.cs

示例8: Write

 /// <summary>
 /// Implementación de la escritura del log del evento
 /// en el visor de sucesos de Windows.
 /// </summary>
 /// <param name="pEvent">Evento a loguear.</param>
 public override void Write(Event pEvent)
 {
     if (string.IsNullOrEmpty(pEvent.Source))
         pEvent.Source = "Fwk.Logging.Targets";
     EventLog.WriteEntry(pEvent.Source, pEvent.ToString(), GetWindowsEventType(pEvent.LogType));
 }
开发者ID:Pelsoft,项目名称:fwk_10.3,代码行数:11,代码来源:WindowsEventTarget.cs

示例9: Emit

 public void Emit(Event ev)
 {
     this.TraceData(TraceEventType.Verbose, () =>
     {
         return new object[] { String.Concat("EventEmitterBase.ParallelEmitter - Queuing for ", _sendToEP, ": ", ev.ToString(true)) };
     });
     _dataQueue.Enqueue(LwesSerializer.SerializeToMemoryBuffer(ev));
     EnsureSenderIsActive();
 }
开发者ID:lwes,项目名称:lwes-dotnet,代码行数:9,代码来源:EventEmitterBase.cs

示例10: recordEvent

 // If recording is allowed, record an event from the data given
 private void recordEvent(Event eventType, string dataXML)
 {
     if (_bAllowRecording)
     {
         Console.WriteLine("Recording an event of type '" + eventType.ToString() + "'");
         try
         {
             wrapper.RecordEvent((int)eventType, _PlayerID, dataXML);
         }
         catch (Exception ex)
         {
             Console.WriteLine("Event recording failed! '" + ex.Message + "'");
             DisableRecording();
         }
     }
 }
开发者ID:darrentorpey,项目名称:game_of_nom,代码行数:17,代码来源:EventRecorder.cs

示例11: onPadEvent

 public override bool onPadEvent(Event.PadEvent pe)
 {
     System.Windows.MessageBox.Show(pe.ToString());
     return true;
 }
开发者ID:rokuan,项目名称:ivy,代码行数:5,代码来源:TestActivity.cs

示例12: Write

 /// <summary>
 /// Implementación de la escritura del log del evento
 /// en archivo .log.
 /// </summary>
 /// <param name="pEvent">Evento a loguear.</param>
 public override void Write(Event pEvent)
 {
     CheckOpenStreamWriter();
     Fwk.HelperFunctions.FileFunctions.SaveTextFile(this.FileName, pEvent.ToString(), true);
 }
开发者ID:Pelsoft,项目名称:fwk_10.3,代码行数:10,代码来源:FileTarget.cs

示例13: onTouchEvent

 public override bool onTouchEvent(Event.TouchEvent te)
 {
     System.Windows.MessageBox.Show(te.ToString());
     return true;
 }
开发者ID:rokuan,项目名称:ivy,代码行数:5,代码来源:TestActivity.cs

示例14: Log

 void Log(Event evt)
 {
     Send(new ToClient
     {
         action = 2,
         log = evt
     }, 0);
     event_log.Add(evt);
     WriteHistory(evt.ToString());
 }
开发者ID:nzinov,项目名称:fizteh-seabattle,代码行数:10,代码来源:Game.cs

示例15: onAcceleratorEvent

 public override bool onAcceleratorEvent(Event.AccelerometerEvent ae)
 {
     System.Windows.MessageBox.Show(ae.ToString());
     return true;
 }
开发者ID:rokuan,项目名称:ivy,代码行数:5,代码来源:TestActivity.cs


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