示例#1
0
        public formFilter(oFunctionList functionList, oTabManager tabManager, oTabFunctionList tab, FILTER_TYPE filterType, oVisPlayBar playBar)
        {
            InitializeComponent();
            this.tabManager = tabManager;
            this.tab = tab;
            this.functionGrid.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.functionGrid_CellValueNeeded);
            this.functionList = functionList;
            this.functionListOutput = functionList.Clone();
            updatePredictedOutput();
            timerRefreshOutput.Enabled = false;
            this.playBar = playBar;

            // Make changes to the interface as determined by the filterType
            this.filterType = filterType;
            switch(filterType)
            {
                case FILTER_TYPE.FUNCTION_LIST_FILTERED:
                    // Do nothing special
                    break;
                case FILTER_TYPE.FUNCTION_LIST_FULL:
                    // We cannot replace this list
                    this.buttonApplyReplace.Visible = false;
                    break;
                case FILTER_TYPE.GENERAL:
                    // We do not want to change any tabs, just provide functionListOutput as the result
                    buttonApplyReplace.Visible = false;
                    buttonApplyNew.Text = "Apply";

                    // We cannot clip data to selection
                    this.radioTimeRangeClip.Enabled = false;

                    break;
            }
        }
示例#2
0
 private void radioButtonFilterNone2D_CheckedChanged(object sender, EventArgs e)
 {
     if (radioButtonFilterNone2D.Checked)
     {
         m_filter2D = FILTER_TYPE.NONE;
     }
     else if (radioButtonFilterCutLarge2D.Checked)
     {
         m_filter2D = FILTER_TYPE.CUT_LARGE;
     }
     else if (radioButtonFilterCutMedium2D.Checked)
     {
         m_filter2D = FILTER_TYPE.CUT_MEDIUM;
     }
     else if (radioButtonFilterCutShort2D.Checked)
     {
         m_filter2D = FILTER_TYPE.CUT_SHORT;
     }
     else if (radioButtonFilterExp2D.Checked)
     {
         m_filter2D = FILTER_TYPE.EXP;
     }
     else if (radioButtonFilterGaussian2D.Checked)
     {
         m_filter2D = FILTER_TYPE.GAUSSIAN;
     }
     else if (radioButtonFilterInverse2D.Checked)
     {
         m_filter2D = FILTER_TYPE.INVERSE;
     }
 }
示例#3
0
        protected List <Target> iterTargets = new List <Target>(); // Loop cache


        #region CHANGED AWAKE TO MIMIC OLD VERSION OF THIS COMPONENT
        protected void Awake()
        {
            Debug.LogWarning(string.Format(
                                 "WaitForAlignementModifier on GameObject {0} has been deprecated. Replace the " +
                                 "component with AngleLimitModifier (with the filterType set to 'Wait to Fire " +
                                 "Event'). You can do this without losing your other settings by switching the " +
                                 "Inspector tab to 'Debug' and changing the script field.",
                                 this.name
                                 ));

            this.fireCtrl = this.GetComponent <EventFireController>();

            // Force because this old component could only do this
            this.filterType = FILTER_TYPE.WaitToFireEvent;
        }
示例#4
0
        protected List <Target> iterTargets = new List <Target>(); // Loop cache

        protected void Awake()
        {
            this.fireCtrl = this.GetComponent <EventFireController>();

            // If a fireController was found it is cheaper to use its cached reference to get the
            //	 TargetTracker
            if (this.fireCtrl != null)
            {
                this.tracker = this.fireCtrl.targetTracker;
            }
            else
            {
                this.tracker = this.GetComponent <TargetTracker>();
            }

            // Just in case
            if (this.fireCtrl == null && this.tracker == null)
            {
                throw new MissingComponentException
                      (
                          "Must have at least a TargetTracker or EventFireController"
                      );
            }

            // If only 1 is set, force the filterType
            if (this.fireCtrl == null || this.tracker == null)
            {
                if (this.fireCtrl != null)
                {
                    this.filterType = FILTER_TYPE.WaitToFireEvent;
                }
                else
                {
                    this.filterType = FILTER_TYPE.IgnoreTargetTracking;
                }
            }
        }
示例#5
0
        public formFilter(oFunctionList functionList, oTabManager tabManager, oTabFunctionList tab, FILTER_TYPE filterType, oVisPlayBar playBar)
        {
            InitializeComponent();
            this.tabManager = tabManager;
            this.tab        = tab;
            this.functionGrid.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.functionGrid_CellValueNeeded);
            this.functionList       = functionList;
            this.functionListOutput = functionList.Clone();
            updatePredictedOutput();
            timerRefreshOutput.Enabled = false;
            this.playBar = playBar;

            // Make changes to the interface as determined by the filterType
            this.filterType = filterType;
            switch (filterType)
            {
            case FILTER_TYPE.FUNCTION_LIST_FILTERED:
                // Do nothing special
                break;

            case FILTER_TYPE.FUNCTION_LIST_FULL:
                // We cannot replace this list
                this.buttonApplyReplace.Visible = false;
                break;

            case FILTER_TYPE.GENERAL:
                // We do not want to change any tabs, just provide functionListOutput as the result
                buttonApplyReplace.Visible = false;
                buttonApplyNew.Text        = "Apply";

                // We cannot clip data to selection
                this.radioTimeRangeClip.Enabled = false;

                break;
            }
        }
