private ServiceUnionForm() { this.components = null; this.m_Control = null; this.m_Type = NetWorkType.GSM; this.m_OldName = string.Empty; this.m_OldServiceType = CommonServiceType.PSService; this.InitializeComponent(); }
public void CommitData(string oldName, CommonServiceType oldServiceType, Service service) { if ("".Equals(oldName)) { this.AddService(service); } else { this.ModService(oldName, oldServiceType, service); } }
private void DeleService(string name, CommonServiceType type) { if (type == CommonServiceType.PSService) { this.m_Model.UnionPsServiceManagement.DeleteUnionPsService(this, name); } else { this.m_Model.UnionCsServiceManagement.DeleteUnionCsService(this, name); } }
private void SwitchServiceType(CommonServiceType serviceType) { this.AddServiceToComboxItems(this.cmbGsm, this.m_Control.LookServiceInfo(NetWorkType.GSM, serviceType)); this.AddServiceToComboxItems(this.cmbLte, this.m_Control.LookServiceInfo(NetWorkType.LTE, serviceType)); this.AddServiceToComboxItems(this.cmbUmts, this.m_Control.LookServiceInfo(NetWorkType.UMTS, serviceType)); this.AddServiceToComboxItems(this.cmbTd, this.m_Control.LookServiceInfo(NetWorkType.TDSCDMA, serviceType)); this.InitCmbSingleService(this.cmbGsm, serviceType, NetWorkType.GSM); this.InitCmbSingleService(this.cmbLte, serviceType, NetWorkType.LTE); this.InitCmbSingleService(this.cmbTd, serviceType, NetWorkType.TDSCDMA); this.InitCmbSingleService(this.cmbUmts, serviceType, NetWorkType.UMTS); }
public ServiceUnionForm(TrafficCollectionModel model, Service service) : this() { this.m_Type = ProjectSingleton.CurrentProject.NetType; List<NetWorkType> netWorkTypes = ProjectSingleton.ParseNetworkType(this.m_Type); CommonServiceType serviceType = CommonServiceType.PSService; if (null == service) { this.m_Control = new ServiceUnionControl(model, FormOpenType.New, null); this.cmbType.SelectedIndex = 0; this.SetGroupEnable(this.gbCS, false); this.Text = TrafficModelResource.TRAFFICMODEL_UNIONSERVICE + " " + TrafficModelResource.TRAFFICMODEL_PROPERTY; } else { this.m_Control = new ServiceUnionControl(model, FormOpenType.Property, service); serviceType = service.CommonType; this.cmbType.Enabled = false; this.m_OldName = service.Name; this.m_OldServiceType = service.CommonType; this.Text = this.m_Control.ServiceName + " " + TrafficModelResource.TRAFFICMODEL_PROPERTY; } this.cmbType.SelectedIndex = (serviceType == CommonServiceType.PSService) ? 0 : 1; this.txbName.Text = this.m_Control.ServiceName; this.InitPSService(); this.InitCSService(); this.SwitchServiceType(serviceType); this.InitSingleEnable(netWorkTypes); this.buttonApply.Enabled = false; }
private void InitCmbSingleService(ComboBox cmb, CommonServiceType serviceType, NetWorkType netType) { Service service = null; if (serviceType == CommonServiceType.PSService) { (this.m_Control.PSService as UnionPsService).PSServiceDic.TryGetValue(netType, out service); } else { (this.m_Control.CSService as UnionCsService).CSServiceDic.TryGetValue(netType, out service); } if (null != service) { cmb.Text = service.Name; } }
private bool AppyData() { Service service = null; string info = string.Empty; service = this.GenServiceFromForm(service); if (!this.m_Control.CheckService(service, this.m_OldName, ref info)) { MessageBoxUtil.ShowInfo(info); return false; } if (!this.IsAnySelectLeastTwoSingleService()) { MessageBoxUtil.ShowInfo(TrafficMapResource.Trffic_TwoService_Least); return false; } this.m_Control.CommitData(this.m_OldName, this.m_OldServiceType, service); this.buttonApply.Enabled = false; this.m_OldName = service.Name; this.m_OldServiceType = service.CommonType; this.cmbType.Enabled = false; return true; }
private void ModService(string oldName, CommonServiceType oldServiceType, Service service) { if (service.CommonType != oldServiceType) { this.DeleService(oldName, oldServiceType); this.AddService(service); } else if (service.CommonType == CommonServiceType.CSService) { UnionCsService modService = service as UnionCsService; modService.ID = this.m_Model.UnionCsServiceManagement.FindUnionCsServiceByName(oldName).ID; this.m_Model.UnionCsServiceManagement.ModifyUnionCsService(this, modService); } else { UnionPsService service3 = service as UnionPsService; service3.ID = this.m_Model.UnionPsServiceManagement.FindUnionPsServiceByName(oldName).ID; this.m_Model.UnionPsServiceManagement.ModifyUnionPsService(this, service3); } }
public Service LookUpService(string serviceName, CommonServiceType serviceType) { if (serviceType == CommonServiceType.CSService) { return this.m_Model.UnionCsServiceManagement.FindUnionCsServiceByName(serviceName); } return this.m_Model.UnionPsServiceManagement.FindUnionPsServiceByName(serviceName); }
public string LookServiceInfo(NetWorkType netType, CommonServiceType serviceType) { string str = string.Empty; if (serviceType == CommonServiceType.CSService) { return this.LookCSServiceInfo(netType, str); } return this.LookPsServiceInfo(netType, str); }
private void InitServiceProperty(Service service) { if (service.CommonType == CommonServiceType.PSService) { m_UnionPsService = service as UnionPsService; m_UnionPsService.Technology = NetWorkType.TDSCDMA; m_TDService = m_UnionPsService.PSServiceDic[NetWorkType.TDSCDMA] as TDService; } else { m_CommonServiceType = CommonServiceType.CSService; m_UnionCsService = service as UnionCsService; m_UnionCsService.Technology = NetWorkType.TDSCDMA; m_TDService = m_UnionCsService.CSServiceDic[NetWorkType.TDSCDMA] as TDService; } }
private void InitServiceProperty(Service service) { if (service.CommonType == CommonServiceType.PSService) { this.m_UnionPsService = service as UnionPsService; this.m_GsmService = this.m_UnionPsService.PSServiceDic[NetWorkType.GSM] as GSMService; } else { this.m_CommonServiceType = CommonServiceType.CSService; this.m_UnionCsService = service as UnionCsService; this.m_GsmService = this.m_UnionCsService.CSServiceDic[NetWorkType.GSM] as GSMService; this.m_GsmService.Name = this.m_UnionCsService.Name; } }