当前位置: 首页>>代码示例>>C#>>正文


C# Detector类代码示例

本文整理汇总了C#中Detector的典型用法代码示例。如果您正苦于以下问题:C# Detector类的具体用法?C# Detector怎么用?C# Detector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Detector类属于命名空间,在下文中一共展示了Detector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IDDBackgroundSetup

        public IDDBackgroundSetup(Detector dt = null, BackgroundParameters bg = null)
        {
            InitializeComponent();
            if (det == null)
                det = Integ.GetCurrentAcquireDetector();
            else
                det = dt;
            if (bp == null)
                bp = Integ.GetCurrentBackgroundParams(det);
            else
                bp = bg;

            bp.modified = false;
            this.Text += " for detector " + det.Id.DetectorName;
            foreach (Control nt in this.Controls)
            {
                if (nt.GetType() == typeof(NumericTextBox))
                {
                    ((NumericTextBox)nt).NumberFormat = NumericTextBox.Formatter.F6;
                    ((NumericTextBox)nt).ToValidate = NumericTextBox.ValidateType.Float;
                    ((NumericTextBox)nt).Min = -100.0;
                    ((NumericTextBox)nt).Max = 100000.0;
                }
            }
            FieldFiller();
        }
开发者ID:hnordquist,项目名称:INCC6,代码行数:26,代码来源:IDDBackgroundSetup.cs

示例2: Insert

        public bool Insert(Detector value)
        {
            bool result = false;

            string sql = string.Format("insert into e_detector ({0}) values (:guid, :insert_user_id, :insert_time, :update_user_id, :update_time, :remark, :validity, :machine_id, :detector_type_id, :serial, minimum_a, maximum_a, minimum_b, maximum_b, null, null)", this.Asterisk(""));
            List<Parameter> parameters = new List<Parameter>();

            parameters.Add(new Parameter("guid", DatabaseHibernate.Parameter(DatabaseHibernate.GUID())));
            parameters.Add(new Parameter("insert_user_id", DatabaseHibernate.Parameter(value.InsertUserId)));
            parameters.Add(new Parameter("insert_time", DatabaseHibernate.Parameter(value.InsertTime)));
            parameters.Add(new Parameter("update_user_id", DatabaseHibernate.Parameter(value.UpdateUserId)));
            parameters.Add(new Parameter("update_time", DatabaseHibernate.Parameter(value.UpdateTime)));
            parameters.Add(new Parameter("remark", DatabaseHibernate.Parameter(value.Remark)));
            parameters.Add(new Parameter("validity", DatabaseHibernate.Parameter(value.Validity)));

            parameters.Add(new Parameter("machine_id", DatabaseHibernate.Parameter(value.MachineId)));
            parameters.Add(new Parameter("detector_type_id", DatabaseHibernate.Parameter(value.DetectorTypeId)));
            parameters.Add(new Parameter("serial", DatabaseHibernate.Parameter(value.Serial)));
            parameters.Add(new Parameter("minimum_a", DatabaseHibernate.Parameter(value.MinimumA)));
            parameters.Add(new Parameter("maximum_a", DatabaseHibernate.Parameter(value.MaximumA)));
            parameters.Add(new Parameter("minimum_b", DatabaseHibernate.Parameter(value.MinimumB)));
            parameters.Add(new Parameter("maximum_b", DatabaseHibernate.Parameter(value.MaximumB)));

            DatabaseHibernate hibernate = new DatabaseHibernate();

            result = hibernate.Write(Variable.Link, sql, parameters);

            return result;
        }
开发者ID:egretor,项目名称:EnvironmentalMonitor,代码行数:29,代码来源:DetectorHibernate.cs

示例3: LMConnectionParams

        // Constructor including initialization of comboboxen in the various panels
        public LMConnectionParams(Detector candidate, AcquireParameters acq, bool isnew)
        {
            AddingNew = isnew;
            InitializeComponent();
            oTitle = this.Text;

            // Reposition the various panels on top of each other
            this.SelectorPanel.Top = 4;
            this.SelectorPanel.Left = 6;
            this.LMMMPanel.Top = 4;
            this.LMMMPanel.Left = 6;
            this.PTR32Panel.Top = 4;
            this.PTR32Panel.Left = 6;
            this.AddDetectorTypePanel.Top = 4;
            this.AddDetectorTypePanel.Left = 6;
            this.AddDetectorTypePanel.Top = 4;
            this.AddDetectorTypePanel.Left = 6;

            RefreshDetectorCombo();
            DetectorComboBox.SelectedItem = candidate;

            RefreshDetectorTypeCombo();
            AddDetectorTypeComboBox.SelectedItem = candidate.Id.SRType;

            det = candidate;
            this.acq = acq;
            PopulateParamFields();

        }
开发者ID:tempbottle,项目名称:INCC6,代码行数:30,代码来源:LMConnectionParams.cs

