public void updateMethod(SendUpdate updateObj) { for (int i = 0; i < 100; i++) { updateObj(i); //Update everyone , ewho subscribed to me } }
public Navigator() { DB = new DBObject(); ChangeOfBuy = new ChangeOfBuy(); OpretReparation = new OpretReparation(); SendUpdate = new SendUpdate(); StartPage = new StartPage(); CurrentPage = StartPage; }
public static void GiveNewRune(string SpecialName) { gameData.GiveNewRune(SpecialName); if (DataRepository.upgradeForm != null) { sendUpdate = DataRepository.upgradeForm.UpdateRuneImgs; DataRepository.upgradeForm.Dispatcher.BeginInvoke( sendUpdate); } }
private void Btn_delete_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { SendUpdate?.Invoke(new Animation { ID = id, Host = tb_host.Text, Name = tb_animation_name.Text, Duration = chk_perma.IsChecked == true ? -1 : Convert.ToInt32(tb_duration.Text), Description = new TextRange(rtb_desc.Document.ContentStart, rtb_desc.Document.ContentEnd).Text, URL = tb_url.Text, StartDate = chk_perma.IsChecked == true ? DateTime.Now : (DateTime)dp_startdate.Value }, true); Close(); }
public JobHandle ScheduleReceive <T>(T receiver, JobHandle dep) where T : struct, INetworkPacketReceiver { var sendJob = new SendUpdate { ipcManager = IPCManager.Instance, ipcQueue = m_IPCQueue }; var job = new ReceiveJob <T> { receiver = receiver, ipcManager = IPCManager.Instance, localEndPoint = m_LocalEndPoint[0] }; dep = job.Schedule(JobHandle.CombineDependencies(dep, IPCManager.ManagerAccessHandle)); dep = sendJob.Schedule(dep); IPCManager.ManagerAccessHandle = dep; return(dep); }
static void Main(string[] args) { ReturnAnswer returnAnswer = new ReturnAnswer(); //Initialize connection bool tmp = true; Console.WriteLine("IP:"); Connection connection = new Connection(); while (tmp) { var IP = Console.ReadLine(); try { connection.init(IP, 8001, returnAnswer); tmp = false; } catch (Exception) { Console.WriteLine("Wrong IP!"); } } //Initailize commands Command create = new Create(connection, returnAnswer); Command sendupdate = new SendUpdate(connection, returnAnswer); Command reciveupdate = new ReciveUpdate(connection, returnAnswer); Command getlastimage = new GetLastImage(connection, returnAnswer); Command checktopicality = new CheckTopicality(connection, returnAnswer); Command getlastest = new GetLastest(connection, returnAnswer); Command list = new List(connection, returnAnswer); Command checkmemory = new CheckMemory(connection, returnAnswer); Command exist = new Exist(connection, returnAnswer); Command sendlogs = new SendLogs(connection, returnAnswer); Command set = new Set(connection, returnAnswer); Command checksettings = new CheckSettings(connection, returnAnswer); Command recivesettings = new ReciveSettings(connection, returnAnswer); //Make a one-way list create.SetNext(sendupdate); sendupdate.SetNext(reciveupdate); reciveupdate.SetNext(getlastimage); getlastimage.SetNext(checktopicality); checktopicality.SetNext(getlastest); getlastest.SetNext(list); list.SetNext(checkmemory); checkmemory.SetNext(exist); exist.SetNext(sendlogs); sendlogs.SetNext(set); set.SetNext(checksettings); checksettings.SetNext(recivesettings); string insert; do { connection.Connect(); insert = connection.Recive(); Console.WriteLine(insert); create.Next(insert); } while (insert != "exit"); }