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;
     }
 }
Esempio n. 3
0
 private void UpdateCheckAUT(object sender, System.Timers.ElapsedEventArgs e)
 {
     if (updateCallBack == null)
     {
         updateCallBack = new updateDelegate(updatePicture);
     }
     this.BeginInvoke(updateCallBack);
 }
Esempio n. 4
0
 public ABMProgressForm(int networks)
 {
     InitializeComponent();
     runnobar.Minimum = 0;
     runnobar.Maximum = networks;
     runnobar.Value   = 0;
     abmdelegate      = new updateDelegate(updateProgress);
 }
Esempio n. 5
0
 private void UpdateMotionState(object sender, System.Timers.ElapsedEventArgs e)
 {
     if (updateMotionCallBack == null)
     {
         updateMotionCallBack = new updateDelegate(updateMotionState);
     }
     this.BeginInvoke(updateMotionCallBack);
 }
Esempio n. 6
0
 public ABMProgressForm(int networks)
 {
     InitializeComponent();
     runnobar.Minimum = 0;
     runnobar.Maximum = networks;
     runnobar.Value = 0;
     abmdelegate = new updateDelegate(updateProgress);
 }
Esempio n. 7
0
 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();
        }
Esempio n. 9
0
 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>();
        });
    }
Esempio n. 11
0
        /// --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);
            }
        }
Esempio n. 12
0
        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);
        }
Esempio n. 13
0
        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;
        }
Esempio n. 14
0
        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");
            }
        }
Esempio n. 15
0
        private void BwUpdate_DoWork(object sender, DoWorkEventArgs e)
        {
            updateDelegate updateDel = new updateDelegate(UpdateUserList);

            dataGrid_users.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, updateDel);
        }
Esempio n. 16
0
 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;
 }