public UCGroupEntry() { this.tmode = TransMode.NewRecord; DialogResult = System.Windows.Forms.DialogResult.None; InitializeComponent(); LoadAppDomains(); }
private void SetDefaultValues() { this.ExecutionMode = ProcessMode.GuidMode; this.ServerIP = "192.168.3.169"; this.TransferMode = TransMode.HTTP; this.PortNumber = "8080"; }
public UCServiceCategory(TransMode _mode, ServiceCategoryJobView view, SdServiceCategoryDto service) { this.view = view; InsertedList = new List <SdServiceCategoryDto>(); mode = _mode; InitializeComponent(); Result = DialogResult.None; this.service = service; grpDeviceFilter.Enabled = false; grpMenuFilter.Enabled = false; if (mode == TransMode.EditRecord || mode == TransMode.ViewRecord) { if (service != null) { txtDescription.Text = service.Description; txtTitle.Text = service.Title; chkEnabled.Checked = service.Enabled > 0 ? true : false; chkHasJob.Checked = service.Hasjob > 0 ? true : false; service.Filter = view.baseDataPresenter.GetFilter(service.ServiceCatId); chkHasDevice.Checked = service.HasDevices; if (service.Filter != null && service.Filter.ObjectType != null) { grpDeviceFilter.Enabled = true; txtDeviceFilter.Text = service.Filter.ObjectType.ObjecttypeDesc; txtDeviceFilter.Tag = service.Filter.ObjectType; } } } }
private void iTransToolBar1_SaveAndNewRecord(object sender, EventArgs e) { if (mode == TransMode.EditRecord) { work.Title = txtTitle.Text; int n = 0; int.TryParse(txtTime.Text, out n); work.EstimateTime = n; presenter.Update(work); Bs.EndEdit(); } if (mode == TransMode.NewRecord) { work = new SdWorkDto(); work.Title = txtTitle.Text; int n = 0; int.TryParse(txtTime.Text, out n); work.EstimateTime = n; work.SdServiceCatId = serviceCatId; presenter.Insert(work); Bs.Add(work); } txtTime.Text = string.Empty; txtTitle.Text = string.Empty; mode = TransMode.NewRecord; work = null; }
public UCRoleEntry(int officeId, TransMode mode, BindingSource bs) { this.officeId = officeId; InitializeComponent(); this.bs = bs; this.mode = mode; }
private void Next(string sceneName, object transData, TransMode transMode) { if (IsLoading) { Debug.unityLogger.LogWarning(GetType().Name, "Loading"); return; } if (_histories.Count > 0 && _histories.Peek().SceneName == sceneName) { Reload(); return; } IsLoading = true; _histories.Push(new History() { SceneName = sceneName, TransData = transData }); var nextContext = new LoadContext(sceneName, transData, transMode); StartCoroutine(Load(nextContext, _loadContext)); _loadContext = nextContext; }
public UCRoleEntry(TransMode tmode, RoleDto role) { this.tmode = tmode; InitializeComponent(); NewRoleDto = role; LoadAppDomains(); if (tmode == TransMode.EditRecord || tmode == TransMode.ViewRecord) { NewRoleDto = role; this.txtDisplayName.Text = role.CondidateRoleName; this.txtGroupName.Text = role.RoleName; this.chkEnabled.Checked = role.IsEnabled; if (role.AppDomainId != null) { this.cmbDomain.SelectedValue = role.AppDomainId; } else { this.cmbDomain.SelectedIndex = -1; } if (tmode == TransMode.ViewRecord) { this.txtDisplayName.ReadOnly = true; this.txtGroupName.ReadOnly = true; this.chkEnabled.Enabled = false; this.cmbDomain.Enabled = false; } } }
public LoadContext(string nextScene, object transData, TransMode transMode) { NextScene = new Scene(nextScene); AdditiveScenes = new List <Scene>(); TransData = transData; TransMode = transMode; }
protected ModbusPoll modbusPoll; // implements device polling /// <summary> /// Initializes a new instance of the class. /// </summary> public DevModbusLogic(ICommContext commContext, ILineContext lineContext, DeviceConfig deviceConfig) : base(commContext, lineContext, deviceConfig) { transMode = TransMode.RTU; deviceModel = null; modbusPoll = null; }
public UCGroupEntry(TransMode tmode, SecurityGroupDto group) { this.tmode = tmode; DialogResult = System.Windows.Forms.DialogResult.None; InitializeComponent(); LoadAppDomains(); if (tmode == TransMode.EditRecord || tmode == TransMode.ViewRecord) { NewGroup = group; this.txtDisplayName.Text = group.DisplayName; this.txtGroupName.Text = group.GroupName; this.chkEnabled.Checked = group.IsEnabled; if (group.AppDomainId != null) { this.cmbDomain.SelectedValue = group.AppDomainId; } else { this.cmbDomain.SelectedIndex = -1; } if (tmode == TransMode.ViewRecord) { this.txtDisplayName.ReadOnly = true; this.txtGroupName.ReadOnly = true; this.chkEnabled.Enabled = false; this.cmbDomain.Enabled = false; } } }
public Transaction(String name) { _transKeyFields = new TransKeyFieldCollection(this, typeof(TransKeyField)); _transFields = new TransFieldCollection(this, typeof(TransField)); _transMode = TransMode.AutoAppend; _name = name; _whenDelete = true; _whenInsert = true; _whenUpdate = true; }
private void MakeEmptyForm() { txtFName.Text = string.Empty; txtLName.Text = string.Empty; txtNationalCode.Text = string.Empty; txtPersonelCode.Text = string.Empty; chkEnabled.Checked = true; chkIsReal.Checked = true; mode = TransMode.NewRecord; }
GameObject ITransitionFactory.Create(TransMode trans) { if (trans == TransMode.BlackFade) { return(_container.InstantiatePrefab(_blackFade)); } else { return(_container.InstantiatePrefab(_settings.Prefabs[(int)trans])); } }
/// <summary> /// Initializes a new instance of the class. /// </summary> public ModbusPoll(TransMode transMode, int inBufSize) { connection = ConnectionStub.Instance; log = LogStub.Instance; TransMode = transMode; InBuf = new byte[inBufSize]; Timeout = 0; TransactionID = 0; ChooseRequestMethod(); }
private void btnViewWorks_Click(object sender, EventArgs e) { TransMode mode = TransMode.ViewRecord; // if (servieDeskRow.BE_TERMINATED > 0) { mode = TransMode.ViewRecord; } UCRequestWork ucForm = new UCRequestWork(person, userRequest.SerReqId, mode); ISE.UILibrary.Utils.UIUtils.SetFrmTrans(ucForm, "فعالیت ها", FormBorderStyle.Sizable); }
public UCSubMenuEntry(TransMode mode, SecurityResourceDto resource) { this.mode = mode; this.SecurityResource = resource; InitializeComponent(); DialogResult = System.Windows.Forms.DialogResult.None; if (mode == TransMode.EditRecord || mode == TransMode.ViewRecord) { txtTitle.Text = resource.ResourceName; chkEnabled.Checked = resource.IsEnabled; } }
public UCUserRequestView(TransMode tMode, ISE.Cartable.DE.CartableDataSet.MY_CARTABLE_FOR_SERVICE_DESKRow row, UserInformation userInfo) { try { this.userInfo = userInfo; InitializeComponent(); servieDeskRow = row; this.tMode = tMode; this.userInfo = userInfo; if (tMode == TransMode.ViewRecord || tMode == TransMode.EditRecord) { var hokm = basePresenter.GetHokm(userInfo.PerId); if ((hokm.Positionlevel == 5 || hokm.Positionlevel == 4) && hokm.EmcostoIndependSrl == 22852) // is in IT and masul ya modir { btnChangePriority.Visible = true; numUpDownPriority.ReadOnly = false; numUpDownPriority.Enabled = true; } else { btnChangePriority.Visible = false; numUpDownPriority.ReadOnly = true; numUpDownPriority.Enabled = false; } txtRequester.Text = row.PERSONELNAME; if (row.IsCREATEDATENull() == false) { dtpDate.Value = row.CREATEDATE; } userRequest = requestPresenter.GetRequest(row.SER_REQ_ID); SetUI(userRequest); igridDeviceList.AllowEdit = Janus.Windows.GridEX.InheritableBoolean.False; LoadAttachment(row.SER_REQ_ID); igridAtch.AllowEdit = Janus.Windows.GridEX.InheritableBoolean.False; if (tMode == TransMode.ViewRecord) { btnMInAtc.Visible = false; btnSelectAttch.Visible = false; } } SetGrid(); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
/// <summary> /// Initializes the request ADU and calculates the response length. /// </summary> public virtual void InitReqADU(byte devAddr, TransMode transMode) { if (ReqPDU == null) { return; } int pduLen = ReqPDU.Length; switch (transMode) { case TransMode.RTU: ReqADU = new byte[pduLen + 3]; ReqADU[0] = devAddr; Buffer.BlockCopy(ReqPDU, 0, ReqADU, 1, ReqPDU.Length); ushort crc = ModbusUtils.CRC16(ReqADU, 0, pduLen + 1); ReqADU[pduLen + 1] = (byte)(crc % 256); ReqADU[pduLen + 2] = (byte)(crc / 256); RespAduLen = RespPduLen + 3; break; case TransMode.ASCII: byte[] aduBuf = new byte[pduLen + 2]; aduBuf[0] = devAddr; Buffer.BlockCopy(ReqPDU, 0, aduBuf, 1, ReqPDU.Length); aduBuf[pduLen + 1] = ModbusUtils.LRC(aduBuf, 0, pduLen + 1); StringBuilder sbADU = new StringBuilder(); foreach (byte b in aduBuf) { sbADU.Append(b.ToString("X2")); } ReqADU = Encoding.ASCII.GetBytes(sbADU.ToString()); ReqStr = ModbusUtils.Colon + sbADU; RespAduLen = RespPduLen + 2; break; default: // TransModes.TCP ReqADU = new byte[pduLen + 7]; ReqADU[0] = 0; ReqADU[1] = 0; ReqADU[2] = 0; ReqADU[3] = 0; ReqADU[4] = (byte)((pduLen + 1) / 256); ReqADU[5] = (byte)((pduLen + 1) % 256); ReqADU[6] = devAddr; Buffer.BlockCopy(ReqPDU, 0, ReqADU, 7, ReqPDU.Length); RespAduLen = RespPduLen + 7; break; } }
public UCRoleEntry(SdItRoleDto role, TransMode mode, BindingSource bs) { InitializeComponent(); this.bs = bs; this.mode = mode; this.role = role; if (mode != TransMode.NewRecord) { txtTitle.Text = role.Title; txtDescription.Text = role.Description; } }
public UCWorkEntry(int serviceCategoryId, TransMode mode, BindingSource bsource) { this.serviceCatId = serviceCategoryId; this.Bs = bsource; this.mode = mode; InitializeComponent(); if (mode == TransMode.NewRecord) { txtTitle.Text = string.Empty; txtTime.Text = string.Empty; } }
public UCWorkEntry(SdWorkDto work, TransMode mode, BindingSource bsource) { this.Bs = bsource; this.work = work; this.mode = mode; InitializeComponent(); if (mode != TransMode.NewRecord) { txtTitle.Text = work.Title; txtTime.Text = work.EstimateTime.ToString(); } }
public UCRequestWork(TransMode tMode, ISE.Cartable.DE.CartableDataSet.MY_CARTABLE_FOR_SERVICE_DESKRow row, UserInformation userInfo) { UserRequestPresenter requestPresenter = new UserRequestPresenter(); BaseDataServicePresenter baseDataPresenter = new BaseDataServicePresenter(); this.mode = tMode; request = requestPresenter.GetRequest(row.SER_REQ_ID); person = baseDataPresenter.getPersonel(request.Owneruserid ?? 0); InitializeComponent(); ISE.UILibrary.Utils.GridEXUtils.SetingGrid(this.igridProcessList, true, false); InitUi(); LoadRequests(); LoadServiceCategoryJob(); }
public UCUserEntry(UserView view) { mode = TransMode.NewRecord; this.view = view; InitializeComponent(); var result = view.LoadCompanies(); var iseIkco = result.Where(it => it.CompanyId == 1).FirstOrDefault(); if (iseIkco != null) { txtCompany.Text = iseIkco.Name; txtCompany.Tag = iseIkco; } }
public UCServiceCategory(TransMode _mode, ServiceCategoryJobView view, int parentId = -1) { this.view = view; InsertedList = new List <SdServiceCategoryDto>(); mode = _mode; InitializeComponent(); Result = DialogResult.None; if (parentId > 0) { _parentId = parentId; } grpDeviceFilter.Enabled = false; grpMenuFilter.Enabled = false; }
public UCServiceJob(ServiceJobView view, SdServiceJobDto serviceJob, TransMode mode) { InitializeComponent(); myView = view; this.serviceJob = serviceJob; this.mode = mode; if (mode == TransMode.EditRecord || mode == TransMode.ViewRecord) { txtDescription.Text = serviceJob.Description; txtTitle.Text = serviceJob.Title; chkEnabled.Checked = serviceJob.Enabled > 0; } }
public UCOperationEntry(TransMode mode, OperationDto operation) { this.mode = mode; this.OperationDto = operation; InitializeComponent(); this.DialogResult = System.Windows.Forms.DialogResult.None; if (mode == TransMode.EditRecord || mode == TransMode.ViewRecord) { txtDescription.Text = operation.Description; txtDisplayName.Text = operation.DisplayName; txtName.Text = operation.OperationName; chkIsDefault.Checked = operation.IsDefaultBool; } }
/// <summary> /// Получить метод запроса, соответствующий режиму передачи данных. /// </summary> public RequestDelegate GetRequestMethod(TransMode transMode) { switch (transMode) { case TransMode.RTU: return(RtuRequest); case TransMode.ASCII: return(AsciiRequest); default: // TransMode.TCP return(TcpRequest); } }
/// <summary> /// Выполнить действия после добавления КП на линию связи /// </summary> public override void OnAddedToCommLine() { // получение или загрузка шаблона устройства string fileName = ReqParams.CmdLine.Trim(); PrepareTemplate(fileName); // инициализация тегов КП на основе шаблона устройства floatSignals = new HashSet <int>(); int tagInd = 0; List <TagGroup> tagGroups = CreateTagGroups(deviceTemplate, ref tagInd); InitKPTags(tagGroups); // определение режима передачи данных transMode = CustomParams.GetEnumParam("TransMode", false, TransMode.RTU); if (deviceTemplate == null) { elemGroups = null; elemGroupCnt = 0; } else { // получение активных групп элементов elemGroups = deviceTemplate.GetActiveElemGroups(); elemGroupCnt = elemGroups.Count; // формирование PDU и ADU devAddr = (byte)Address; foreach (ElemGroup elemGroup in elemGroups) { elemGroup.InitReqPDU(); elemGroup.InitReqADU(devAddr, transMode); } foreach (ModbusCmd cmd in deviceTemplate.Cmds) { cmd.InitReqPDU(); cmd.InitReqADU(devAddr, transMode); } } // определение возможности отправки команд CanSendCmd = deviceTemplate != null && deviceTemplate.Cmds.Count > 0; }
public UCResourceEntry(TransMode mode, SecurityResourceDto resource) { this.SecurityResource = resource; InitializeComponent(); this.mode = mode; this.DialogResult = System.Windows.Forms.DialogResult.None; if (mode == TransMode.ViewRecord || mode == TransMode.EditRecord) { txtDisplayName.Text = resource.DisplayName; txtResourceName.Text = resource.ResourceName; txtNameSpace.Text = resource.Namespace; txtAssemblyName.Text = resource.AssemblyName; txtTooltip.Text = resource.ToolTip; txtPrecedence.Text = resource.Precedence.ToString(); chkHasParam.Checked = resource.HasParam; chkEnabled.Checked = resource.IsEnabled; } }
/// <summary> /// Выполнить действия после добавления КП на линию связи /// </summary> public override void OnAddedToCommLine() { // получение или загрузка шаблона устройства string fileName = ReqParams.CmdLine.Trim(); PrepareTemplate(fileName); // инициализация тегов КП на основе шаблона устройства floatSignals = new HashSet <int>(); int tagInd = 0; List <TagGroup> tagGroups = CreateTagGroups(deviceTemplate, ref tagInd); InitKPTags(tagGroups); // определение режима передачи данных transMode = CustomParams.GetEnumParam("TransMode", false, TransMode.RTU); // определение возможности отправки команд CanSendCmd = deviceTemplate != null && deviceTemplate.Cmds.Count > 0; }
public UCRequestWork(VwPersonelDto person, int requestId, TransMode mode) { this.mode = mode; this.requestId = requestId; request = presenter.GetRequest(requestId); this.person = person; InitializeComponent(); ISE.UILibrary.Utils.GridEXUtils.SetingGrid(this.igridProcessList, true, false); InitUi(); LoadRequests(); LoadServiceCategoryJob(); if (mode != TransMode.NewRecord) { grpCreateWork.Visible = false; } if (mode == TransMode.ViewRecord) { btnChangeRequest.Visible = false; } }