public static void addDisplayFPS() { font = new CvFont(FontFace.HersheyComplexSmall, 1.0, 1.0); sw.Reset(); sw.Start(); m_updateDel += displayFPS; }
public static void ClearDelegate(ref updateDelegate delg) { System.Delegate[] delegates = delg.GetInvocationList(); foreach (System.Delegate d in delegates) { delg -= (updateDelegate)d; } }
private void UpdateCheckAUT(object sender, System.Timers.ElapsedEventArgs e) { if (updateCallBack == null) { updateCallBack = new updateDelegate(updatePicture); } this.BeginInvoke(updateCallBack); }
public ABMProgressForm(int networks) { InitializeComponent(); runnobar.Minimum = 0; runnobar.Maximum = networks; runnobar.Value = 0; abmdelegate = new updateDelegate(updateProgress); }
private void UpdateMotionState(object sender, System.Timers.ElapsedEventArgs e) { if (updateMotionCallBack == null) { updateMotionCallBack = new updateDelegate(updateMotionState); } this.BeginInvoke(updateMotionCallBack); }
public FormTestStrip(List <SessionInfo> sessionsAttrs) { InitializeComponent(); this.sessionsAttrs = sessionsAttrs; AddItem(); InitSeries(); updateCallBack = new updateDelegate(UpdateTchart); maxpos = 0; }
static WebcamController() { //카메라 지정 //0번카메라를 사용한다. m_cvCap = CvCapture.FromCamera(0); m_cvCap.FrameWidth = 320; m_cvCap.FrameHeight = 240; m_updateDel = null; updateFrame(); }
public void update(string comment) { //showComment((string)comment); if (!listBox1.Dispatcher.CheckAccess()) { //声明,并实例化回调 updateDelegate d = update; //使用回调 listBox1.Dispatcher.Invoke(d, comment); } else { showComment(comment); } }
// 其他模块 todo private void Start() { SetGridLayoutCellSize(); // 初始化背包模块 knapsackSvr = new LuaSvr(); knapsackSvr.init(null, () => { luaText = (LuaTable)knapsackSvr.start("lua/KnapsackSys"); luaUpdate = (LuaFunction)luaText["update"]; update = luaUpdate.cast <updateDelegate>(); // c#调用lua luatestFunction = (LuaFunction)luaText["Test"]; test = luatestFunction.cast <Test>(); }); }
/// --FUNCTION HADER COMMENT-- // Function Name : Worker_DoWork // Parameters : object sender, DoWorkEventArgs: default perameter // Description : this is function will run in background and used constatnly will check for the incomming messages. // Return Value : return nothing; private void Worker_DoWork(object sender, DoWorkEventArgs e) { int i = 1; while (i != 0) { Thread.Sleep(50); if (worker.CancellationPending) { e.Cancel = true; return; } String msg = readServer.ReadLine(); updateDelegate dele = new updateDelegate(displayReceive); lvRecieve.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, dele, msg); } }
public ParseThread(ParseThreadEnv tmpEnv) { timer.Elapsed += new System.Timers.ElapsedEventHandler(UpdateAscan); timer.AutoReset = true; init = tmpEnv.init; clean = tmpEnv.clean; status = tmpEnv.status; inputQueue = tmpEnv.captureOutQueue; ascanQueue = tmpEnv.ascanQueue; mergeInQueue = tmpEnv.mergeInQueue; mergeInQueueElement = new MergeInQueueElement(); ascanQueueElement = new AscanQueueElement(); boardStatusPacket = new BoardStatusSetPacket(); thread = new Thread(parseFunc); thread.IsBackground = true; updateCallBack = new updateDelegate(FormList.MDIChild.updateAscanbytimer); }
public WindowAdmin() { InitializeComponent(); updateStudents = UpdateStudentsList; updateTeachers = UpdateTeachersList; updateGroups = UpdateGroupsList; updateTeacherSubjects = UpdateTeacherSubjectsList; updateSubjectGroups = UpdateSubjectGroupsList; updateSubjects = UpdateSubjectsList; ControlAdminViewStudents.update = updateStudents; ControlAdminViewTeachers.update = updateTeachers; ControlAdminViewGroups.update = updateGroups; ControlAdminViewTeacherSubjects.update = updateTeacherSubjects; ControlAdminViewSubjectGroups.update = updateSubjectGroups; ControlAdminViewSubjects.update = updateSubjects; windowViewTeacher = ShowViewTeacherWindow; ControlAdminViewTeachers.window = windowViewTeacher; windowViewSubject = ShowViewSubjectWindow; ControlAdminViewSubjects.window = windowViewSubject; }
public WindowTeacher(User user) { try { InitializeComponent(); loggedInUser = user; labelName.Content = user.GetName(); labelSurname.Content = user.GetSurname(); List <string> groupsList = new List <string>(); groupsList = repository.GetGroupsList(); comboBoxGroup.Items.Clear(); comboBoxGroup.Items.Add("Pasirinkti"); comboBoxGroup.SelectedIndex = 0; foreach (string group in groupsList) { comboBoxGroup.Items.Add(group); } List <string> subjectsList = new List <string>(); subjectsList = repository.GetSubjectsList(repository.GetUserId(user.GetUsername())); comboBoxSubject.Items.Clear(); comboBoxSubject.Items.Add("Pasirinkti"); comboBoxSubject.SelectedIndex = 0; foreach (string subject in subjectsList) { comboBoxSubject.Items.Add(subject); } updateStudents = UpdateStudentsList; ControlTeacherViewStudents.update = updateStudents; } catch (Exception) { Close(); throw new Exception("error logging in"); } }
private void BwUpdate_DoWork(object sender, DoWorkEventArgs e) { updateDelegate updateDel = new updateDelegate(UpdateUserList); dataGrid_users.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, updateDel); }
public static void subDisplayFPS() { m_updateDel -= displayFPS; }
public void startGlobalTimer(float time, updateDelegate onEndFunction) { StartCoroutine(globalTimer(time, onEndFunction)); }
IEnumerator globalTimer(float time, updateDelegate onEndFunction) { yield return(new WaitForSeconds(time)); onEndFunction(); }
/// <summary> /// 取消function在每幀執行的delegate的註冊 /// </summary> public void UnregisterUpdateDg(updateDelegate obj) { globalUpdateDg -= obj; }