public void MouseDown() { StatEvent += ConsoleHi; StatEvent.Invoke(); StatEvent -= ConsoleHi; StatEvent.Invoke(); }
/// <summary> /// Flip-Flat controller constructor /// </summary> public AlnitakController() { InitializeComponent(); //create new instance of FlipFlatLib FF = new FlipFlatLib(); currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler); onStatEvent += new StatEvent(setStatEvent); }
private void OnLoad(StreamingContext context) { onSet = new StatEvent(); onMinReached = new StatEvent(); onMaxReached = new StatEvent(); onMinSet = new StatEvent(); onMaxSet = new StatEvent(); }
protected override void OnLoad(StreamingContext context) { base.OnLoad(context); onMinReached = new StatEvent(); onMaxReached = new StatEvent(); onMinSet = new StatEvent(); onMaxSet = new StatEvent(); }
public S2C_IncrementPlayerStat(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.PlayerNetID = reader.ReadNetID(); this.StatEvent = reader.ReadStatEvent(); this.ExtraBytes = reader.ReadLeft(); }
public void Load(Project project, StatEvent evt) { if (evt is LineupEvent) { LoadLineup(project, evt as LineupEvent); } else { LoadSubstitution(project, evt as SubstitutionEvent); } }
public void OnGenerated(DataModel model, string input, StatEvent statEvent) { var dm = Parse(model); string dmString = JObject.FromObject(dm).ToString(Newtonsoft.Json.Formatting.None); int hash = StringHash(dmString); var statistic = dbContext.Statistics.SingleOrDefault(s => s.Hash == hash); if (statistic != null) { statistic.Updated = DateTime.Now; switch (statEvent) { case StatEvent.Download: statistic.DownloadedCount += 1; break; case StatEvent.Generate: statistic.GeneratedCount += 1; break; } if (input.Length > statistic.Example.Length) { statistic.Example = input; } dbContext.SaveChanges(); return; } dbContext.Statistics.Add(new Statistic { Created = DateTime.Now, Updated = DateTime.Now, DataModel = dmString, Hash = hash, Example = input, Diff = Diff(dm, Sample), Complexity = Complexity(dm), GeneratedCount = statEvent == StatEvent.Generate ? 1 : 0, DownloadedCount = statEvent == StatEvent.Download ? 1 : 0 }); dbContext.SaveChanges(); }
private void setStatEvent(object sender, StatEventArgs e) { if (statusLabel.InvokeRequired) { StatEvent s = new StatEvent(setStatEvent); this.Invoke(s, new object[] { sender, e }); } else this.statusLabel.Text = e.StatLabel; if (Form.ActiveForm != null) Form.ActiveForm.Refresh(); }
public static void WriteStatEvent(this PacketWriter writer, StatEvent data) { writer.WriteByte((byte)data); }
public StatEventArgs(StatEvent statEvent) { this.EventData = statEvent; }
protected virtual void OnLoad(StreamingContext context) { onSet = new StatEvent(); }