示例4: MillionSquare

        public void MillionSquare()
        {
            Polygon P = new Polygon(MillionSquarePoints);
            Detector D = new Detector(P);

            Assert.AreEqual(D.Result, 3999996000001);
        }
开发者ID:micrak,项目名称:rakomeister-attic,代码行数:7,代码来源:DetectorTests.cs

示例5: decode

 public Result decode(BinaryBitmap image, Dictionary<DecodeHintType, Object> hints)
 {
     DecoderResult decoderResult;
     ResultPoint[] points;
     if (hints != null && hints.ContainsKey(DecodeHintType.PURE_BARCODE))
     {
         BitMatrix bits = extractPureBits(image.BlackMatrix);
         decoderResult = decoder.decode(bits);
         points = NO_POINTS;
     }
     else
     {
         DetectorResult detectorResult = new Detector(image.BlackMatrix).detect();
         decoderResult = decoder.decode(detectorResult.Bits);
         points = detectorResult.Points;
     }
     var result = new Result(decoderResult.Text, decoderResult.RawBytes, points, BarcodeFormat.DATAMATRIX);
     if (decoderResult.ByteSegments != null)
     {
         result.putMetadata(ResultMetadataType.BYTE_SEGMENTS, decoderResult.ByteSegments);
     }
     if (decoderResult.ECLevel != null)
     {
         result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, decoderResult.ECLevel.ToString());
     }
     return result;
 }
开发者ID:henningms,项目名称:zxing2.0-wp7,代码行数:27,代码来源:DataMatrixReader.cs

示例6: IDDShiftRegisterSetup

		public IDDShiftRegisterSetup(Detector d)
		{
			InitializeComponent();
			bauds = new int[] { 75, 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 128000, 256000 };

			for (int i = 0; i < bauds.Length; i++) {
				BaudCombo.Items.Add(bauds[i].ToString());
			}
			det = d;

			ShiftRegisterTypeComboBox.Items.Clear();

			/* JFL added */
			if (det.ListMode) 
			{
				foreach (INCCDB.Descriptor dt in NC.App.DB.DetectorTypes.GetList()) {
					InstrType dty;
					Enum.TryParse<InstrType>(dt.Name, out dty);
					if (dty.IsListMode())
						ShiftRegisterTypeComboBox.Items.Add(dty.ToString());
				}
				ShiftRegisterTypeComboBox.SelectedItem = det.Id.SRType.ToString();
			} 
			else 
			{
				foreach (INCCDB.Descriptor dt in NC.App.DB.DetectorTypes.GetINCC5SRList()) {
					ShiftRegisterTypeComboBox.Items.Add(dt.Name);
				}
				ShiftRegisterTypeComboBox.SelectedItem = InstrTypeExtensions.INCC5ComboBoxString(det.Id.SRType);
			}

			EditBtn.Visible = false;
			if (det.Id.SRType < InstrType.NPOD) {

				Refre_Click(null, null);
				SetBaudRateSelectorVisibility(det.Id.SRType.IsSRWithVariableBaudRate());
			} 
			else if (det.ListMode) 
			{
				ShiftRegisterSerialPortComboBox.Visible = false;
				ShiftRegisterSerialPortLabel.Visible = false;
				ShiftRegisterSerialPortComboBox.Visible = false;
				ShiftRegisterSerialPortLabel.Visible = false;
				ShiftRegisterSerialPortComboBoxRefresh.Visible = false;
				SetBaudRateSelectorVisibility(false);
				EditBtn.Visible = true;
				EditBtn.Enabled = true;
			}

			SetLMVSRFATypeAndVis();

			InitializeNumericBoxes();

			ShiftRegisterTypeComboBox.SelectedItem = det.Id.SRType.ToString();
			BaudCombo.SelectedIndex = BaudCombo.FindStringExact(d.Id.BaudRate.ToString());
			BaudCombo.Refresh();

			this.Text += (" for " + det.Id.DetectorName);
		}
开发者ID:tempbottle,项目名称:INCC6,代码行数:59,代码来源:IDDShiftRegisterSetup.cs

示例7: Awake

	void Awake()
	{
		if(modelMesh == null)
			modelMesh = this.gameObject;
		startHealth = health;
		sensor = this.GetComponent<Detector>();
		movType = this.gameObject.AddComponent<MovementTypes>();
	}
开发者ID:RobertLP,项目名称:PortfolioCode,代码行数:8,代码来源:smallEnemy.cs

示例8: IDDStratumId

        public IDDStratumId()
        {
            InitializeComponent();
            det = Integ.GetCurrentAcquireDetector();
            currStrata = NC.App.DB.StrataList(det);
            DeleteStratumIdBtn.Enabled = (currStrata.Count >=1);

        }
