Beispiel #1
0
        private void updateListViewCounts(ref ModuleCountPair mcp)
        {
            bool         isExist = false;
            ListViewItem lastItem;

            if (0 < lvwCounts.Items.Count)
            {
                lastItem = lvwCounts.Items[lvwCounts.Items.Count - 1];

                if (lastItem.SubItems[0].Text == mcp.getModuleName())
                {
                    lastItem.SubItems[1].Text = mcp.getKeyCount().ToString();
                    lastItem.SubItems[2].Text = mcp.getStartTime();
                    lastItem.SubItems[3].Text = mcp.getLastTime();
                    lastItem.SubItems[4].Text = mcp.getMouseDownCount().ToString();
                    lastItem.SubItems[5].Text = mcp.getMouseWheelCount().ToString();
                    lastItem.SubItems[6].Text = mcp.getPath();

                    isExist = true;
                }
            }

            if (isExist == false)
            {
                string[] ary = { mcp.getModuleName(), mcp.getKeyCount().ToString(),       mcp.getStartTime(),
                                 mcp.getLastTime(),   mcp.getMouseDownCount().ToString(), mcp.getMouseWheelCount().ToString(),
                                 mcp.getPath() };
                lvwCounts.Items.Add(new ListViewItem(ary));
            }
        }
Beispiel #2
0
        private void KeyMouseDown(ActionType a)
        {
            ModuleInfo mi = ut.getActiveWindowModuleName();

            if (mcp == null)
            {
                mcp = new ModuleCountPair(mi.moduleName, mi.fullPath);
            }
            else if (mcp.getModuleName() == mi.moduleName && mcp.getPath() == mi.fullPath)
            {
                mcp.inc(mi.moduleName, a);
            }
            else
            {
                mcp = new ModuleCountPair(mi.moduleName, mi.fullPath);
            }

            updateListViewCounts(ref mcp);
        }
Beispiel #3
0
        private void updateListViewCounts(ref ModuleCountPair mcp)
        {
            bool isExist = false;
            ListViewItem lastItem;

            if (0 < lvwCounts.Items.Count)
            {
                lastItem = lvwCounts.Items[lvwCounts.Items.Count - 1];

                if (lastItem.SubItems[0].Text == mcp.getModuleName())
                {
                    lastItem.SubItems[1].Text = mcp.getKeyCount().ToString();
                    lastItem.SubItems[2].Text = mcp.getStartTime();
                    lastItem.SubItems[3].Text = mcp.getLastTime();
                    lastItem.SubItems[4].Text = mcp.getMouseDownCount().ToString();
                    lastItem.SubItems[5].Text = mcp.getMouseWheelCount().ToString();
                    lastItem.SubItems[6].Text = mcp.getPath();

                    isExist = true;
                }
            }

            if (isExist == false)
            {
                string[] ary = { mcp.getModuleName(), mcp.getKeyCount().ToString(),mcp.getStartTime(),
                                 mcp.getLastTime(), mcp.getMouseDownCount().ToString(), mcp.getMouseWheelCount().ToString(),
                                 mcp.getPath() };
                lvwCounts.Items.Add(new ListViewItem(ary));
            }
        }
Beispiel #4
0
        private void KeyMouseDown(ActionType a)
        {
            ModuleInfo mi = ut.getActiveWindowModuleName();

            if (mcp == null)
            {
                mcp = new ModuleCountPair(mi.moduleName, mi.fullPath);
            }
            else if (mcp.getModuleName() == mi.moduleName && mcp.getPath() == mi.fullPath)
            {
                mcp.inc(mi.moduleName, a);
            }
            else
            {
                mcp = new ModuleCountPair(mi.moduleName, mi.fullPath);
            }

            updateListViewCounts(ref mcp);
        }