/// <summary> /// Deze methode geeft een lijst van opmerkingen door naar de web service. /// De web service gebruikt deze gegevens om een .CSV-bestand te maken /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void BtnOpslaan_Click(object sender, RoutedEventArgs e) { btnSynchroniseren.IsEnabled = false; prSynchroniseren.IsActive = true; lblBoodschap.Text = "Even geduld. Gegevens worden op dit moment verstuurd..."; lblBoodschap.Visibility = Windows.UI.Xaml.Visibility.Visible; if (!swtManierOpslag.IsOn) { try { await CopyFiles.copyPhotosToUSB(); await CopyFiles.copyVideosToUSB(); if (await LocalDB.database.SynchroniseerNaarUSB()) { lblBoodschap.Text = "De gegevens zijn met succes verstuurd naar de USB!"; } else { lblBoodschap.Text = "Er is iets fout gelopen. Controleer of u een opslagmedium ingestoken heeft..."; } } catch(Exception) { lblBoodschap.Text = "Er is iets fout gelopen. Controleer of u een opslagmedium ingestoken heeft..."; } } else { await CopyFiles.copyPhotosViaNetwork(); await CopyFiles.copyVideosViaNetwork(); List<String> lijstGegevens = new List<String>(); List<Comment> opmerkingen = await OverzichtOpmerkingen.GetOverzichtComments(); List<string> lijstStringGegevens = new List<string>(); foreach (Comment opmerking in opmerkingen) { lijstStringGegevens.Add("Chauffeur: " + opmerking.Chauffeur + ", OpmperkingID: " + opmerking.Id.ToString() + ", Aangemaakt op: " + opmerking.Datum.ToString("dd/MM/yyyy HH:mm") + ", Objectcode: " + opmerking.ObjectCode + ", Defectcode: " + opmerking.DefectCode + ", Omschrijving: " + opmerking.Omschrijving); } ArrayOfString aosGegevens = new ArrayOfString(); //Een ArrayOfString is nodig voor de web service aosGegevens.AddRange(lijstStringGegevens); var avAuto = await LocalDB.database.GetToegewezenAuto(); string datum = String.Format("Wagen {0} - {1}-{2}-{3} {4}h{5}m", avAuto.Number, DateTime.Now.Day, DateTime.Now.Month, DateTime.Now.Year, DateTime.Now.Hour, DateTime.Now.Minute); string bestandsNaam = String.Format("{0} opmerkingen.csv", datum); //await CopyFiles.copyVideosViaNetwork(); lblBoodschap.Text = "Videos uploaden"; if (await LocalDB.database.SetMaakSVCvoorWebSync(aosGegevens, bestandsNaam)) { lblBoodschap.Text = "De gegevens zijn met succes verstuurd naar de server!"; } else { lblBoodschap.Text = "Er is iets fout gelopen. Controleer of u met het juiste netwerk verbonden bent..."; } } btnSynchroniseren.IsEnabled = true; prSynchroniseren.IsActive = false; }
public static void GetAsync(string url, Dictionary <string, string> data = null, GetCallBack callBack = null) { var dts = new ArrayOfString(); if (data != null) { dts.AddRange(data.Select(dt => $"{dt.Key}={dt.Value}")); } if (dts.Count > 0) { url += "?" + dts.Join("&"); } var httpClient = new HttpClient(url) { Verb = HttpVerb.GET }; httpClient.AsyncGetString((ss, e) => { if (e == null) { callBack?.Invoke(ss, null); } else { ss = "fail"; callBack?.Invoke(ss, e); Log.Error($"请求服务器异常 GetAsync:{url},{e}"); } }); }
public void MSCPSWS_S04_TC08_Resolve_NullResolveInput() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] allProviders = TestSuiteBase.GetAllProviders(); ArrayOfString providerNames = new ArrayOfString(); SPPrincipalType principalType = SPPrincipalType.User; foreach (SPProviderHierarchyTree provider in allProviders) { providerNames.Add(provider.ProviderName); } bool caughtException = false; try { // Call Resolve multiple method with resolveInput parameter sets to null. CPSWSAdapter.Resolve(providerNames, principalType, null); } catch (FaultException faultException) { caughtException = true; // If the server returns an ArgumentNullException<""value""> message, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( this.VerifyArgumentNullException(faultException, "value"), 616, @"[In Resolve] If this [resolveInput] is NULL, the protocol server MUST return an ArgumentNullException<""value""> message."); } finally { this.Site.Assert.IsTrue(caughtException, "If resolveInput is NULL, the protocol server should return an ArgumentNullException<value> message."); } }
public List <ObchodnyVestnikPodanie> DownloadJournalBiddingsByType(ArrayOfString codes, DateTime fromDate, DateTime toDate, bool retry = true) { List <ObchodnyVestnikPodanie> result = null; try { result = ServiceClient.StiahnutPodaniaOVPodlaTypu(Settings.UserName, Settings.Password, codes, fromDate, toDate) .ToList(); _retryCounter = 0; } catch (Exception) { ServiceClient.Abort(); _serviceClient = null; if (AllowedRetriesCount < 0) { throw; } else if (AllowedRetriesCount == 0) { result = DownloadJournalBiddingsByType(codes, fromDate, toDate, retry); } else { _retryCounter++; result = DownloadJournalBiddingsByType(codes, fromDate, toDate, retry); } } return(result); }
public void MSCPSWS_S01_TC01_ClaimTypes_NullProviderNames() { // Call ClaimTypes method to get claim types with a null providerNames in the request. ArrayOfString responseOfClaimTypesResult = CPSWSAdapter.ClaimTypes(null); Site.Assert.IsNotNull(responseOfClaimTypesResult, "If the providerNames is NULL, the protocol server MUST use all the available claims providers."); }
public static string Get(string url, Dictionary <string, string> data = null) { try { var dts = new ArrayOfString(); if (data != null) { dts.AddRange(data.Select(dt => $"{dt.Key}={dt.Value}")); } if (dts.Count > 0) { url += "?" + dts.Join("&"); } var httpClient = new HttpClient(url) { Verb = HttpVerb.GET }; var result = httpClient.GetString(); return(result); } catch (Exception e) { Log.Error($"请求服务器异常 Get:{url},{e}"); return("fail"); } }
public ArrayOfString GetPropertiesAsArrayOfString(Type type) { PropertyInfo[] propertyInfos = type.GetProperties(); List<string> items = new List<string>(); string propertyType = string.empty; for (int x = 0; x < propertyInfos.count(); x++) { switch propertyInfos[x].PropertyType.ToString()) { case "System.String": propertyType = "String"; break; case "System.DataTime": propertyType = "DateTime"; break; case "System.Int32": propertyType = "Int32"; break; } items.Add(propertyInfos[x].Name + "|" + propertyType); } ArrayOfString properties = new ArrayOfString(); properties.AddRange(items); return properties }
public void MSCPSWS_S01_TC09_EntityTypes_ValidProviderNames() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] responseOfGetHierarchyAllResult = TestSuiteBase.GetAllProviders(); bool isEntityTypesSuccess = false; foreach (SPProviderHierarchyTree provider in responseOfGetHierarchyAllResult) { ArrayOfString providerNames = new ArrayOfString(); providerNames.Add(provider.ProviderName); // Call EntityTypes method to get entity types with valid providerNames in the request. ArrayOfString responseOfEntityTypesResult = CPSWSAdapter.EntityTypes(providerNames); Site.Assert.IsNotNull(responseOfEntityTypesResult, "If the providerNames is a valid providerNames, the protocol server MUST use the current available claims providers."); // Call GetEntityTypesResultBySutAdapter method to get entity types with valid providerNames in the request. ArrayOfString getEntityTypesResultBySutAdapter = GetEntityTypesResultBySutAdapter(providerNames); Site.Assert.IsTrue(this.VerificationSutResultsAndProResults(responseOfEntityTypesResult, getEntityTypesResultBySutAdapter), "The entity types returned by the protocol and script should be equal."); isEntityTypesSuccess = true; } // If the claims providers listed in the provider names in the input message is retrieved successfully, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( isEntityTypesSuccess, 178, @"[In EntityTypes] The protocol server MUST retrieve picker entity types from claims providers that meet both of the following criteria: The claims providers are associated with the Web application (1) specified in the input message. The claims providers are listed in the provider names in the input message."); }
public UserModel GetUserDetails(string userName) { log.Debug(MethodHelper.GetCurrentMethodName() + " Method execution start."); try { ArrayOfString data = _hrmsService.GetAuthentication(userName, "a"); if (data == null || data.Count == 0 || (string.IsNullOrEmpty(data[4]) && string.IsNullOrEmpty(data[5]))) { return(null); } UserModel userModel = new UserModel(); userModel.Pfid = Convert.ToInt32(userName); userModel.Name = data[4] + " " + data[5]; userModel.EmailId = data[7]; userModel.Designation = data[6]; return(userModel); } catch (Exception exception) { errorLog.Fatal("Exception " + exception.Message + "\n" + exception.StackTrace); throw; } finally { log.Debug(MethodHelper.GetCurrentMethodName() + " Method execution end."); } }
public void MSCPSWS_S04_TC02_ResolveClaim_Valid() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] allProviders = TestSuiteBase.GetAllProviders(); ArrayOfString providerNames = new ArrayOfString(); SPPrincipalType principalType = SPPrincipalType.SecurityGroup; SPClaim resolveInput = GenerateSPClaimResolveInput_Valid(); bool isResolveClaimSuccess = false; foreach (SPProviderHierarchyTree provider in allProviders) { if (provider.Children.Length != 0) { providerNames.Add(provider.ProviderName); } // Call Resolve claim method to resolve an SPClaim to picker entities using a list of claims providers. PickerEntity[] responseOfResolveClaimResult = CPSWSAdapter.ResolveClaim(providerNames, principalType, resolveInput); Site.Assert.IsNotNull(responseOfResolveClaimResult, "The resolve claim result should not be null."); isResolveClaimSuccess = true; } // If the claims providers listed in the provider names in the input message is resolved successfully, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( isResolveClaimSuccess, 303, @"[In ResolveClaim] The protocol server MUST resolve across all claims providers that meet all the following criteria: The claims providers are associated with the Web application (1) specified in the input message. The claims providers are listed in the provider names in the input message. The claims providers support resolve."); }
public static void ShowContents(Choose choose) { ArrayOfString[] twoDemimention = null; try { twoDemimention = choose.Invoke(); } catch (SqlException e) { Console.WriteLine("Database can't be reached"); } catch (Exception e) { Console.WriteLine("The program encountered errors"); } for (int i = 0; i < twoDemimention.Length; i++) { ArrayOfString oneDemimention = twoDemimention[i]; for (int j = 0; j < oneDemimention.Count; j++) { string content = oneDemimention[j]; Console.Write("{0} ", content); } Console.WriteLine(); } }
public ArrayOfString Call(double amount, int duration, int creditScore) { //initializes and envokes the methode of the webservice proxy = new RuleBaseServiceSoapClient(); BankQueues = proxy.GetBankQueues(amount, duration, creditScore); return(BankQueues); }
public void populateDataGridView() { List <string> list = new List <string>(); ArrayOfString array = new ArrayOfString(); array.AddRange(list); service.dataProgramarii(ref array); string day, hour, data1; int positionCol = 0, positionRow = 0; foreach (var el in array) { string[] data = el.Split(' '); day = data[0]; hour = data[1]; for (int i = 1; i < 6; i++) { if (dataGridView1.Columns[i].Name == day) { positionCol = i; } } for (int i = 0; i < 8; i++) { if (dataGridView1.Rows[i].Cells[0].Value.ToString() == hour) { positionRow = i; } } string recuperata = dataGridView1.Rows[positionRow].Cells[positionCol].Value.ToString(); data1 = recuperata + "\n" + "dr. " + data[2] + " " + data[3] + "\nPacient: " + " " + data[4] + " " + data[5]; dataGridView1.Rows[positionRow].Cells[positionCol].Value = data1; dataGridView1.Rows[positionRow].Cells[positionCol].Style.BackColor = changeColor(); } }
public void MSCPSWS_S01_TC02_ClaimTypes_AllValidProviderNames() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] responseOfGetHierarchyAllResult = TestSuiteBase.GetAllProviders(); ArrayOfString providerNames = new ArrayOfString(); foreach (SPProviderHierarchyTree provider in responseOfGetHierarchyAllResult) { providerNames.Add(provider.ProviderName); } // Call ClaimTypes method to get claim types with all of valid providerNames in the request. ArrayOfString responseOfClaimTypesResult = CPSWSAdapter.ClaimTypes(providerNames); Site.Assert.IsNotNull(responseOfClaimTypesResult, "If the providerNames is all of valid providerNames, the protocol server MUST use all the available claims providers."); bool isNotDuplicate = VierfyRemoveDuplicate(responseOfClaimTypesResult); Site.CaptureRequirementIfIsTrue( isNotDuplicate, 146001, @"[In ClaimTypes] The protocol server will remove the duplicated claim types from the known basic claim types and the claim providers’ claim types."); // Call GetClaimTypesResultBySutAdapter method to get claim types with all of valid providerNames in the request. ArrayOfString getClaimTypesResultBySutAdapter = GetClaimTypesResultBySutAdapter(providerNames); Site.Assert.IsTrue(this.VerificationSutResultsAndProResults(responseOfClaimTypesResult, getClaimTypesResultBySutAdapter), "The claim types returned by the protocol and script should be equal."); // If the claims providers listed in the provider names in the input message is retrieved successfully, then the following requirement can be captured. Site.CaptureRequirement( 144, @"[In ClaimTypes] The protocol server MUST retrieve all known basic claim types. In addition, the protocol server MUST retrieve claim types from claims providers that meet both of the following criteria: The claims providers are associated with the Web application (1) specified in the input message. The claim providers are listed in the provider names in the input message."); }
public void MSCPSWS_S02_TC06_GetHierarchyAll_AllOfProviderNames() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] getAllProviders = TestSuiteBase.GetAllProviders(); ArrayOfString providerNames = new ArrayOfString(); SPPrincipalType principalType = SPPrincipalType.User; // Get the valid numberOfLevels of claims provider hierarchy trees. int numberOfLevels = Convert.ToInt32(Common.GetConfigurationPropertyValue("numberOfLevels", Site)); foreach (SPProviderHierarchyTree provider in getAllProviders) { providerNames.Add(provider.ProviderName); } // Call GetHierarchyAll method to get a list of claims provider hierarchy trees with all of valid providerNames in the request. SPProviderHierarchyTree[] responseOfGetHierarchyAllResult = CPSWSAdapter.GetHierarchyAll(providerNames, principalType, numberOfLevels); Site.Assert.IsNotNull(responseOfGetHierarchyAllResult, "If the providerNames is all of valid providerNames, the protocol server MUST use all the available claims providers."); // If the claims providers listed in the provider names in the input message is retrieved successfully, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( responseOfGetHierarchyAllResult.Length == providerNames.Count, 219, @"[In GetHierarchyAll] The protocol server MUST retrieve claims provider hierarchy trees from claims providers that meet all the following criteria: The claims providers are associated with the Web application (1) specified in the input message. The claims providers are listed in the provider names in the input message. The claims providers support hierarchy."); Site.CaptureRequirementIfIsTrue( responseOfGetHierarchyAllResult.Length == providerNames.Count, 239, @"[In GetHierarchyAllResponse]The protocol server MUST return one claims provider hierarchy tree for each claims provider that match the criteria specified in the input message."); }
public void DeleteSecurityConditions(string actionGuid, List <string> conditionGuids) { ArrayOfString aos = new ArrayOfString(); aos.AddRange(conditionGuids); m_dbClient.DeleteConditionsOfAction(actionGuid, aos); }
public void DeleteResults(List <string> lstGuids) { ArrayOfString aos = new ArrayOfString(); aos.AddRange(lstGuids); m_dbClient.DeleteResults(aos); }
/// <summary> removes tuples. </summary> /// <returns> returns true if something was removed. </returns> public override bool Remove(string[] keys) { // do asynchronous call ArrayOfString corrected = new ArrayOfString(); corrected.AddRange(keys); _service.RemoveAsync(corrected); // wait for result and return it return (bool)_asyncResult.Value; }
public GetGPSDeviceStatisticsInitUIResponseBody(bool GetGPSDeviceStatisticsInitUIResult, bool historyExists, ArrayOfString availableDevicesInHistory, string dateTimeFrom, string dateTimeTo, string strError) { this.GetGPSDeviceStatisticsInitUIResult = GetGPSDeviceStatisticsInitUIResult; this.historyExists = historyExists; this.availableDevicesInHistory = availableDevicesInHistory; this.dateTimeFrom = dateTimeFrom; this.dateTimeTo = dateTimeTo; this.strError = strError; }
public GetGPSDeviceStatisticsInitUIResponseBody(bool GetGPSDeviceStatisticsInitUIResult, bool historyExists, ArrayOfString availableDevicesInHistory, string dateTimeFrom, string dateTimeTo, string strError) { this.GetGPSDeviceStatisticsInitUIResult = GetGPSDeviceStatisticsInitUIResult; this.historyExists = historyExists; this.availableDevicesInHistory = availableDevicesInHistory; this.dateTimeFrom = dateTimeFrom; this.dateTimeTo = dateTimeTo; this.strError = strError; }
public List <LogRecord> GetAppLogs(string appGuid, string tableGuid, List <string> lstRecordGuids) { ArrayOfString aos = new ArrayOfString(); aos.AddRange(lstRecordGuids); return(LogTypeConvert.FromLogRecordPlus(appGuid, tableGuid, m_dbClient.GetAppLogsByLogGuid(appGuid, tableGuid, aos))); }
private TestRecord(int id, PrimitiveLikeType lineItemID, string taxName, PrimitiveLikeType[] uniquePrimitives, string[] stringArray) { ID = ID.WithValue(id).Verify(); UniqueGuid = UniqueGuid.WithUncheckedValue(lineItemID).Verify(); UniqueName = UniqueName.WithValue(taxName).Verify(); UniqueNameWithDifferentDataDescriptors = UniqueNameWithDifferentDataDescriptors.WithValue(taxName).Verify(); ArrayOfUniqueGuid = ArrayOfUniqueGuid.WithValue(uniquePrimitives).Verify(); ArrayOfString = ArrayOfString.WithValue(stringArray).Verify(); }
/// <summary> adds (or replaces) a tuple. </summary> /// <returns> true if something was added (not replaced). </returns> public override bool Enter(string[] tuple) { // do asynchronous call ArrayOfString corrected = new ArrayOfString(); corrected.AddRange(tuple); _service.EnterAsync(corrected); // wait for result and return it return (bool)_asyncResult.Value; }
protected void Button1_Click(object sender, EventArgs e) { ArrayOfString datos = new ArrayOfString { "Reserva", "1", "2", inicio.Value, fin.Value }; UserApiSave.UserAPISoapClient API = new UserApiSave.UserAPISoapClient(); API.Save(datos); }
public bool MustReinstal(Dictionary <string, Version> clientVersions) { ArrayOfString keys = new ArrayOfString(); ArrayOfString versions = new ArrayOfString(); keys.AddRange(clientVersions.Keys); versions.AddRange(clientVersions.OrderBy(kvp => kvp.Key).Select(kvp => kvp.Value.ToString())); return(UpdaterService.MustReinstal(keys, versions)); }
private void refresh() { UserApiSave.UserAPISoapClient API = new UserApiSave.UserAPISoapClient(); ArrayOfString datos = API.Oficinas(); DDLOficina.DataSource = datos; DDLOficina.DataBind(); DataGridPersonas(); }
/// <summary> /// Gets the data. /// </summary> /// <param name="sessionId">The session identifier.</param> /// <param name="tableName">Name of the table.</param> /// <param name="columns">The columns.</param> /// <param name="startDate">The start date.</param> /// <param name="endDate">The end date.</param> /// <returns>Broobu.SweNet.Contract.Domain.SweNetDataSet.</returns> public SweNetDataSet GetData(string sessionId, string tableName, string[] columns, DateTime startDate, DateTime endDate) { ArrayOfString columnsArray = new ArrayOfString(); columnsArray.AddRange(columns); ISwenetDataSet res = SweNetAdapter .Proxy .getData(sessionId, tableName, columnsArray, startDate, endDate); return res.ToSweNetDataSet(); }
private static ArrayOfString getmobarry(string[] mob) { ArrayOfString refof = new ArrayOfString(); for (int i = 0; i < mob.Length; i++) { refof.Add(mob[i]); } return(refof); }
public string modifyJob(string sessionID, string jobName, ArrayOfString @params) { object[] results = this.Invoke("modifyJob", new object[] { sessionID, jobName, @params }); return((string)(results[0])); }
public void TestMethodAdjuntarIdentificacion() { var varios = new List <string> { "Luke", "Tatooine" }.ToList(); ArrayOfString array = new ArrayOfString(); array.AddRange(varios); Assert.IsTrue(_prueba.AdjuntarIdentificacion(array)); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { UserApiSave.UserAPISoapClient API = new UserApiSave.UserAPISoapClient(); ArrayOfString datos = API.Oficinas(); Oficina.DataSource = datos; Oficina.DataBind(); } }
protected void BtnSave_Click(object sender, EventArgs e) { ArrayOfString datos = new ArrayOfString { "Office", TbName.Text, TbAddress.Text, TbEmail.Text, TbExt.Text, Seats.Text }; UserApiSave.UserAPISoapClient API = new UserApiSave.UserAPISoapClient(); API.Save(datos); }
public void GetFiles() { ArrayOfString files = eventClient.GetFiles(); for (int i = 0; i < files.Count; i++) { Console.WriteLine(files[i]); } ExitQuestion(); }
private void Login(string username, string password) { try { ArrayOfString array = service.login(username, password); this.UserID = int.Parse(array[0].ToString()); this.UserType = array[1].ToString(); } catch (Exception) { } }
private object[] OnEndGetGPSDeviceStatisticsInitUI(IAsyncResult result) { bool defaultValueForInitialization = base.GetDefaultValueForInitialization <bool>(); ArrayOfString availableDevicesInHistory = base.GetDefaultValueForInitialization <ArrayOfString>(); string dateTimeFrom = base.GetDefaultValueForInitialization <string>(); string dateTimeTo = base.GetDefaultValueForInitialization <string>(); string strError = base.GetDefaultValueForInitialization <string>(); bool flag2 = this.EndGetGPSDeviceStatisticsInitUI(result, out defaultValueForInitialization, out availableDevicesInHistory, out dateTimeFrom, out dateTimeTo, out strError); return(new object[] { defaultValueForInitialization, availableDevicesInHistory, dateTimeFrom, dateTimeTo, strError, flag2 }); }
private void PrepareMenu(ArrayOfString arrayOfString) { Employees = arrayOfString.ToArray(); foreach (var e in Employees) { Choices.Add(new EmployeeMenu { Employee = e }); } RandomizeMenu(); }
/// <summary> /// A method used to validate the ClaimTypes response. /// </summary> /// <param name="claimTypesResult">A parameter represents the ClaimTypes result.</param> private void ValidateClaimTypesResponseData(ArrayOfString claimTypesResult) { XmlElement xmlResponse = SchemaValidation.LastRawResponseXml; bool isResponseValid = SchemaValidation.ValidationResult == ValidationResult.Success; // The response have been received successfully, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( isResponseValid, 141, @"[In ClaimTypes] The following is the WSDL port type specification of the ClaimTypes WSDL operation. <wsdl:operation name=""ClaimTypes"" xmlns:wsdl=""http://schemas.xmlsoap.org/wsdl/""> <wsdl:input wsaw:Action=""http://schemas.microsoft.com/sharepoint/claims/IClaimProviderWebService/ClaimTypes"" message=""tns:IClaimProviderWebService_ClaimTypes_InputMessage"" xmlns:wsaw=""http://www.w3.org/2006/05/addressing/wsdl""/> <wsdl:output wsaw:Action=""http://schemas.microsoft.com/sharepoint/claims/IClaimProviderWebService/ClaimTypesResponse"" message=""tns:IClaimProviderWebService_ClaimTypes_OutputMessage"" xmlns:wsaw=""http://www.w3.org/2006/05/addressing/wsdl""/> </wsdl:operation>"); Site.CaptureRequirementIfIsTrue( isResponseValid, 161, @"[In ClaimTypes] The protocol client sends an IClaimProviderWebService_ClaimTypes_InputMessage (section 3.1.4.1.1.1) request WSDL message and the protocol server responds with an IClaimProviderWebService_ClaimTypes_OutputMessage (section 3.1.4.1.1.2) response message."); // If the server response is validated successfully, and the ClaimTypesResponse has returned, MS-CPSWS_R152 can be verified. Site.CaptureRequirementIfIsTrue( this.ResponseExists(xmlResponse, "ClaimTypesResponse"), 152, @"[In IClaimProviderWebService_ClaimTypes_OutputMessage] The [ClaimTypes] SOAP body contains the ClaimTypesResponse element."); // The response have been received successfully, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( isResponseValid, 156, @"[In ClaimTypesResponse] The ClaimTypesResponse element specifies the result data for the ClaimTypes WSDL operation. <xs:element name=""ClaimTypesResponse"" xmlns:xs=""http://www.w3.org/2001/XMLSchema""> <xs:complexType> <xs:sequence> <xs:element minOccurs=""0"" maxOccurs=""1"" name=""ClaimTypesResult"" type=""tns:ArrayOfString""/> </xs:sequence> </xs:complexType> </xs:element>"); if (claimTypesResult != null) { this.ValidArrayOfStringComplexType(); } //Verify MS-CPSWS_R157001 foreach (string claim in claimTypesResult) { Site.CaptureRequirementIfIsTrue( Uri.IsWellFormedUriString(claim, UriKind.Absolute), 157001, @"[In ClaimTypesResponse] The claim type should format as a URI."); } }
// Expects: String sessionId, String table, String[] columns, Date startDate, Date endDate // Returns: Object[][] data // The getData method takes a session Id, table and column names, and a start and end date (the timespan). // It returns a two-dimensional object array with the values; this array can be addressed with data[row][column]. 2 /// <summary> /// Gets the data. /// </summary> /// <param name="sessionId">The session identifier.</param> /// <param name="tableName">Name of the table.</param> /// <param name="columns">The columns.</param> /// <param name="startDate">The start date.</param> /// <param name="endDate">The end date.</param> /// <returns>ISwenetDataSet.</returns> public ISwenetDataSet getData(string sessionId, string tableName, ArrayOfString columns, DateTime startDate, DateTime endDate) { var clt = new SwenetDataProviderPortTypeClient("ISwenetDataProviderHttpPort"); try { return clt.getData(sessionId, tableName, columns, startDate, endDate); } finally { CloseClient(clt); } }
public void MSCPSWS_S03_TC02_ProviderSchemas() { // Get the provider names of all the providers from the hierarchy ArrayOfString providerNames = new ArrayOfString(); SPProviderHierarchyTree[] responseOfGetHierarchyAllResult = TestSuiteBase.GetAllProviders(); providerNames.AddRange(responseOfGetHierarchyAllResult.Select(root => root.ProviderName)); foreach (SPProviderHierarchyNode node in responseOfGetHierarchyAllResult.SelectMany(root => root.Children)) { this.DepthFirstTraverse(node, ref providerNames); } // Get schemas of the claims providers specified in the list of provider names in the request. SPProviderSchema[] responseOfProviderSchemaResult = CPSWSAdapter.ProviderSchemas(providerNames); Site.Assert.IsNotNull(responseOfProviderSchemaResult, "The schemas of the specific claims providers should not be null!"); }
/// <summary> /// A method used to get the claim types. /// </summary> /// <param name="providerNames">A parameter represents a list of provider names which are used to retrieve the claim types.</param> /// <returns>A return value represents a list of claim types.</returns> public ArrayOfString ClaimTypes(ArrayOfString providerNames) { ArrayOfString responseOfClaimTypes = new ArrayOfString(); try { responseOfClaimTypes = this.cpswsClient.ClaimTypes(providerNames); this.CaptureTransportRelatedRequirements(); } catch (FaultException faultEX) { this.Site.Log.Add( LogEntryKind.Debug, @"There is an exception generated when calling [ClaimTypes] method:\r\n{0}", faultEX.Message); this.CaptureTransportRelatedRequirements(); this.ValidateAndCaptureSOAPFaultRequirement(faultEX); throw; } this.ValidateClaimTypesResponseData(responseOfClaimTypes); return responseOfClaimTypes; }
public void MSCPSWS_S04_TC01_ResolveString() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] allProviders = TestSuiteBase.GetAllProviders(); ArrayOfString providerNames = new ArrayOfString(); SPPrincipalType principalType = SPPrincipalType.SecurityGroup; string resolveInput = string.Empty; bool isResolveSuccess = false; foreach (SPProviderHierarchyTree provider in allProviders) { if (provider.EntityData.Length != 0) { providerNames.Add(provider.ProviderName); foreach (PickerEntity entityData in provider.EntityData) { resolveInput = entityData.DisplayText; // Call Resolve method to resolve an input string to picker entities using a list of claims providers. PickerEntity[] responseOfResolveResult = CPSWSAdapter.Resolve(providerNames, principalType, resolveInput); Site.Assert.IsNotNull(responseOfResolveResult, "Resolve result should not null."); isResolveSuccess = true; } } } // If the claims providers listed in the provider names in the input message is resolved successfully, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( isResolveSuccess, 280, @"[In Resolve] The protocol server MUST resolve across all claims providers that meet all the following criteria: The claims providers are associated with the Web application specified in the input message. The claims providers are listed in the provider names in the input message. The claims providers support resolve."); }
public void MSCPSWS_S05_TC01_Search() { // Set principal type for search. SPPrincipalType principalType = SPPrincipalType.SecurityGroup; // Generate ArrayOfSPProviderSearchArguments. List<SPProviderSearchArguments> arrayOfSPProviderSearchArguments = new List<SPProviderSearchArguments>(); Site.Assume.IsNotNull(this.GenerateProviderSearchArgumentsInput_Valid(), "There should be a valid provider search arguments!"); SPProviderSearchArguments providerSearchArguments = this.GenerateProviderSearchArgumentsInput_Valid(); arrayOfSPProviderSearchArguments.Add(providerSearchArguments); Site.Assume.IsNotNull(TestSuiteBase.SearchPattern, "The search pattern should not be null!"); // Call Search operation. SPProviderHierarchyTree[] responseOfSearchResult = CPSWSAdapter.Search(arrayOfSPProviderSearchArguments.ToArray(), principalType, TestSuiteBase.SearchPattern); Site.Assert.IsNotNull(responseOfSearchResult, "The search result MUST be not null."); Site.Assert.IsTrue(responseOfSearchResult.Length >= 1, "The search result MUST contain at least one claims provider."); // Get the input provider names list. ArrayOfString providerNames = new ArrayOfString(); providerNames.AddRange(arrayOfSPProviderSearchArguments.Select(root => root.ProviderName)); // Requirement capture condition. bool searchSuccess = false; foreach (SPProviderHierarchyTree providerTree in responseOfSearchResult) { if (providerTree.ProviderName.StartsWith(Common.GetConfigurationPropertyValue("HierarchyProviderPrefix", this.Site))) { if (providerNames.Contains(providerTree.ProviderName)) { searchSuccess = true; } else { // Jump over the Hierarchy Provider tree that the server sees fit to return together with the result Claims provider trees. continue; } } else if (providerNames.Contains(providerTree.ProviderName)) { searchSuccess = true; } else { Site.Assert.Fail("The provider names in the search result should be contained in the provider names in the input message!"); } } // Capture requirement 378 by matching the input provider name with the result claims provider name, // The search input claims provider already satisfy the condition 1 and 3 in requirement 378 in test environment configuration. Site.CaptureRequirementIfIsTrue( searchSuccess, 378, @"[In Search] The protocol server MUST search across all claims providers that meet all the following criteria: The claims providers are associated with the Web application (1) specified in the input message. The claims providers are listed in the provider search arguments in the input message. The claims providers support search."); // Capture requirement 398 by matching searchPattern with the result claims provider's Nm attribute. Site.CaptureRequirementIfIsTrue(searchSuccess, 398, @"[In Search] searchPattern: The protocol server MUST search for the string in each claims provider."); // Capture requirement 404 by matching searchPattern with the result claims provider's Nm attribute. Site.CaptureRequirementIfIsTrue(searchSuccess, 404, @"[In SearchResponse] The protocol server MUST return one claims provider hierarchy tree for each claims provider that contains entities that match the search string."); }
/// <summary> /// A method used to get claim types by SUT control adapter. /// </summary> /// <param name="claimProviderNames">A parameter represents a group of provider name.</param> /// <returns>A return value represents a list of claim types</returns> public ArrayOfString GetClaimTypesResultBySutAdapter(ArrayOfString claimProviderNames) { ArrayOfString claimTypesResultBySut = new ArrayOfString(); string inputClaimProviderNames = InputClaimProviderNames(claimProviderNames); string getClaimTypesInSPProviderScript = SutControlAdapter.GetClaimTypesInSPProvider(inputClaimProviderNames); if (getClaimTypesInSPProviderScript != null && getClaimTypesInSPProviderScript != string.Empty) { foreach (string claimType in getClaimTypesInSPProviderScript.Split(',')) { claimTypesResultBySut.Add(claimType); } } return claimTypesResultBySut; }
/// <summary> /// A method used to convert ArrayOfString type to String type. /// </summary> /// <param name="inputClaimProviderNames">A parameter represents a group of provider name with ArrayOfString type.</param> /// <returns>A return value represents a string for provider names, they are separated by commas ',' </returns> private static string InputClaimProviderNames(ArrayOfString inputClaimProviderNames) { string str = null; foreach (string inputClaimProviderName in inputClaimProviderNames) { str += inputClaimProviderName + ","; } string results = str.Trim(','); return results; }
/// <summary> /// A method used to verify remove the duplicated item. /// </summary> /// <param name="resultByProtocol">A parameter represents an expected type list from protocol.</param> /// <returns>Return true value represents the protocol server remove the duplicated item, else return false</returns> public bool VierfyRemoveDuplicate(ArrayOfString resultByProtocol) { for (int i = 0; i < resultByProtocol.Count; i++) { string claimType = resultByProtocol[i]; for (int j = i + 1; j < resultByProtocol.Count; j++) { if (claimType == resultByProtocol[j]) { return false; } } } return true; }
/// <summary> /// A method used to verify types that are defined by protocol. /// </summary> /// <param name="resultByProtocol">A parameter represents an expected type list from protocol.</param> /// <param name="resultBySutAdapter">A parameter represents an actual type list from SUT adapter.</param> /// <returns>Return true value represents the protocol type list is same as script type list, else return false.</returns> public bool VerificationSutResultsAndProResults(ArrayOfString resultByProtocol, ArrayOfString resultBySutAdapter) { if (resultByProtocol == null) { throw new ArgumentException("The expected results must not be null or the count must not be 0."); } if (resultBySutAdapter == null) { throw new ArgumentException("The actual results must not be null or the count must not be 0."); } if (resultByProtocol.Count != resultBySutAdapter.Count) { return false; } bool retValue = true; foreach (string sutItem in resultBySutAdapter) { if (!resultByProtocol.Any(protocolItem => protocolItem.Equals(sutItem, StringComparison.OrdinalIgnoreCase))) { retValue = false; this.Site.Log.Add(LogEntryKind.CheckFailed, "The actual item {0} is not in the protocol results.", sutItem); break; } } if (retValue == true) { foreach (string protocolItem in resultByProtocol) { if (!resultBySutAdapter.Any(sutItem => sutItem.Equals(protocolItem, StringComparison.OrdinalIgnoreCase))) { retValue = false; this.Site.Log.Add(LogEntryKind.CheckFailed, "The expected item {0} is not in the SUT adapter results.", protocolItem); break; } } } return retValue; }
//同步 protected void Button1_Click(object sender, EventArgs e) { int selectCount = RGrid_EndUserList.SelectedItems.Count; if (selectCount == 0) { RadScriptManager.RegisterStartupScript(Page, GetType(), "c3", "OpenAlert('抱歉!您未选择任何项!!');", true); return; } Model.Log logModel = new Model.Log(); logModel.OperationItem = "批量同步终端用户"; logModel.Operator = user.UserInfo.UserID; logModel.OperationTime = DateTime.Now; int totCount = selectCount; StringBuilder notExist = new StringBuilder(""); bool isSyncMgUp = false; bool isSyncMgIn = false; try { StringBuilder sb = new StringBuilder("【"); StringBuilder sbU = new StringBuilder("【"); StringBuilder sbI = new StringBuilder("【"); List<MongoDBService.EndUser> euUpList = new List<MongoDBService.EndUser>(); List<MongoDBService.EndUser> euInList = new List<MongoDBService.EndUser>(); using (MongoDBServiceSoapClient mg = new MongoDBServiceSoapClient()) { foreach (GridDataItem item in RGrid_EndUserList.MasterTableView.Items) { if ((item["CheckboxSelectColumn"].Controls[0] as CheckBox).Checked) { String autoid = item["AutoID"].Text; sb.Append(autoid + " "); if (!eu.Exists(long.Parse(autoid))) { continue; } Model.EndUser euModel = eu.GetModel(long.Parse(autoid)); MongoDBService.EndUser dc = new MongoDBService.EndUser(); dc.AutoID = euModel.AutoID.ToString(); dc.EnduserName = euModel.EndUserName; string[] identityArr = euModel.Identities.Split('|'); ArrayOfString aof = new ArrayOfString(); foreach (string id in identityArr) { if (id.Equals("")) { continue; } aof.Add(id); } dc.Identities = aof; dc.IsValid = euModel.IsValid; dc.LastModifyTime = euModel.LastModifyTime; dc.SimCardNo = euModel.SimCardNo; string rtStrx = ""; if (mg.SelectEnduserBySimCardNo(euModel.SimCardNo, out rtStrx) != null) { sbU.Append(autoid + " "); euUpList.Add(dc); } else { sbI.Append(autoid + " "); euInList.Add(dc); } } } string info0 = ""; string info1 = ""; isSyncMgUp = true; if (euUpList.Count > 0) { string rtStr = ""; isSyncMgUp = false; isSyncMgUp = mg.UpdateEndusers(euUpList.ToArray(), out rtStr); if (isSyncMgUp) { info0 = "同步成功(更新)列表[" + euUpList.Count + "]:" + sbU.ToString(); } else { info0 = "同步成功(更新)列表[" + euUpList.Count + "]:无"; } logModel.Memo += "同步更新返回:" + rtStr; } isSyncMgIn = true; if (euInList.Count > 0) { string rtStr = ""; isSyncMgIn = false; isSyncMgIn = mg.InsertEndusers(euInList.ToArray(), out rtStr); if (isSyncMgIn) { info0 = "同步成功(新增)列表[" + euUpList.Count + "]:" + sbU.ToString(); } else { info0 = "同步成功(新增)列表[" + euUpList.Count + "]:无"; } logModel.Memo += "同步新增返回:" + rtStr; ; } sb.Append("】"); sbU.Append("】"); sbI.Append("】"); logModel.OperationDetail = "同步请求列表[" + totCount + "]:" + sb.ToString() + info0 + info1; } } catch (Exception ex) { logModel.Memo = "异常:" + ex.Message; } finally { if (isSyncMgUp && isSyncMgIn) { logModel.Memo = "成功"; log.Add(logModel); RadScriptManager.RegisterStartupScript(Page, GetType(), "c2", "OpenAlert('恭喜!同步成功!');", true); } else { logModel.Memo += "失败"; log.Add(logModel); RadScriptManager.RegisterStartupScript(Page, GetType(), "c3", "OpenAlert('抱歉!同步未完全成功!');", true); } } }
public BridgeScoreTable(Form f, int GameId) { m_form = f; InitializeComponent(); // Для нормального авто-скролла fakeControlForAutoScroll = new Control(); fakeControlForAutoScroll.Size = new Size(0, 0); fakeControlForAutoScroll.Location = new Point(0, 0); this.Controls.Add(fakeControlForAutoScroll); // Создать селектор матчей: if (PAGE__VIEW) { PAGE__ComboBox = new ComboBox(); PAGE__ComboBox.DropDownStyle = ComboBoxStyle.DropDownList; PAGE__ComboBox.Location = new Point(4, 2); PAGE__ComboBox.Font = new Font("Tahoma", 6, FontStyle.Regular); PAGE__ComboBox.Size = new Size(250, 30); m_form.Controls.Add(PAGE__ComboBox); PAGE__ComboBox.SelectedIndexChanged += new EventHandler(PAGE_ComboBox_SelectedIndexChanged); } // Создать надпись total-score TS_SCore = new DealScore_CLASS(); TS_Label = new ShowTextControl(); TS_Label.Location = new Point(270, 2); TS_Label.Size = new Size(180, (PAGE__VIEW ? PAGE__ComboBox.Height : 30)); TS_Label.SetTextFormat(StringAlignment.Center, StringAlignment.Center, 0, 0); TS_Label.SetTextFonts(new Font[] { new Font("Tahoma", 7, FontStyle.Bold) }); //TS_Label.BackColor = Color.Aqua; TS_Label.AttachData(TS_SCore); m_form.Controls.Add(TS_Label); // Конструкторы для БД DB_Game_Id = GameId; DB_Matches_Ids = new ArrayOfInt(); DB_Deals_Ids = new ArrayOfArrayOfInt(); DB_Deals_ColumnsNames = new Dictionary<int, string>(); // ************** DB - загрузить параметры, важно сначала это сделать **************** DB_LoadGameParameters(); // Указать !НАШУ ПАРУ!, чтобы очки писались относительно нее (взыть из БД) ShowSimpleScore.RelativePair = Pairs.NS; BridgeGameScoring.RelativePair = Pairs.NS; // Конструкторы массивов для reflect: REFLECT_Functions = new Dictionary<int, FuncInfo[]>(); REFLECT_Depends = new Dictionary<int, int[]>(); REFLECT_Constructors = new Dictionary<int, string[]>(); REFLECT_Recounts = new Dictionary<int, int[]>(); REFLECT_InsideFunctionsList = new ArrayOfString(); NotNecessaryValues = new ArrayOfInt(); ContractColumns = new ArrayOfInt(); NotNecessaryValues_NOCONTRACT = new ArrayOfArrayOfInt(); // Общие ID для ф-ий reflect ID_NAMES = new Dictionary<int, string>(); ID_NAMES.Add((int)CONST.LINE_NO, "LINE_NO"); //for robber: ID_NAMES.Add((int)CONST.ROBBER_NO, "ROBBER_NO"); ID_NAMES.Add((int)CONST.RDEAL_NO, "RDEAL_NO"); ID_NAMES.Add((int)CONST.ROBBER, "ROBBER"); ID_NAMES.Add((int)CONST.ROBBER_TOTAL_SCORE, "ROBBER_TOTAL_SCORE"); ID_NAMES.Add((int)CONST.RDEAL_FULLSCORE, "RDEAL_FULLSCORE"); ID_NAMES.Add((int)CONST.ROBBER_FIRSTLINE, "ROBBER_FIRSTLINE"); //new for match: ID_NAMES.Add((int)CONST.MATCH_NO, "MATCH_NO"); ID_NAMES.Add((int)CONST.MDEAL_NO, "MDEAL_NO"); ID_NAMES.Add((int)CONST.MATCH_TOTAL_SCORE, "MATCH_TOTAL_SCORE"); ID_NAMES.Add((int)CONST.MATCH_FIRSTLINE, "MATCH_FIRSTLINE"); //first dealer: ID_NAMES.Add((int)CONST.FIRST_DEALER, "FIRST_DEALER"); //loading: ID_NAMES.Add((int)CONST.LOADING_FROM_DB, "LOADING_FROM_DB"); //for page mode: ID_NAMES.Add((int)CONST.LINE_NO__REAL, "LINE_NO__REAL"); ID_NAMES.Add((int)CONST.ROBBER_NO__REAL, "ROBBER_NO__REAL"); ID_NAMES.Add((int)CONST.MATCH_NO__REAL, "MATCH_NO__REAL"); // Загрузка всех необходимых настроек для данного типа игры: switch (GameSettings_GameType) { case GameType.Robber: LOAD_GAME_SETTINGS___1_Robber(); break; case GameType.Sport: LOAD_GAME_SETTINGS___2_Sport(); break; case GameType.Compensat: LOAD_GAME_SETTINGS___3_Compensat(); break; case GameType.SimpleIMP: LOAD_GAME_SETTINGS___4_SimpleIMP(); break; } // В зависимости от того, может ли быть "нет контракта", спрятать или показать кнопку [НЕТ КОНТРАКТА] на селекторе ContractSelector.ExtendedWidth(canbeNoContract); // Координаты этой таблицы + контрол роббера: int page_combo_height = 0; if (PAGE__VIEW) page_combo_height = PAGE__ComboBox.Height + 3; if (isRobber) { CONTROL_ROBBER = new RobberControl(); CONTROL_ROBBER.Location = new Point(2, 2 + page_combo_height); //промежуток должен быть CONTROL_ROBBER.Size = new Size(size_CONTROL_ROBBER.Width, m_form.Height - 2 * 2 - page_combo_height); m_form.Controls.Add(CONTROL_ROBBER); this.Location = new Point(2 + size_CONTROL_ROBBER.Width + 3, 2 + page_combo_height); //промежуток должен быть = 3 this.Width = f.Width - 2 * 2 - (size_CONTROL_ROBBER.Width + 3); } else { this.Location = new Point(2, 2 + page_combo_height); this.Width = f.Width - 2 * 2; } this.Height = f.Height - 2 * 2 - page_combo_height; // Обработка передвижений оранжевого курсора по таблице this.ActiveElementChanged += OnActiveElementChanged; // Конструкторы данных и контролов: VALUES = new ArrayOfArrayOfObject(); CONTROLS = new ArrayOfArrayOfControl(); CONTROLS_COVERS = new ArrayOfArrayOfControl(); if (isRobber) // для робберного бриджа: { // Создание массива робберов ROBBERS = new ArrayOfRobbers(); } // Создание массива заголовков с totalscore-ми (вверху каждого роббера/матча) и контролов для них HeadlinesScores = new ArrayList(); HeadlinesScores_Controls = new ArrayOfControl(); HeadlinesScores_CoverControls = new ArrayOfControl(); // ************** DB - построить таблицу **************** DB_Matches_TotalScores = new ArrayList(); if (PAGE__VIEW) DB_LoadIDs_BuildTable_v3(); else DB_LoadIDs_BuildTable_v2(); }
public void MSCPSWS_S02_TC09_GetHierarchyAll_InvalidNumberOfLevels() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] getAllProviders = TestSuiteBase.GetAllProviders(); ArrayOfString providerNames = new ArrayOfString(); SPPrincipalType principalType = SPPrincipalType.SharePointGroup; int numberOfLevels = 0; foreach (SPProviderHierarchyTree provider in getAllProviders) { providerNames.Add(provider.ProviderName); } bool caughtException = false; try { // Call GetHierarchyAll method with numberOfLevels parameter sets to invalid. CPSWSAdapter.GetHierarchyAll(providerNames, principalType, numberOfLevels); } catch (FaultException faultException) { caughtException = true; // If the server returns an ArgumentNullException<""numberOfLevels""> message, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( this.VerifyArgumentOutOfRangeException(faultException, "numberOfLevels"), 591, @"[In GetHierarchyAll] The protocol server MUST return an ArgumentOutOfRangeException<""numberOfLevels""> message if the value of this element [numberOfLevels] is less than 1."); } finally { this.Site.Assert.IsTrue(caughtException, "The protocol server should return ArgumentOutOfRangeException<numberOfLevels> message if the value of this element [numberOfLevels] is less than 1."); } }
public void MSCPSWS_S02_TC07_GetHierarchyAll_ValidInputParameters() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] getAllProviders = TestSuiteBase.GetAllProviders(); SPPrincipalType principalType = SPPrincipalType.User; // Get the valid numberOfLevels of claims provider hierarchy trees. int numberOfLevels = Convert.ToInt32(Common.GetConfigurationPropertyValue("numberOfLevels", Site)); foreach (SPProviderHierarchyTree provider in getAllProviders) { ArrayOfString providerNames = new ArrayOfString(); providerNames.Add(provider.ProviderName); // Call GetHierarchyAll method to get a list of claims provider hierarchy trees with a valid providerNames in the request. SPProviderHierarchyTree[] responseOfGetHierarchyAllResult = CPSWSAdapter.GetHierarchyAll(providerNames, principalType, numberOfLevels); Site.Assert.IsNotNull(responseOfGetHierarchyAllResult, "If the provider names are valid, the protocol server will return the hierarchy trees that match the claims providers."); } }
public void MSCPSWS_S02_TC06_GetHierarchyAll_AllOfProviderNames() { // Call the helper method to get all claims providers. SPProviderHierarchyTree[] getAllProviders = TestSuiteBase.GetAllProviders(); ArrayOfString providerNames = new ArrayOfString(); SPPrincipalType principalType = SPPrincipalType.User; // Get the valid numberOfLevels of claims provider hierarchy trees. int numberOfLevels = Convert.ToInt32(Common.GetConfigurationPropertyValue("numberOfLevels", Site)); foreach (SPProviderHierarchyTree provider in getAllProviders) { providerNames.Add(provider.ProviderName); } // Call GetHierarchyAll method to get a list of claims provider hierarchy trees with all of valid providerNames in the request. SPProviderHierarchyTree[] responseOfGetHierarchyAllResult = CPSWSAdapter.GetHierarchyAll(providerNames, principalType, numberOfLevels); Site.Assert.IsNotNull(responseOfGetHierarchyAllResult, "If the providerNames is all of valid providerNames, the protocol server MUST use all the available claims providers."); // If the claims providers listed in the provider names in the input message is retrieved successfully, then the following requirement can be captured. Site.CaptureRequirementIfIsTrue( responseOfGetHierarchyAllResult.Length == providerNames.Count, 219, @"[In GetHierarchyAll] The protocol server MUST retrieve claims provider hierarchy trees from claims providers that meet all the following criteria: The claims providers are associated with the Web application (1) specified in the input message. The claims providers are listed in the provider names in the input message. The claims providers support hierarchy."); Site.CaptureRequirementIfIsTrue( responseOfGetHierarchyAllResult.Length == providerNames.Count, 239, @"[In GetHierarchyAllResponse]The protocol server MUST return one claims provider hierarchy tree for each claims provider that match the criteria specified in the input message."); }
void LOAD_GAME_SETTINGS___1_Robber() { isRobber = true; isSplit = false; canbeNoContract = true; // ОПЦИИ GameSettings_Rob_BonusForOners = ((GameSettings_Options & 1) > 0); GameSettings_Rob_BonusForWholeRobber = ((GameSettings_Options & 2) > 0); //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DB !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DB_Deals_TableName = "Deals_Rob"; DB_Deals_ColumnsNames.Add(6, "CardsDistribution"); DB_Deals_ColumnsNames.Add(1, "Pair"); DB_Deals_ColumnsNames.Add(2, "Contract"); DB_Deals_ColumnsNames.Add(3, "Result"); if (GameSettings_Rob_BonusForOners) DB_Deals_ColumnsNames.Add(8, "Oners"); columnsDataClasses = new ArrayOfTypes(); columnsDataClasses.Add(typeof(ZoneSwitcher)); columnsDataClasses.Add(typeof(PairSwitcher)); columnsDataClasses.Add(typeof(Contract)); columnsDataClasses.Add(typeof(Result)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(IntData)); columnsDataClasses.Add(typeof(CardsDistribution)); columnsDataClasses.Add(typeof(QuarterSwitcher)); if (GameSettings_Rob_BonusForOners) columnsDataClasses.Add(typeof(OnersSwitcher)); ID_NAMES.Add(0, "ZONE"); ID_NAMES.Add(1, "PAIR"); ID_NAMES.Add(2, "CONTRACT"); ID_NAMES.Add(3, "RESULT"); ID_NAMES.Add(4, "RDEAL_LIGHTSCORE"); ID_NAMES.Add(5, "NO"); ID_NAMES.Add(6, "DISTRIBUTION"); ID_NAMES.Add(7, "DEALER"); if (GameSettings_Rob_BonusForOners) ID_NAMES.Add(8, "ONERS"); REFLECT_Functions.Add(0, new FuncInfo[] { new FuncInfo("DefineRobberZone", new string[] { "ZONE", "ROBBER", "RDEAL_NO" }) }); REFLECT_Depends.Add(0, new int[] { -1 }); REFLECT_Functions.Add(1, new FuncInfo[] { new FuncInfo("NoPairIfNoContract", new string[] { "PAIR", "CONTRACT" }) }); REFLECT_Depends.Add(1, new int[] { 1, 2 }); REFLECT_Functions.Add(3, new FuncInfo[] { new FuncInfo("CorrectResultAccordingToContract", new string[] { "RESULT", "CONTRACT", "0" }) }); REFLECT_Depends.Add(3, new int[] { 2 }); REFLECT_Constructors.Add(3, new string[] { "CONTRACT" }); if (GameSettings_Rob_BonusForOners) { REFLECT_Functions.Add((int)CONST.RDEAL_FULLSCORE, new FuncInfo[] { new FuncInfo("RobberScore", new string[] { "RDEAL_FULLSCORE", "PAIR", "ZONE", "CONTRACT", "RESULT", (GameSettings_Rob_BonusForWholeRobber ? "TRUE" : "FALSE"), "ROBBER", "RDEAL_NO", "ONERS" }) }); REFLECT_Depends.Add((int)CONST.RDEAL_FULLSCORE, new int[] { 0, 1, 2, 3, 8 }); } else { REFLECT_Functions.Add((int)CONST.RDEAL_FULLSCORE, new FuncInfo[] { new FuncInfo("RobberScore", new string[] { "RDEAL_FULLSCORE", "PAIR", "ZONE", "CONTRACT", "RESULT", (GameSettings_Rob_BonusForWholeRobber ? "TRUE" : "FALSE"), "ROBBER", "RDEAL_NO" }) }); REFLECT_Depends.Add((int)CONST.RDEAL_FULLSCORE, new int[] { 0, 1, 2, 3 }); } REFLECT_Functions.Add(4, new FuncInfo[] { new FuncInfo("RobberScoreLight", new string[] { "RDEAL_LIGHTSCORE", "RDEAL_FULLSCORE" }) }); REFLECT_Depends.Add(4, new int[] { (int)CONST.RDEAL_FULLSCORE }); REFLECT_Functions.Add(5, new FuncInfo[] { new FuncInfo("IntData_Equal", new string[] { "NO", "RDEAL_NO" }) }); REFLECT_Constructors.Add(5, new string[] { "true" }); REFLECT_Depends.Add(5, new int[] { -1 }); REFLECT_Functions.Add((int)CONST.ROBBER, new FuncInfo[] { new FuncInfo("CleanUnnecessaryRDealsInRobber", new string[] { "ROBBER", "ROBBER_FIRSTLINE" }), new FuncInfo("InvalidateRobber", new string[] { "ROBBER" }) }); REFLECT_Depends.Add((int)CONST.ROBBER, new int[] { (int)CONST.RDEAL_FULLSCORE }); REFLECT_Recounts.Add((int)CONST.ROBBER, new int[] { 0, (int)CONST.RDEAL_FULLSCORE }); REFLECT_Functions.Add((int)CONST.ROBBER_TOTAL_SCORE, new FuncInfo[] { new FuncInfo("SetRobberScore", new string[] { "ROBBER", "ROBBER_TOTAL_SCORE" }), new FuncInfo("TotalScore_RobberMode", new string[] { "ROBBER_TOTAL_SCORE", "ROBBER_NO__REAL" }) }); REFLECT_Depends.Add((int)CONST.ROBBER_TOTAL_SCORE, new int[] { (int)CONST.ROBBER }); REFLECT_InsideFunctionsList.Add("CleanUnnecessaryRDealsInRobber"); REFLECT_InsideFunctionsList.Add("InvalidateRobber"); REFLECT_InsideFunctionsList.Add("TotalScore_RobberMode"); REFLECT_Functions.Add(7, new FuncInfo[] { new FuncInfo("DefineRobberDealer", new string[] { "DEALER", "LINE_NO__REAL", "ROBBER_NO__REAL", "RDEAL_NO", "FIRST_DEALER" }) }); REFLECT_Depends.Add(7, new int[] { -1 }); if (GameSettings_Rob_BonusForOners) { REFLECT_Functions.Add(8, new FuncInfo[] { new FuncInfo("GetOners", new string[] { "ONERS", "CONTRACT", "DISTRIBUTION" }) }); REFLECT_Depends.Add(8, new int[] { 8, 2, 6 }); } NotNecessaryValues.Add(6); ContractColumns.Add(new int[] { 2 }); NotNecessaryValues_NOCONTRACT.Add(new ArrayOfInt()); NotNecessaryValues_NOCONTRACT[0].Add(new int[] { 1 }); if (GameSettings_Rob_BonusForOners) NotNecessaryValues_NOCONTRACT[0].Add(new int[] { 8 }); columnsControlsClasses = new ArrayOfTypes(); columnsControlsClasses.Add(typeof(DealInfoControl)); columnsControlsClasses.Add(typeof(ShowTextControl_Center)); columnsControlsClasses.Add(typeof(ShowTextControl)); columnsControlsClasses.Add(typeof(SwitcherControl_Orange_Center)); columnsControlsClasses.Add(typeof(ContractSelectControl)); if (GameSettings_Rob_BonusForOners) columnsControlsClasses.Add(typeof(SwitcherControl_Orange)); columnsControlsClasses.Add(typeof(ResultSelectControl)); columnsControlsClasses.Add(typeof(ShowSimpleScore)); arrHeadersNames = new ArrayOfString(); arrHeadersNames.Add("#"); arrHeadersNames.Add("Сда\nющ."); arrHeadersNames.Add("Зона"); arrHeadersNames.Add("Па\nра"); arrHeadersNames.Add("Контракт"); if (GameSettings_Rob_BonusForOners) arrHeadersNames.Add("Онеры"); arrHeadersNames.Add("Рез-т"); arrHeadersNames.Add("Очки"); arrHeadersNames_FULL = new ArrayOfString(); arrHeadersNames_FULL.Add("#"); arrHeadersNames_FULL.Add("Сдающий"); arrHeadersNames_FULL.Add("Зона"); arrHeadersNames_FULL.Add("Пара"); arrHeadersNames_FULL.Add("Контракт"); if (GameSettings_Rob_BonusForOners) arrHeadersNames_FULL.Add("Онеры"); arrHeadersNames_FULL.Add("Рез-т"); arrHeadersNames_FULL.Add("Очки"); arrHeadersWidths = new ArrayOfInt(); if (GameSettings_Rob_BonusForOners) { arrHeadersWidths.Add(new int[] { 22, 33, 51, 26, 69, /*oners*/51, 45, 45 }); } else { arrHeadersWidths.Add(new int[] { 22+8, 33, 51+9, 26+9, 69+8, 45+9, 45+9 }); } CoVa_Dependences = new ArrayOfArrayOfInt(); for (int i = 0; i < arrHeadersNames.Count; i++) CoVa_Dependences.Add(new ArrayOfInt()); CoVa_Dependences[0].Add(new int[] { 5, 6 }); CoVa_Dependences[1].Add(7); CoVa_Dependences[2].Add(0); CoVa_Dependences[3].Add(1); CoVa_Dependences[4].Add(2); if (GameSettings_Rob_BonusForOners) { CoVa_Dependences[5].Add(8); CoVa_Dependences[6].Add(3); CoVa_Dependences[7].Add(new int[] { 4 }); //относительно static } else { CoVa_Dependences[5].Add(3); CoVa_Dependences[6].Add(new int[] { 4 }); //относительно static } }
public void GivenUserHabitatUserRolesWithUPasswordCreatedInHabitat(string username, string password, Table table) { var roles = new ArrayOfString(); roles.AddRange(table.Rows.Select(x => x.Values.First())); ContextExtensions.UtfService.CreateUser(username, password, roles, "*****@*****.**"); cleanupPool.Add(new TestCleanupAction { ActionType = ActionType.RemoveUser, Payload = username }); }
void LOAD_GAME_SETTINGS___4_SimpleIMP() { isRobber = false; isSplit = false; canbeNoContract = true; //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DB !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DB_Deals_TableName = "Deals_Sport"; DB_Deals_ColumnsNames.Add(1, "CardsDistribution"); DB_Deals_ColumnsNames.Add(3, "Pair"); DB_Deals_ColumnsNames.Add(4, "Contract"); DB_Deals_ColumnsNames.Add(5, "Result"); columnsDataClasses = new ArrayOfTypes(); columnsDataClasses.Add(typeof(IntData)); columnsDataClasses.Add(typeof(CardsDistribution)); columnsDataClasses.Add(typeof(ZoneSwitcher)); columnsDataClasses.Add(typeof(PairSwitcher)); columnsDataClasses.Add(typeof(Contract)); columnsDataClasses.Add(typeof(Result)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(QuarterSwitcher)); ID_NAMES.Add(0, "NO"); ID_NAMES.Add(1, "DISTRIBUTION"); ID_NAMES.Add(2, "ZONE"); ID_NAMES.Add(3, "PAIR"); ID_NAMES.Add(4, "CONTRACT"); ID_NAMES.Add(5, "RESULT"); ID_NAMES.Add(6, "SCORE"); ID_NAMES.Add(7, "IMP"); ID_NAMES.Add(8, "DEALER"); REFLECT_Functions.Add(3, new FuncInfo[] { new FuncInfo("NoPairIfNoContract", new string[] { "PAIR", "CONTRACT" }) }); REFLECT_Depends.Add(3, new int[] { 3, 4 }); REFLECT_Functions.Add(0, new FuncInfo[] { new FuncInfo("IntData_Equal", new string[] { "NO", "MDEAL_NO" }) }); REFLECT_Constructors.Add(0, new string[] { "true" }); REFLECT_Depends.Add(0, new int[] { -1 }); REFLECT_Functions.Add(2, new FuncInfo[] { new FuncInfo("DefineSportZone", new string[] { "ZONE", "LINE_NO__REAL", "MATCH_NO__REAL", "MDEAL_NO", GameSettings_3Sports_ZoneSwims.ToString() }) }); REFLECT_Depends.Add(2, new int[] { -1 }); REFLECT_Functions.Add(5, new FuncInfo[] { new FuncInfo("CorrectResultAccordingToContract", new string[] { "RESULT", "CONTRACT", "0" }) }); REFLECT_Depends.Add(5, new int[] { 4 }); REFLECT_Constructors.Add(5, new string[] { "CONTRACT" }); REFLECT_Functions.Add(6, new FuncInfo[] { new FuncInfo("SportScore", new string[] { "SCORE", "PAIR", "ZONE", "CONTRACT", "RESULT" }) }); REFLECT_Depends.Add(6, new int[] { 2, 3, 4, 5 }); REFLECT_Functions.Add(7, new FuncInfo[] { new FuncInfo("ConvertToIMPs", new string[] { "IMP", "SCORE" }) }); REFLECT_Depends.Add(7, new int[] { 6 }); REFLECT_Functions.Add(8, new FuncInfo[] { new FuncInfo("DefineSportDealer", new string[] { "DEALER", "LINE_NO__REAL", "MATCH_NO__REAL", "MDEAL_NO", "FIRST_DEALER", GameSettings_3Sports_ZoneSwims.ToString() }) }); REFLECT_Depends.Add(8, new int[] { -1 }); //new for match: REFLECT_Functions.Add((int)CONST.MATCH_TOTAL_SCORE, new FuncInfo[] { new FuncInfo("SetMatchScore", new string[] { "MATCH_TOTAL_SCORE", "MATCH_NO", "7" }), new FuncInfo("TotalScore_MatchMode", new string[] { "MATCH_TOTAL_SCORE", "MATCH_NO__REAL" }) }); REFLECT_Depends.Add((int)CONST.MATCH_TOTAL_SCORE, new int[] { 7 }); REFLECT_InsideFunctionsList.Add("SetMatchScore"); REFLECT_InsideFunctionsList.Add("TotalScore_MatchMode"); NotNecessaryValues.Add(new int[] { 1 }); ContractColumns.Add(new int[] { 4 }); NotNecessaryValues_NOCONTRACT.Add(new ArrayOfInt()); NotNecessaryValues_NOCONTRACT[0].Add(new int[] { 3 }); columnsControlsClasses = new ArrayOfTypes(); columnsControlsClasses.Add(typeof(DealInfoControl)); columnsControlsClasses.Add(typeof(ShowTextControl_Center)); columnsControlsClasses.Add(typeof(ShowTextControl)); columnsControlsClasses.Add(typeof(SwitcherControl_Orange_Center)); columnsControlsClasses.Add(typeof(ContractSelectControl)); columnsControlsClasses.Add(typeof(ResultSelectControl)); columnsControlsClasses.Add(typeof(ShowSimpleScore)); columnsControlsClasses.Add(typeof(ShowSimpleScore)); arrHeadersNames = new ArrayOfString(); arrHeadersNames.Add("#"); arrHeadersNames.Add("Сда-\nющий"); arrHeadersNames.Add("Зона"); arrHeadersNames.Add("Па\nра"); arrHeadersNames.Add("Контракт"); arrHeadersNames.Add("Рез-т"); arrHeadersNames.Add("Очки"); arrHeadersNames.Add("IMP"); arrHeadersNames_FULL = new ArrayOfString(); arrHeadersNames_FULL.Add("#"); arrHeadersNames_FULL.Add("Сдающий"); arrHeadersNames_FULL.Add("Зона"); arrHeadersNames_FULL.Add("Пара"); arrHeadersNames_FULL.Add("Контракт"); arrHeadersNames_FULL.Add("Рез-т"); arrHeadersNames_FULL.Add("Очки"); arrHeadersNames_FULL.Add("IMP"); arrHeadersWidths = new ArrayOfInt(); arrHeadersWidths.Add(new int[] { 22+8, 42+3, 55+14, 28+14, 71+14, 47+14, 47+14, 30+14 }); CoVa_Dependences = new ArrayOfArrayOfInt(); for (int i = 0; i < arrHeadersNames.Count; i++) CoVa_Dependences.Add(new ArrayOfInt()); CoVa_Dependences[0].Add(new int[] { 0, 1 }); CoVa_Dependences[1].Add(8); CoVa_Dependences[2].Add(2); CoVa_Dependences[3].Add(3); CoVa_Dependences[4].Add(4); CoVa_Dependences[5].Add(5); CoVa_Dependences[6].Add(new int[] { 6 }); //относительно заданной пары CoVa_Dependences[7].Add(new int[] { 7 }); //относительно заданной пары }
public async Task<bool> SetMaakSVCvoorWebSync(ArrayOfString gegevens, string bestandsnaam) { return (await webService.MaakCSVAsync(gegevens, bestandsnaam)).Body.MaakCSVResult; }
/// <summary> /// A method used to do a depth first traverse in a given Provider Hierarchy tree to /// gather provider names and save them in the list of providerNames. /// </summary> /// <param name="node">A parameter represents a provider hierarchy node.</param> /// <param name="providerNames">A parameter represents a list of provider names.</param> public void DepthFirstTraverse(SPProviderHierarchyNode node, ref ArrayOfString providerNames) { providerNames.Add(node.ProviderName); if (node.IsLeaf == true) { return; } foreach (SPProviderHierarchyNode c in node.Children) { this.DepthFirstTraverse(c, ref providerNames); } }
void LOAD_GAME_SETTINGS___2_Sport() { isRobber = false; isSplit = true; canbeNoContract = true; //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DB !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DB_Deals_TableName = "Deals_Double"; DB_Deals_ColumnsNames.Add(1, "CardsDistribution"); DB_Deals_ColumnsNames.Add(5, "Pair1"); DB_Deals_ColumnsNames.Add(6, "Contract1"); DB_Deals_ColumnsNames.Add(7, "Result1"); DB_Deals_ColumnsNames.Add(9, "Pair2"); DB_Deals_ColumnsNames.Add(10, "Contract2"); DB_Deals_ColumnsNames.Add(11, "Result2"); columnsDataClasses = new ArrayOfTypes(); columnsDataClasses.Add(typeof(IntData)); columnsDataClasses.Add(typeof(CardsDistribution)); columnsDataClasses.Add(typeof(IntData)); columnsDataClasses.Add(typeof(IntData)); columnsDataClasses.Add(typeof(ZoneSwitcher)); columnsDataClasses.Add(typeof(PairSwitcher)); columnsDataClasses.Add(typeof(Contract)); columnsDataClasses.Add(typeof(Result)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(PairSwitcher)); columnsDataClasses.Add(typeof(Contract)); columnsDataClasses.Add(typeof(Result)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(QuarterSwitcher)); SUBDEALS = new ArrayOfArrayOfInt(); SUBDEALS.Add(new ArrayOfInt()); SUBDEALS[0].Add(new int[] { 2, 5, 6, 7, 8 }); SUBDEALS.Add(new ArrayOfInt()); SUBDEALS[1].Add(new int[] { 3, 9, 10, 11, 12 }); ID_NAMES.Add(0, "NO"); ID_NAMES.Add(1, "DISTRIBUTION"); ID_NAMES.Add(2, "SUBNO1"); ID_NAMES.Add(3, "SUBNO2"); ID_NAMES.Add(4, "ZONE"); ID_NAMES.Add(5, "PAIR1"); ID_NAMES.Add(6, "CONTRACT1"); ID_NAMES.Add(7, "RESULT1"); ID_NAMES.Add(8, "SCORE1"); ID_NAMES.Add(9, "PAIR2"); ID_NAMES.Add(10, "CONTRACT2"); ID_NAMES.Add(11, "RESULT2"); ID_NAMES.Add(12, "SCORE2"); ID_NAMES.Add(13, "DIFF"); ID_NAMES.Add(14, "IMP"); ID_NAMES.Add(15, "DEALER"); REFLECT_Functions.Add(5, new FuncInfo[] { new FuncInfo("NoPairIfNoContract", new string[] { "PAIR1", "CONTRACT1" }) }); REFLECT_Depends.Add(5, new int[] { 5, 6 }); REFLECT_Functions.Add(9, new FuncInfo[] { new FuncInfo("NoPairIfNoContract", new string[] { "PAIR2", "CONTRACT2" }) }); REFLECT_Depends.Add(9, new int[] { 9, 10 }); REFLECT_Functions.Add(0, new FuncInfo[] { new FuncInfo("IntData_Equal", new string[] { "NO", "MDEAL_NO" }) }); REFLECT_Constructors.Add(0, new string[] { "true" }); REFLECT_Depends.Add(0, new int[] { -1 }); REFLECT_Functions.Add(2, new FuncInfo[] { new FuncInfo("IntData_Equal", new string[] { "SUBNO1", "0" }) }); REFLECT_Constructors.Add(2, new string[] { "true" }); REFLECT_Depends.Add(2, new int[] { -1 }); REFLECT_Functions.Add(3, new FuncInfo[] { new FuncInfo("IntData_Equal", new string[] { "SUBNO2", "1" }) }); REFLECT_Constructors.Add(3, new string[] { "true" }); REFLECT_Depends.Add(3, new int[] { -2 }); REFLECT_Functions.Add(4, new FuncInfo[] { new FuncInfo("DefineSportZone", new string[] { "ZONE", "LINE_NO__REAL", "MATCH_NO__REAL", "MDEAL_NO", GameSettings_3Sports_ZoneSwims.ToString() }) }); REFLECT_Depends.Add(4, new int[] { -1 }); REFLECT_Functions.Add(7, new FuncInfo[] { new FuncInfo("CorrectResultAccordingToContract", new string[] { "RESULT1", "CONTRACT1", "0" }) }); REFLECT_Depends.Add(7, new int[] { 6 }); REFLECT_Constructors.Add(7, new string[] { "CONTRACT1" }); REFLECT_Functions.Add(8, new FuncInfo[] { new FuncInfo("SportScore", new string[] { "SCORE1", "PAIR1", "ZONE", "CONTRACT1", "RESULT1" }) }); REFLECT_Depends.Add(8, new int[] { 4, 5, 6, 7 }); REFLECT_Functions.Add(11, new FuncInfo[] { new FuncInfo("CorrectResultAccordingToContract", new string[] { "RESULT2", "CONTRACT2", "0" }) }); REFLECT_Depends.Add(11, new int[] { 10 }); REFLECT_Constructors.Add(11, new string[] { "CONTRACT2" }); REFLECT_Functions.Add(12, new FuncInfo[] { new FuncInfo("SportScoreInvert", new string[] { "SCORE2", "PAIR2", "ZONE", "CONTRACT2", "RESULT2" }) }); REFLECT_Depends.Add(12, new int[] { 4, 9, 10, 11 }); REFLECT_Functions.Add(13, new FuncInfo[] { new FuncInfo("ScoreSumm", new string[] { "DIFF", "SCORE1", "SCORE2" }) }); REFLECT_Depends.Add(13, new int[] { 8, 12 }); REFLECT_Functions.Add(14, new FuncInfo[] { new FuncInfo("ConvertToIMPs", new string[] { "IMP", "DIFF" }) }); REFLECT_Depends.Add(14, new int[] { 13 }); REFLECT_Functions.Add(15, new FuncInfo[] { new FuncInfo("DefineSportDealer", new string[] { "DEALER", "LINE_NO__REAL", "MATCH_NO__REAL", "MDEAL_NO", "FIRST_DEALER", GameSettings_3Sports_ZoneSwims.ToString() }) }); REFLECT_Depends.Add(15, new int[] { -1 }); //new for match: REFLECT_Functions.Add((int)CONST.MATCH_TOTAL_SCORE, new FuncInfo[] { new FuncInfo("SetMatchScore", new string[] { "MATCH_TOTAL_SCORE", "MATCH_NO", "14" }), new FuncInfo("TotalScore_MatchMode", new string[] { "MATCH_TOTAL_SCORE", "MATCH_NO__REAL" }) }); REFLECT_Depends.Add((int)CONST.MATCH_TOTAL_SCORE, new int[] { 14 }); REFLECT_InsideFunctionsList.Add("SetMatchScore"); REFLECT_InsideFunctionsList.Add("TotalScore_MatchMode"); NotNecessaryValues.Add(new int[] { 1, 13, 14 }); ContractColumns.Add(new int[] { 6, 10 }); NotNecessaryValues_NOCONTRACT.Add(new ArrayOfInt()); NotNecessaryValues_NOCONTRACT.Add(new ArrayOfInt()); NotNecessaryValues_NOCONTRACT[0].Add(new int[] { 5 }); NotNecessaryValues_NOCONTRACT[1].Add(new int[] { 9 }); columnsControlsClasses = new ArrayOfTypes(); columnsControlsClasses.Add(typeof(DealInfoControl_split)); columnsControlsClasses.Add(typeof(ShowTextControl_Center)); columnsControlsClasses.Add(typeof(ShowTextControl_Center)); columnsControlsClasses.Add(typeof(ShowTextControl)); columnsControlsClasses.Add(typeof(SwitcherControl_Orange_Center)); columnsControlsClasses.Add(typeof(ContractSelectControl)); columnsControlsClasses.Add(typeof(ResultSelectControl)); columnsControlsClasses.Add(typeof(ShowSimpleScore)); columnsControlsClasses.Add(typeof(ShowSimpleScore)); columnsControlsClasses.Add(typeof(ShowSimpleScore)); arrHeadersNames = new ArrayOfString(); arrHeadersNames.Add("#"); arrHeadersNames.Add("Ст\nол"); arrHeadersNames.Add("Сда\nющ."); arrHeadersNames.Add("Зона"); arrHeadersNames.Add("Па\nра"); arrHeadersNames.Add("Контракт"); arrHeadersNames.Add("Рез-т"); arrHeadersNames.Add("Очки"); arrHeadersNames.Add("Раз-\nница"); arrHeadersNames.Add("IMP"); arrHeadersNames_FULL = new ArrayOfString(); arrHeadersNames_FULL.Add("#"); arrHeadersNames_FULL.Add("Стол"); arrHeadersNames_FULL.Add("Сдающий"); arrHeadersNames_FULL.Add("Зона"); arrHeadersNames_FULL.Add("Пара"); arrHeadersNames_FULL.Add("Контракт"); arrHeadersNames_FULL.Add("Рез-т"); arrHeadersNames_FULL.Add("Очки"); arrHeadersNames_FULL.Add("Разница"); arrHeadersNames_FULL.Add("IMP"); // Какие контролы разделены? SUBDEALS_CONTROLS_ISSPLIT = new ArrayList(); SUBDEALS_CONTROLS_ISSPLIT.Add(false); SUBDEALS_CONTROLS_ISSPLIT.Add(true); SUBDEALS_CONTROLS_ISSPLIT.Add(false); SUBDEALS_CONTROLS_ISSPLIT.Add(false); SUBDEALS_CONTROLS_ISSPLIT.Add(true); SUBDEALS_CONTROLS_ISSPLIT.Add(true); SUBDEALS_CONTROLS_ISSPLIT.Add(true); SUBDEALS_CONTROLS_ISSPLIT.Add(true); SUBDEALS_CONTROLS_ISSPLIT.Add(false); SUBDEALS_CONTROLS_ISSPLIT.Add(false); arrHeadersWidths = new ArrayOfInt(); arrHeadersWidths.Add(new int[] { 22+4, 22, 33, 51+7, 26+7, 69+6, 45+6, 45+7, 45+7, 28+6 }); CoVa_Dependences = new ArrayOfArrayOfInt(); for (int i = 0; i < arrHeadersNames.Count; i++) CoVa_Dependences.Add(new ArrayOfInt()); CoVa_Dependences[0].Add(new int[] { 0, 1 }); CoVa_Dependences[2].Add(15); CoVa_Dependences[3].Add(4); CoVa_Dependences[8].Add(new int[] { 13 }); //относительно static CoVa_Dependences[9].Add(new int[] { 14 }); //относительно static CoVa_Dependences_SPLIT = new ArrayOfArrayOfInt(); for (int i = 0; i < arrHeadersNames.Count; i++) CoVa_Dependences_SPLIT.Add(new ArrayOfInt()); CoVa_Dependences_SPLIT[1].Add(new int[] { 2, 3 }); CoVa_Dependences_SPLIT[4].Add(new int[] { 5, 9 }); CoVa_Dependences_SPLIT[5].Add(new int[] { 6, 10 }); CoVa_Dependences_SPLIT[6].Add(new int[] { 7, 11 }); CoVa_Dependences_SPLIT[7].Add(new int[] { 8, 12 }); //относительно static (было 5,9,8,12) }
protected void RGrid_EndUserList_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == "Del") { string AutoID = Convert.ToString(e.CommandArgument); bool isDelete = false; Model.Log logModel = new Model.Log(); logModel.OperationItem = "删除终端用户"; logModel.Operator = user.UserInfo.UserID; logModel.OperationTime = DateTime.Now; Model.EndUser euModel = eu.GetModel(long.Parse(AutoID)); try { if (euModel != null) { logModel.OperationDetail = "用户姓名:" + euModel.EndUserName + " - STB号:" + euModel.SimCardNo + " - 身份:" + euModel.Identities; using (MongoDBServiceSoapClient mg = new MongoDBServiceSoapClient()) { string rtStr = ""; bool isDeleteMg = true; if (mg.SelectEnduserBySimCardNo(euModel.SimCardNo, out rtStr) != null) { isDeleteMg = false; isDeleteMg = mg.DeleteEnduser(euModel.SimCardNo, out rtStr); } if (isDeleteMg) { isDelete = eu.Delete(long.Parse(AutoID)); } logModel.Memo += rtStr; } } } catch (Exception ex) { logModel.Memo = "异常:" + ex.Message; } finally { if (euModel != null) { log.Add(logModel); if (isDelete) { List<Model.EndUser> endUserList = (List<Model.EndUser>)ViewState["EndUserList"]; endUserList.RemoveAll(rt => rt.AutoID == long.Parse(AutoID)); RGrid_EndUserList.DataSource = endUserList; RGrid_EndUserList.Rebind(); RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cc1", "OpenAlert('恭喜用户删除成功。');", true); } else { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cc2", "OpenAlert('抱歉!用户删除失败。');", true); } } else { List<Model.EndUser> endUserList = (List<Model.EndUser>)ViewState["EndUserList"]; endUserList.RemoveAll(rt => rt.AutoID == long.Parse(AutoID)); RGrid_EndUserList.DataSource = endUserList; RGrid_EndUserList.DataBind(); ViewState["EndUserList"] = endUserList; RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cc2", "OpenAlert('抱歉!用户删除失败。该用户已不存在!!');", true); } } } if (e.CommandName == "Sync") { string AutoID = Convert.ToString(e.CommandArgument); bool isSyncMg = false; Model.Log logModel = new Model.Log(); logModel.OperationItem = "同步终端用户"; logModel.Operator = user.UserInfo.UserID; logModel.OperationTime = DateTime.Now; Model.EndUser euModel = eu.GetModel(long.Parse(AutoID)); try { if (euModel != null) { logModel.OperationDetail = "用户姓名:" + euModel.EndUserName + " - STB号:" + euModel.SimCardNo + " - 身份:" + euModel.Identities; MongoDBService.EndUser dc = new MongoDBService.EndUser(); { dc.AutoID = euModel.AutoID.ToString(); dc.EnduserName = euModel.EndUserName; string[] identityArr = euModel.Identities.Split('|'); ArrayOfString aof = new ArrayOfString(); foreach (string id in identityArr) { if (id.Equals("")) { continue; } aof.Add(id); } dc.Identities = aof; dc.IsValid = euModel.IsValid; dc.LastModifyTime = euModel.LastModifyTime; dc.SimCardNo = euModel.SimCardNo; using (MongoDBServiceSoapClient mg = new MongoDBServiceSoapClient()) { string rtStr = ""; if (mg.SelectEnduserBySimCardNo(euModel.SimCardNo, out rtStr) != null) { isSyncMg = mg.UpdateEnduser(dc, out rtStr); } else { isSyncMg = mg.InsertEnduser(dc, out rtStr); } logModel.Memo += rtStr; } } } } catch (Exception ex) { logModel.Memo = "异常:" + ex.Message; } finally { if (euModel != null) { log.Add(logModel); if (isSyncMg) { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cc1", "OpenAlert('恭喜用户同步成功。');", true); } else { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cc2", "OpenAlert('抱歉!用户同步失败。');", true); } } else { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cc2", "OpenAlert('抱歉!用户同步失败。该用户本地已不存在!!');", true); } } } }
protected void SubmitBtn_Click(object sender, EventArgs e) { if (RCB_Identity.CheckedItems.Count == 0) { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "c1", "OpenAlert('身份选择不能为空!');", true); return; } RadTreeView regionTreeView = RadDropDownTree1.Controls[0] as RadTreeView; if (regionTreeView.SelectedNodes.Count==0) { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "c1", "OpenAlert('区域选择不能为空!');", true); return; } if (RTB_Name.Text.Trim().Equals("")) { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "c1", "OpenAlert('用户姓名不能为空!');", true); return; } if (RTB_SIM.Text.Trim().Equals("")) { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "c1", "OpenAlert('STB号不能为空!');", true); return; } Model.Log logModel = new Model.Log(); logModel.OperationItem = "添加终端用户"; logModel.OperationTime = DateTime.Now; logModel.Operator = user.UserInfo.UserID; logModel.Memo = ""; Model.EndUser euModel = new Model.EndUser(); euModel.EndUserName = RTB_Name.Text; euModel.SimCardNo = RTB_SIM.Text; euModel.LastModifyTime = DateTime.Now; euModel.IsValid = true; StringBuilder sb = new StringBuilder(); foreach (RadComboBoxItem rcbi in RCB_Identity.CheckedItems) { sb.Append("|"+rcbi.Value + "|"); } sb.Append("|" + regionTreeView.SelectedValue + "|"); string identityStr = sb.ToString(); logModel.OperationDetail = "姓名:"+RTB_Name.Text+"SIM:"+RTB_SIM.Text+"身份&区域:"+identityStr; euModel.Identities = identityStr; long autoid = 0; try { autoid = eu.Add(euModel); if (autoid > 0) { using (MongoDBServiceSoapClient mg = new MongoDBServiceSoapClient()) { MongoDBService.EndUser dc = new MongoDBService.EndUser(); bool IsAddMg = true; string rtStr = ""; if (mg.SelectEnduserBySimCardNo(euModel.SimCardNo, out rtStr) == null) { IsAddMg = false; dc.AutoID = autoid.ToString(); dc.EnduserName = euModel.EndUserName; string[] identityArr = euModel.Identities.Split('|'); ArrayOfString aof = new ArrayOfString(); foreach (string id in identityArr) { if (id.Trim().Equals("")) { continue; } aof.Add(id); } dc.Identities = aof; dc.IsValid = true; dc.LastModifyTime = euModel.LastModifyTime; dc.SimCardNo = euModel.SimCardNo; IsAddMg = mg.InsertEnduser(dc, out rtStr); } if (!IsAddMg) { eu.Delete(autoid); autoid = 0; } logModel.Memo += rtStr; } } } catch (Exception ex) { autoid = 0; logModel.Memo += ex.Message; } finally { log.Add(logModel); if (autoid > 0) { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "c", "OpenAlert('恭喜!用户添加成功!');", true); } else { RadScriptManager.RegisterStartupScript(this.Page, this.GetType(), "c", "OpenAlert('抱歉!用户添加失败!');", true); } } }
void LOAD_GAME_SETTINGS___3_Compensat() { isRobber = false; isSplit = false; canbeNoContract = true; // ОПЦИИ GameSettings_Comp_Type = (BridgeGameScoring.TypeOfCompensation)(GameSettings_Options & 3); //2 bits GameSettings_Comp_10CardsIs2Fits = ((GameSettings_Options & 4) > 0); //3rd bit GameSettings_Comp_LessCompFor2Fits23PC = ((GameSettings_Options & 8) > 0); //4th bit // Скрыть ли сдающего в меню? if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) hide_dealer_in_menu = true; else hide_dealer_in_menu = false; //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DB !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DB_Deals_TableName = "Deals_Sport"; DB_Deals_ColumnsNames.Add(1, "CardsDistribution"); DB_Deals_ColumnsNames.Add(3, "Pair"); DB_Deals_ColumnsNames.Add(4, "Contract"); DB_Deals_ColumnsNames.Add(5, "Result"); DB_Deals_ColumnsNames.Add(7, "Figures"); if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { DB_Deals_ColumnsNames.Add(12, "Fits"); DB_Deals_ColumnsNames.Add(13, "StrongestPair"); } columnsDataClasses = new ArrayOfTypes(); columnsDataClasses.Add(typeof(IntData)); columnsDataClasses.Add(typeof(CardsDistribution)); columnsDataClasses.Add(typeof(ZoneSwitcher)); columnsDataClasses.Add(typeof(PairSwitcher)); columnsDataClasses.Add(typeof(Contract)); columnsDataClasses.Add(typeof(Result)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(IntData)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(SimpleScore)); columnsDataClasses.Add(typeof(QuarterSwitcher)); if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { columnsDataClasses.Add(typeof(FitsSwitcher)); columnsDataClasses.Add(typeof(BoolData)); } ID_NAMES.Add(0, "NO"); ID_NAMES.Add(1, "DISTRIBUTION"); ID_NAMES.Add(2, "ZONE"); ID_NAMES.Add(3, "PAIR"); ID_NAMES.Add(4, "CONTRACT"); ID_NAMES.Add(5, "RESULT"); ID_NAMES.Add(6, "SCORE"); ID_NAMES.Add(7, "FIG"); ID_NAMES.Add(8, "COMPENS"); ID_NAMES.Add(9, "DIFF"); ID_NAMES.Add(10, "IMP"); ID_NAMES.Add(11, "DEALER"); if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { ID_NAMES.Add(12, "FITS"); ID_NAMES.Add(13, "STRONGEST"); } REFLECT_Functions.Add(3, new FuncInfo[] { new FuncInfo("NoPairIfNoContract", new string[] { "PAIR", "CONTRACT" }) }); REFLECT_Depends.Add(3, new int[] { 3, 4 }); REFLECT_Functions.Add(0, new FuncInfo[] { new FuncInfo("IntData_Equal", new string[] { "NO", "MDEAL_NO" }) }); REFLECT_Constructors.Add(0, new string[] { "true" }); REFLECT_Depends.Add(0, new int[] { -1 }); REFLECT_Functions.Add(2, new FuncInfo[] { new FuncInfo("DefineSportZone", new string[] { "ZONE", "LINE_NO__REAL", "MATCH_NO__REAL", "MDEAL_NO", GameSettings_3Sports_ZoneSwims.ToString() }) }); REFLECT_Depends.Add(2, new int[] { -1 }); REFLECT_Functions.Add(5, new FuncInfo[] { new FuncInfo("CorrectResultAccordingToContract", new string[] { "RESULT", "CONTRACT", "0" }) }); REFLECT_Depends.Add(5, new int[] { 4 }); REFLECT_Constructors.Add(5, new string[] { "CONTRACT" }); REFLECT_Functions.Add(6, new FuncInfo[] { new FuncInfo("SportScore", new string[] { "SCORE", "PAIR", "ZONE", "CONTRACT", "RESULT" }) }); REFLECT_Depends.Add(6, new int[] { 2, 3, 4, 5 }); //fig REFLECT_Functions.Add(7, new FuncInfo[] { new FuncInfo("FiguresPoints", new string[] { "FIG", "DISTRIBUTION", "TRUE", /*not use*/ "PAIR" }) }); REFLECT_Depends.Add(7, new int[] { 7, 1 }); REFLECT_Constructors.Add(7, new string[] { "true", "0", "true", "40" }); if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { // strongest REFLECT_Functions.Add(13, new FuncInfo[] { new FuncInfo("WhoIsStrongest20", new string[] { "STRONGEST", "FIG", "DISTRIBUTION", "LOADING_FROM_DB" }) }); REFLECT_Depends.Add(13, new int[] { 1, 7 }); //fits REFLECT_Functions.Add(12, new FuncInfo[] { new FuncInfo("FitsPoints", new string[] { "FITS", "DISTRIBUTION", (GameSettings_Comp_10CardsIs2Fits ? "TRUE" : "FALSE") }) }); REFLECT_Depends.Add(12, new int[] { 12, 1 }); } if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { //comp with fits REFLECT_Functions.Add(8, new FuncInfo[] { new FuncInfo("GetCompensation_WithFits", new string[] { "COMPENS", "DISTRIBUTION", "FIG", "ZONE", "TRUE", /*not use*/"PAIR", /* ||||| */ "FITS", "STRONGEST", (GameSettings_Comp_10CardsIs2Fits ? "TRUE" : "FALSE"), (GameSettings_Comp_LessCompFor2Fits23PC ? "TRUE" : "FALSE") }) }); REFLECT_Depends.Add(8, new int[] { 7, 2, 1, 12, 13 }); } else { //comp REFLECT_Functions.Add(8, new FuncInfo[] { new FuncInfo("GetCompensation", new string[] { "COMPENS", "DISTRIBUTION", "FIG", "ZONE", "TRUE", /*not use*/"PAIR", ((int)GameSettings_Comp_Type).ToString() }) }); REFLECT_Depends.Add(8, new int[] { 7, 2, 1 }); } REFLECT_Functions.Add(9, new FuncInfo[] { new FuncInfo("ScoreSumm", new string[] { "DIFF", "SCORE", "COMPENS" }) }); REFLECT_Depends.Add(9, new int[] { 6, 8 }); REFLECT_Functions.Add(10, new FuncInfo[] { new FuncInfo("ConvertToIMPs", new string[] { "IMP", "DIFF" }) }); REFLECT_Depends.Add(10, new int[] { 9 }); REFLECT_Functions.Add(11, new FuncInfo[] { new FuncInfo("DefineSportDealer", new string[] { "DEALER", "LINE_NO__REAL", "MATCH_NO__REAL", "MDEAL_NO", "FIRST_DEALER", GameSettings_3Sports_ZoneSwims.ToString() }) }); REFLECT_Depends.Add(11, new int[] { -1 }); //new for match: REFLECT_Functions.Add((int)CONST.MATCH_TOTAL_SCORE, new FuncInfo[] { new FuncInfo("SetMatchScore", new string[] { "MATCH_TOTAL_SCORE", "MATCH_NO", "10" }), new FuncInfo("TotalScore_MatchMode", new string[] { "MATCH_TOTAL_SCORE", "MATCH_NO__REAL" }) }); REFLECT_Depends.Add((int)CONST.MATCH_TOTAL_SCORE, new int[] { 10 }); REFLECT_InsideFunctionsList.Add("SetMatchScore"); REFLECT_InsideFunctionsList.Add("TotalScore_MatchMode"); NotNecessaryValues.Add(new int[] { 1 }); if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { NotNecessaryValues.Add(new int[] { 13 }); //!!!!!!!!!!! указать сильную сторону все-таки обязательно, если фигур=20 !!!!!!!!!!!! } ContractColumns.Add(new int[] { 4 }); NotNecessaryValues_NOCONTRACT.Add(new ArrayOfInt()); NotNecessaryValues_NOCONTRACT[0].Add(new int[] { 3 }); columnsControlsClasses = new ArrayOfTypes(); columnsControlsClasses.Add(typeof(DealInfoControl)); if (!hide_dealer_in_menu) { columnsControlsClasses.Add(typeof(ShowTextControl_Center)); //1... } columnsControlsClasses.Add(typeof(ShowTextControl)); columnsControlsClasses.Add(typeof(SwitcherControl_Orange)); columnsControlsClasses.Add(typeof(ContractSelectControl)); columnsControlsClasses.Add(typeof(ResultSelectControl)); columnsControlsClasses.Add(typeof(ShowSimpleScore)); columnsControlsClasses.Add(typeof(TextBoxInTable)); //6 if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { columnsControlsClasses.Add(typeof(SwitcherControl_Orange)); //7 } columnsControlsClasses.Add(typeof(ShowSimpleScore)); //7-8 columnsControlsClasses.Add(typeof(ShowSimpleScore)); //8-9 columnsControlsClasses.Add(typeof(ShowSimpleScore)); //9-10 arrHeadersNames = new ArrayOfString(); arrHeadersNames.Add("#"); if (!hide_dealer_in_menu) { arrHeadersNames.Add("Сда\nющ."); } arrHeadersNames.Add("Зона"); arrHeadersNames.Add("Па\nра"); arrHeadersNames.Add("Контракт"); arrHeadersNames.Add("Рез-т"); arrHeadersNames.Add("Очки"); arrHeadersNames.Add("Фи\nгур"); //6 if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { arrHeadersNames.Add("Фи\nты"); //7 } arrHeadersNames.Add("Комп."); //7-8 arrHeadersNames.Add("Раз-\nница"); //8-9 arrHeadersNames.Add("IMP"); //9-10 arrHeadersNames_FULL = new ArrayOfString(); arrHeadersNames_FULL.Add("#"); if (!hide_dealer_in_menu) { arrHeadersNames_FULL.Add("Сдающий"); } arrHeadersNames_FULL.Add("Зона"); arrHeadersNames_FULL.Add("Пара"); arrHeadersNames_FULL.Add("Контракт"); arrHeadersNames_FULL.Add("Рез-т"); arrHeadersNames_FULL.Add("Очки"); arrHeadersNames_FULL.Add("Фигуры (NS)"); //6 if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { arrHeadersNames_FULL.Add("Фиты"); //7 } arrHeadersNames_FULL.Add("Компенсация"); //7-8 arrHeadersNames_FULL.Add("Разница"); //8-9 arrHeadersNames_FULL.Add("IMP"); //9-10 arrHeadersWidths = new ArrayOfInt(); arrHeadersWidths.Add(22); if (!hide_dealer_in_menu) { arrHeadersWidths.Add(33); } arrHeadersWidths.Add(new int[] { 51, 26, 69, 45, 45, 26 }); if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) arrHeadersWidths.Add(25); arrHeadersWidths.Add(new int[] { 45, 45, 28 }); int hidden_dealer_offset = (!hide_dealer_in_menu) ? 1 : 0; //сдвиг индексов на 1 (после #), если сдающего все-таки показывать CoVa_Dependences = new ArrayOfArrayOfInt(); for (int i = 0; i < arrHeadersNames.Count; i++) CoVa_Dependences.Add(new ArrayOfInt()); if (hide_dealer_in_menu) { CoVa_Dependences[0].Add(new int[] { 0, 1, 11 }); } else { CoVa_Dependences[0].Add(new int[] { 0, 1 }); CoVa_Dependences[1].Add(11); } CoVa_Dependences[1 + hidden_dealer_offset].Add(2); CoVa_Dependences[2 + hidden_dealer_offset].Add(3); CoVa_Dependences[3 + hidden_dealer_offset].Add(4); CoVa_Dependences[4 + hidden_dealer_offset].Add(5); CoVa_Dependences[5 + hidden_dealer_offset].Add(new int[] { 6 }); //относительно static CoVa_Dependences[6 + hidden_dealer_offset].Add(7); if (GameSettings_Comp_Type == BridgeGameScoring.TypeOfCompensation.Europe) { CoVa_Dependences[7 + hidden_dealer_offset].Add(new int[] { 12 }); // относительно СИЛЬНОЙ пары, так что ПОХУЙ // CoVa_Dependences[8 + hidden_dealer_offset].Add(new int[] { 8 }); //относительно static CoVa_Dependences[9 + hidden_dealer_offset].Add(new int[] { 9 }); //относительно static CoVa_Dependences[10 + hidden_dealer_offset].Add(new int[] { 10 }); //относительно static } else { CoVa_Dependences[7 + hidden_dealer_offset].Add(new int[] { 8 }); //относительно static CoVa_Dependences[8 + hidden_dealer_offset].Add(new int[] { 9 }); //относительно static CoVa_Dependences[9 + hidden_dealer_offset].Add(new int[] { 10 }); //относительно static } }