示例#6
0
        public DataTable GetGuests(FILTER_TYPE typeFilter, String searchWord)
        {
            StringBuilder sbSql = new StringBuilder();
            sbSql.Append("SELECT t.*, c.time_checkin ");
            sbSql.Append("FROM t_guest t ");
            sbSql.Append("LEFT OUTER JOIN ");
            sbSql.Append("( ");
            sbSql.Append("  SELECT ");
            sbSql.Append("    MIN(logtime) AS time_checkin, ");
            sbSql.Append("    guest_id ");
            sbSql.Append("  FROM t_log ");
            sbSql.Append("  WHERE log_type = @logType ");
            sbSql.Append("  GROUP BY guest_id ");
            sbSql.Append(") c ON c.guest_id = t.guest_id ");
            sbSql.Append("WHERE  ");

            if (typeFilter == FILTER_TYPE.FILTER_ALL)
                sbSql.Append(" 0=0 AND ( ");
            else if (typeFilter == FILTER_TYPE.FILTER_NOT_CHECKED_IN)
                sbSql.Append("  c.time_checkin IS NULL AND ( ");
            else
                sbSql.Append("  c.time_checkin IS NOT NULL AND ( ");

            if (searchWord != null && searchWord.Length > 0)
            {
                sbSql.Append("  t.guest_id LIKE @searchWord OR ");
                sbSql.Append("  t.name LIKE @searchWord OR ");
                sbSql.Append("  t.company LIKE @searchWord OR ");
                sbSql.Append("  t.email LIKE @searchWord OR ");
                sbSql.Append("  t.department LIKE @searchWord OR ");
                sbSql.Append("  t.phone LIKE @searchWord OR ");
                sbSql.Append("  t.weibo LIKE @searchWord); ");
            }
            else
            {
                sbSql.Append(" 1=1 ); ");

            }

            SqlParameter[] parms = new SqlParameter[2];

            parms[0] = new SqlParameter("logType", SqlDbType.SmallInt);
            parms[0].Value = (int)LOG_TYPE.CHECK_IN;
            parms[1] = new SqlParameter("searchWord", SqlDbType.NVarChar);
            parms[1].Value = "%" + searchWord + "%";

            DataTable result = SqlHelper.ExecuteDataTable(getSqlConnStr(), CommandType.Text, sbSql.ToString(), parms);

            return result;
            //return null;
        }
示例#7
0
 public static void SwitchFilter(this FilterController controller, FILTER_TYPE type, int index)
 {
     controller.InvokeMethod("OnClickBtn", controller.GetField <ButtonArray[]>("BtnArray")[(int)type][index].gameObject);
 }
		protected List<Target> iterTargets = new List<Target>();  // Loop cache
		
        protected void Awake()
        {
            this.fireCtrl = this.GetComponent<EventFireController>();

			// If a fireController was found it is cheaper to use its cached reference to get the 
			//	 TargetTracker
			if (this.fireCtrl != null)
				this.tracker = this.fireCtrl.targetTracker;
			else
				this.tracker = this.GetComponent<TargetTracker>();
			
			// Just in case
			if (this.fireCtrl == null && this.tracker == null)
			{
				throw new MissingComponentException
				(
					"Must have at least a TargetTracker or EventFireController"
				);			
			}
			
			// If only 1 is set, force the filterType
			if (this.fireCtrl == null || this.tracker == null)
			{
				if (this.fireCtrl != null)
					this.filterType = FILTER_TYPE.WaitToFireEvent;
				else
					this.filterType = FILTER_TYPE.IgnoreTargetTracking;
			}
			
        }
		protected List<Target> iterTargets = new List<Target>();  // Loop cache
		

		#region CHANGED AWAKE TO MIMIC OLD VERSION OF THIS COMPONENT
        protected void Awake()
        {
			Debug.LogWarning(string.Format(
				"WaitForAlignementModifier on GameObject {0} has been deprecated. Replace the " +
				"component with AngleLimitModifier (with the filterType set to 'Wait to Fire " +
				"Event'). You can do this without losing your other settings by switching the " +
				"Inspector tab to 'Debug' and changing the script field.",
				this.name
			));
			
            this.fireCtrl = this.GetComponent<EventFireController>();

			// Force because this old component could only do this
			this.filterType = FILTER_TYPE.WaitToFireEvent;
			
        }
示例#10
0
 /// <summary>
 /// 过滤器心跳回调
 /// </summary>
 /// <param name="tick">秒数</param>
 /// <param name="id">过滤器标识</param>
 /// <param name="var0">自定义变量</param>
 /// <param name="var5">自定义变量</param>
 /// var0..5 为自定义变量,在添加过滤器时传入
 protected void OnFilterHeartbeat(int tick, FILTER_TYPE id, ref int var0, ref int var1, ref int var2, ref int var3, ref int var4, ref int var5)
 {
 }
示例#11
0
 /// <summary>
 /// 过滤器删除回调
 /// </summary>
 /// <param name="id">过滤器标识</param>
 /// <param name="var0">自定义变量</param>
 /// <param name="var5">自定义变量</param>
 /// var0..5 为自定义变量,在添加过滤器时传入
 protected void OnFilterDetach(FILTER_TYPE id, ref int var0, ref int var1, ref int var2, ref int var3, ref int var4, ref int var5)
 {
 }