开发者ID:tempbottle,项目名称:INCC6,代码行数:8,代码来源:IDDStratumId.cs

示例9: Insert

        public bool Insert(Detector value)
        {
            bool result = false;

            DetectorHibernate hibernate = new DetectorHibernate();
            result = hibernate.Insert(value);

            return result;
        }
开发者ID:egretor,项目名称:EnvironmentalMonitor,代码行数:9,代码来源:DetectorBusiness.cs

示例10: Delete

        public bool Delete(Detector value)
        {
            bool result = false;

            DetectorHibernate hibernate = new DetectorHibernate();
            result = hibernate.Delete(value);

            return result;
        }
开发者ID:egretor,项目名称:EnvironmentalMonitor,代码行数:9,代码来源:DetectorBusiness.cs

示例11: IDDStratumIdDelete

 public IDDStratumIdDelete(Detector d)
 {
     InitializeComponent();
     det = d;
     RefreshCombo();
     if (StratumIdComboBox.Items.Count > 0)
         StratumIdComboBox.SelectedIndex = 0;
     this.Text += " for detector " + det.Id.DetectorName;
 }
开发者ID:tempbottle,项目名称:INCC6,代码行数:9,代码来源:IDDStratumIdDelete.cs

示例12: Awake

    void Awake()
    {
        character = GetComponent<CharacterController>();
        dude = gameObject.GetComponent<Dude>();
        swordzDude = gameObject.GetComponent<SwordzDude>();
        damageable = gameObject.GetComponent<Damageable>();
        detector = gameObject.GetComponentInChildren<Detector>();
        //controller = gameObject.GetComponent(typeof(DudeController)) as DudeController;

        attackers = new List<GameObject>();
    }
开发者ID:LiderW,项目名称:battle-circle-ai,代码行数:11,代码来源:SwordzPlayer.cs

示例13: IDDSetupUnattendedMeas

 public IDDSetupUnattendedMeas(Detector d)
 {
     InitializeComponent();
     det = d;
     up = new UnattendedParameters();
     up.Copy(NC.App.DB.UnattendedParameters.GetMap()[det]);
     MaxTimeTextBox.Text = up.ErrorSeconds.ToString();
     AutoImportCheckBox.Checked = up.AutoImport;
     DoublesThresholdTextBox.Text = up.AASThreshold.ToString("F4");
     this.Text += " for detector " + det.Id.DetectorName;
 }
开发者ID:tempbottle,项目名称:INCC6,代码行数:11,代码来源:IDDSetupUnattendedMeas.cs

示例14: IDDStratumIdAdd

 public IDDStratumIdAdd(Detector d)
 {
     det = d;
     InitializeComponent();
     RefreshCombo();
     if (CurrentStratumIdsComboBox.Items.Count > 0)
         CurrentStratumIdsComboBox.SelectedIndex = 0;
     else
         st = new INCCDB.StratumDescriptor();
     this.Text += " for detector " + det.Id.DetectorName;
 }
开发者ID:tempbottle,项目名称:INCC6,代码行数:11,代码来源:IDDStratumIdAdd.cs

示例15: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            User sessionUser = this.Session[Constant.SESSION_KEY_USER] as User;
            DateTime now = DateTime.Now;

            SaveJsonData saveJsonData = new SaveJsonData();

            DetectorBusiness business = new DetectorBusiness();

            const int attributeCount = 3;
            int count = this.Request.Form.Count / attributeCount;
            List<Detector> detectors = new List<Detector>();
            for (int i = 0; i < count; i++)
            {
                Detector detector = new Detector();
                detector.Guid = this.Request.Form[(i * attributeCount) + 0];
                detector.UpdateUserId = sessionUser.Guid;
                detector.UpdateTime = now;
                try
                {
                    detector.PositionX = int.Parse(this.Request.Form[(i * attributeCount) + 1]);
                }
                catch (Exception exception)
                {
                    EnvironmentalMonitor.Support.Resource.Variable.Logger.Log(exception);
                }
                try
                {
                    detector.PositionY = int.Parse(this.Request.Form[(i * attributeCount) + 2]);
                }
                catch (Exception exception)
                {
                    EnvironmentalMonitor.Support.Resource.Variable.Logger.Log(exception);
                }
                detectors.Add(detector);
            }
            saveJsonData.success = business.UpdatePosition(detectors);
            if (saveJsonData.success)
            {
                saveJsonData.msg = "布局保存成功!";
            }
            else
            {
                saveJsonData.msg = "布局保存失败";
            }

            string json = JsonConvert.SerializeObject(saveJsonData);

            this.Response.Write(json);
            this.Response.Flush();
            this.Response.End();
        }
开发者ID:egretor,项目名称:EnvironmentalMonitor,代码行数:52,代码来源:FloorPlanSaveJson.aspx.cs


注:本文中的Detector类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。