protected col calcStdDiv(ref col[,] img) { col ret = new col(); ret.R = 0; ret.G = 0; ret.B = 0; //1. Calc Mean col mean = calcMean(ref img); //2. subtract the Mean and square the result. //3. Then work out the mean of those squared differences. for (int i = 0; i < img.GetLength(0); i++) { for (int j = 0; j < img.GetLength(1); j++) { if (img[i, j].R == img[i, j].R) ret.R += (img[i, j].R - mean.R) * (img[i, j].R - mean.R); if (img[i, j].G == img[i, j].G) ret.G += (img[i, j].G - mean.G) * (img[i, j].G - mean.G); if (img[i, j].B == img[i, j].B) ret.B += (img[i, j].B - mean.B) * (img[i, j].B - mean.B); } } ret.R /= (img.GetLength(0) * img.GetLength(1)); ret.G /= (img.GetLength(0) * img.GetLength(1)); ret.B /= (img.GetLength(0) * img.GetLength(1)); //4. Take the square root of that and we are done! ret.R = (float)Math.Sqrt(ret.R); ret.G = (float)Math.Sqrt(ret.G); ret.B = (float)Math.Sqrt(ret.B); return ret; }
protected col calcMean(ref col[,] img) { col ret = new col(); ret.R = 0; ret.G = 0; ret.B = 0; for (int i = 0; i < img.GetLength(0); i++) { for (int j = 0; j < img.GetLength(1); j++) { if (img[i, j].R == img[i, j].R) { ret.R += img[i, j].R; } if (img[i, j].G == img[i, j].G) { ret.G += img[i, j].G; } if (img[i, j].B == img[i, j].B) { ret.B += img[i, j].B; } } } ret.R /= (img.GetLength(0) * img.GetLength(1)); ret.G /= (img.GetLength(0) * img.GetLength(1)); ret.B /= (img.GetLength(0) * img.GetLength(1)); return(ret); }
public void DrawArrays(OpenTK.Graphics.OpenGL.PrimitiveType pt, int st, int len) { int sf = sizeof(float); float[] ab = buffers[activeBuffer]; bool ev = enables.ContainsKey(ArrayCap.VertexArray); bool ec = enables.ContainsKey(ArrayCap.ColorArray); bool et = enables.ContainsKey(ArrayCap.TextureCoordArray); int vi = ev ? pointers[ArrayCap.VertexArray].offset / sf : 0; int ci = ec ? pointers[ArrayCap.ColorArray].offset / sf : 0; int ti = et ? pointers[ArrayCap.TextureCoordArray].offset / sf : 0; int vs = ev ? pointers[ArrayCap.VertexArray].stride / sf : 0; int cs = ec ? pointers[ArrayCap.ColorArray].stride / sf : 0; int ts = et ? pointers[ArrayCap.TextureCoordArray].stride / sf : 0; vi += vs * st; ci += cs * st; ti += ts * st; List <rend> data = new List <rend>(); for (int i = 0; i < len; i++) // index only for counting loop. { ver v = null; col c = null; tex t = null; if (ev) { v = new ver() { x = ab[vi], y = ab[vi + 1] }; vi += vs; } if (ec) { c = new col() { a = ab[ci], r = ab[ci + 1], g = ab[ci + 2], b = ab[ci + 3] }; ci += cs; } if (et) { t = new tex() { u = ab[ti], v = ab[ti + 1] }; ti += ts; } data.Add(new rend() { v = v, c = c, t = t }); } renderlist.Add(new pol() { pt = pt, data = data.ToArray() }); }
private static void ChangeTurn() { if (Turn == col.Black) { Turn = col.White; } else { Turn = col.Black; } }
private static string PlayerColor(col color) { if (color == col.Black) { return("Black"); } else { return("White"); } }
protected col[,] BitmapToCol(Bitmap img) { col[,] ret = new col[img.Width, img.Height]; for (int i = 0; i < img.Width; i++) { for (int j = 0; j < img.Height; j++) { Color pixel = img.GetPixel(i, j); (ret[i, j]).R = Convert.ToInt16(pixel.R); (ret[i, j]).G = Convert.ToInt16(pixel.G); (ret[i, j]).B = Convert.ToInt16(pixel.B); } } return ret; }
protected float calcDelta(col a, col b, float theta, float alpha) { float dL = a.R - b.R; float v = (float)Math.Sqrt((a.G - b.G) * (a.G - b.G) + (a.B - b.B) * (a.B - b.B)); float dC = crunch(v, alpha); if (Math.Abs(dL) > dC) { return(dL); } return(dC * ((Math.Cos(theta) * (a.G - b.G) + Math.Sin(theta) * (a.B - b.B)) > 0 ? 1 : -1)); }
public Field(Piece newPiece) { if (newPiece != null) { this.pieceLetter = newPiece.LetterDisplay; this.colLetter = newPiece.Color; } else { this.pieceLetter = ' '; } }
public void Insert() { var list = new List <col>(); var col = new col() { title = "测试" + Guid.NewGuid().ToString().Replace("-", ""), description = "这是描述信息", by = "by", url = "www.github.com", likes = 10 }; list.Add(col); MyConnection.InsertOne(col); //MyConnection.InsertMany(list); }
public static void Main() { try { col cl = new col(); cl[0] = 10; cl[1] = 12; cl[2] = 20; for(int i = 0; i < cl.getCount; i++) { Console.WriteLine(cl[i]); } } catch(Exception e) { Console.WriteLine(e.Message); } }
/// <summary> /// Converts ConsoleColor into col (just so I don't have to write out ConsoleColor every time...) /// </summary> /// <param name="color">Col to turn into proper Color</param> /// <returns>ConsoleColor</returns> private static ConsoleColor col2Color(col color) { ConsoleColor c = ConsoleColor.Gray; switch (color) { case col.black: c = ConsoleColor.Black; break; case col.blue: c = ConsoleColor.Blue; break; case col.cyan: c = ConsoleColor.Cyan; break; case col.darkBlue: c = ConsoleColor.DarkBlue; break; case col.darkCyan: c = ConsoleColor.DarkCyan; break; case col.darkGray: c = ConsoleColor.DarkGray; break; case col.darkGreen: c = ConsoleColor.DarkGreen; break; case col.darkMagenta: c = ConsoleColor.DarkMagenta; break; case col.darkRed: c = ConsoleColor.DarkRed; break; case col.darkYellow: c = ConsoleColor.DarkYellow; break; case col.gray: c = ConsoleColor.Gray; break; case col.green: c = ConsoleColor.Green; break; case col.magenta: c = ConsoleColor.Magenta; break; case col.red: c = ConsoleColor.Red; break; case col.white: c = ConsoleColor.White; break; case col.yellow: c = ConsoleColor.Yellow; break; } return(c); }
protected col[,] imgTrans(col[,] sourceEdit, col[,] targetEdit) { col[,] results = sourceEdit; //Deep copy col sourceMean = calcMean(ref sourceEdit); col targetMean = calcMean(ref targetEdit); col sourceSD = calcStdDiv(ref sourceEdit); col targetSD = calcStdDiv(ref targetEdit); //First subtract mean from points for (int i = 0; i < results.GetLength(0); i++) { for (int j = 0; j < results.GetLength(1); j++) { results[i, j].R -= sourceMean.R; results[i, j].G -= sourceMean.G; results[i, j].B -= sourceMean.B; } } //scale the data points comprising the synthetic //image by factors determined by the respective standard deviations for (int i = 0; i < results.GetLength(0); i++) { for (int j = 0; j < results.GetLength(1); j++) { results[i, j].R *= (targetSD.R / sourceSD.R); results[i, j].G *= (targetSD.G / sourceSD.G); results[i, j].B *= (targetSD.B / sourceSD.B); } } //add the averages computed for the photograph for (int i = 0; i < results.GetLength(0); i++) { for (int j = 0; j < results.GetLength(1); j++) { results[i, j].R += targetMean.R; results[i, j].G += targetMean.G; results[i, j].B += targetMean.B; } } return results; }
/// <summary> /// Writes colored line to Console. (With line break.) /// </summary> /// <param name="msg">Message to write</param> /// <param name="color">Color of message (defaults to gray)</param> /// <param name="bgcol">Background color of message (defaults to black)</param> public static void cWL(this string msg, col color = col.gray, col bgcol = col.black) { writel(msg, color, bgcol); }
/// <summary> /// <para>Returns shared folder membership by its folder ID.</para> /// <para>Apps must have full Dropbox access to use this endpoint.</para> /// <para>Warning: This endpoint is in beta and is subject to minor but possibly /// backwards-incompatible changes.</para> /// </summary> /// <param name="sharedFolderId">The ID for the shared folder.</param> /// <param name="actions">Member actions to query.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error /// processing the request; This will contain a <see /// cref="SharedFolderAccessError"/>.</exception> public t.Task<SharedFolderMembers> ListFolderMembersAsync(string sharedFolderId, col.IEnumerable<MemberAction> actions = null) { var listFolderMembersArgs = new ListFolderMembersArgs(sharedFolderId, actions); return this.ListFolderMembersAsync(listFolderMembersArgs); }
/// <summary> /// <para>Returns shared folder metadata by its folder ID.</para> /// <para>Apps must have full Dropbox access to use this endpoint.</para> /// <para>Warning: This endpoint is in beta and is subject to minor but possibly /// backwards-incompatible changes.</para> /// </summary> /// <param name="sharedFolderId">The ID for the shared folder.</param> /// <param name="actions">Folder actions to query.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error /// processing the request; This will contain a <see /// cref="SharedFolderAccessError"/>.</exception> public t.Task<SharedFolderMetadata> GetFolderMetadataAsync(string sharedFolderId, col.IEnumerable<FolderAction> actions = null) { var getMetadataArgs = new GetMetadataArgs(sharedFolderId, actions); return this.GetFolderMetadataAsync(getMetadataArgs); }
/// <summary> /// <para>Begins an asynchronous send to the groups members remove route.</para> /// </summary> /// <param name="group">The group</param> /// <param name="users">The users</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginGroupsMembersRemove(GroupSelector @group, col.IEnumerable<UserSelectorArg> users, sys.AsyncCallback callback, object callbackState = null) { var groupMembersRemoveArg = new GroupMembersRemoveArg(@group, users); return this.BeginGroupsMembersRemove(groupMembersRemoveArg, callback, callbackState); }
/// <summary> /// <para>Revoke a list of device sessions of team members</para> /// </summary> /// <param name="revokeDevices">The revoke devices</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{RevokeDeviceSessionBatchError}">Thrown if /// there is an error processing the request; This will contain a <see /// cref="RevokeDeviceSessionBatchError"/>.</exception> public t.Task<RevokeDeviceSessionBatchResult> DevicesRevokeDeviceSessionBatchAsync(col.IEnumerable<RevokeDeviceSessionArg> revokeDevices) { var revokeDeviceSessionBatchArg = new RevokeDeviceSessionBatchArg(revokeDevices); return this.DevicesRevokeDeviceSessionBatchAsync(revokeDeviceSessionBatchArg); }
/// <summary> /// <para>Begins an asynchronous send to the get account batch route.</para> /// </summary> /// <param name="accountIds">List of user account identifiers. Should not contain any /// duplicate account IDs.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginGetAccountBatch(col.IEnumerable<string> accountIds, sys.AsyncCallback callback, object callbackState = null) { var getAccountBatchArg = new GetAccountBatchArg(accountIds); return this.BeginGetAccountBatch(getAccountBatchArg, callback, callbackState); }
public Bishop(col color) : base(color) { letterDisplay = 'B'; }
/// <summary> /// Build Sheet XML string /// </summary> /// <param name="excelsheet"></param> /// <param name="xmldocument"></param> /// <returns></returns> public string BuildSheetXML(Sheet excelsheet, ref XmlDocument xmldocument, int sharedstringcount = 0) { try { var cells = excelsheet.Cells; var rowstyles = excelsheet.RowStyles; var columnstyles = excelsheet.ColumnStyles; var startRowIndex = cells.Min(x => x.Address.Row); var endRowIndex = cells.Max(x => x.Address.Row); var startColumnIndex = cells.Min(x => x.Address.Column.Index); var endColumnIndex = cells.Max(x => x.Address.Column.Index); var noofRows = endRowIndex - startRowIndex + 1; var noofCols = endColumnIndex - startRowIndex + 1; //sorting by cell index cells = cells.OrderBy(x => x.Address.Row).ThenBy(x => x.Address.Column.Index).ToList(); worksheet worksheet = new worksheet(); worksheet.sheetviews = new sheetViews(); worksheet.sheetFormatPr = new sheetFormatPr() { defaultRowHeight = "15", dyDescent = ".25" }; worksheet.sheetData = new sheetData(); worksheet.sheetData.row = new List <row>(); //add column Styles if (columnstyles.Count > 0) { worksheet.cols = new cols(); worksheet.cols.col = new List <col>(); foreach (var columnstyle in columnstyles) { var col = new col(); col.customWidth = "1"; col.max = col.min = columnstyle.Index.ToString(); col.width = columnstyle.Width.ToString(); worksheet.cols.col.Add(col); } } List <int> addedStyleIds = new List <int>(); int fontId = 0; int fillId = 1; int borderId = 0; // initializing fontid,fillid and borderid int styles = 0; //Gets the Existing XML Nodes/Elements from Style Sheet var fonts = xmldocument.GetElementsByTagName("fonts").FirstOrDefault(); var fills = xmldocument.GetElementsByTagName("fills").FirstOrDefault(); var borders = xmldocument.GetElementsByTagName("borders").FirstOrDefault(); var cellXfs = xmldocument.GetElementsByTagName("cellXfs").FirstOrDefault(); var count = cells.Where(x => null != x.MergeCell).Count(); if (count > 0) { worksheet.mergeCells = new mergeCells() { count = count.ToString() }; worksheet.mergeCells.mergeCell = new List <mergeCell>(); } for (var rowindx = startRowIndex; rowindx <= endRowIndex; rowindx++) { row row = new row(); row.r = rowindx.ToString(); row.spans = startColumnIndex.ToString() + ":" + endColumnIndex.ToString(); row.dyDescent = "0.25"; row.c = new List <c>(); //var rstyle = rowstyles.Where(x => x.Index == rowindx).FirstOrDefault(); //if (null != rstyle) //{ // row.height = rstyle.Height.ToString(); // row.customHeight = "1"; //} for (var colindx = startColumnIndex; colindx <= endColumnIndex; colindx++) { int cellindx = ((rowindx - 1) * columnstyles.Count) + (colindx - 1); var currentcell = cells[cellindx];//.FirstOrDefault(x => x.Address.Row == rowindx && x.Address.Column.Index == colindx); if (null != currentcell) { var index = cellindx + sharedstringcount;// cells.IndexOf(currentcell) + sharedstringcount; //cells.IndexOf(currentcell) var c = currentcell.ToXml(index); if (null != currentcell.Style) { var isAdded = addedStyleIds.Any(x => x == currentcell.Style.StyleId); //Add styles to stylesheet if not added already if (!isAdded) { addedStyleIds.Add(currentcell.Style.StyleId); var fntElem = currentcell.Style.ToFontElement(xmldocument); if (null != fntElem) { fonts.AppendChild(fntElem); fontId++; } var fillElem = currentcell.Style.ToFillElement(xmldocument); if (null != fillElem) { fills.AppendChild(fillElem); fillId++; } var borderElem = currentcell.Style.ToBorderElement(xmldocument); if (null != borderElem) { borders.AppendChild(borderElem); borderId++; } var xfElem = currentcell.Style.ToXFElement(xmldocument, fontId, fillId, borderId); if (null != xfElem) { cellXfs.AppendChild(xfElem); styles++; } } c.s = currentcell.Style.StyleId.ToString(); } if (null != currentcell.MergeCell) { var startaddress = currentcell.ToAddress(); var endaddress = new Cell() { Address = currentcell.MergeCell }.ToAddress(); worksheet.mergeCells.mergeCell.Add(new mergeCell { reference = startaddress + ":" + endaddress }); } row.c.Add(c); } } fonts.Attributes[0].InnerText = (fontId + 1).ToString(); cellXfs.Attributes[0].InnerText = (styles + 1).ToString(); fills.Attributes[0].InnerText = (fillId + 1).ToString(); borders.Attributes[0].InnerText = (borderId + 1).ToString(); if (null != row && row.c.Count > 0) { worksheet.sheetData.row.Add(row); } } worksheet.pageMargins = new pageMargins(); worksheet.dimension = new dimension(); worksheet.dimension.reference = cells[0].ToAddress() + ":" + cells[cells.Count - 1].ToAddress(); var dixt = new Dictionary <string, string>(); dixt.Add("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); //dixt.Add("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); //dixt.Add("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"); string ss = Serialize(worksheet, dixt); ss = ss.Replace("encoding=\"utf-16\"", "encoding=\"UTF-8\" standalone=\"yes\""); return(ss); } catch { throw; } }
public Queen(col color) { Color = color; LetterDisplay = 'Q'; }
/// <summary> /// <para>Begins an asynchronous send to the groups members add route.</para> /// </summary> /// <param name="group">Group to which users will be added.</param> /// <param name="members">List of users to be added to the group.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginGroupsMembersAdd(GroupSelector @group, col.IEnumerable<MemberAccess> members, sys.AsyncCallback callback, object callbackState = null) { var groupMembersAddArg = new GroupMembersAddArg(@group, members); return this.BeginGroupsMembersAdd(groupMembersAddArg, callback, callbackState); }
/// <summary> /// <para>Adds members to a group.</para> /// <para>The members are added immediately. However the granting of group-owned /// resources may take additional time. Use the <see /// cref="Dropbox.Api.Team.Routes.TeamRoutes.GroupsJobStatusGetAsync" /> to determine /// whether this process has completed.</para> /// <para>Permission : Team member management</para> /// </summary> /// <param name="group">Group to which users will be added.</param> /// <param name="members">List of users to be added to the group.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{GroupMembersAddError}">Thrown if there is /// an error processing the request; This will contain a <see /// cref="GroupMembersAddError"/>.</exception> public t.Task<GroupMembersChangeResult> GroupsMembersAddAsync(GroupSelector @group, col.IEnumerable<MemberAccess> members) { var groupMembersAddArg = new GroupMembersAddArg(@group, members); return this.GroupsMembersAddAsync(groupMembersAddArg); }
/// <summary> /// <para>Begins an asynchronous send to the devices revoke device session batch /// route.</para> /// </summary> /// <param name="revokeDevices">The revoke devices</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginDevicesRevokeDeviceSessionBatch(col.IEnumerable<RevokeDeviceSessionArg> revokeDevices, sys.AsyncCallback callback, object callbackState = null) { var revokeDeviceSessionBatchArg = new RevokeDeviceSessionBatchArg(revokeDevices); return this.BeginDevicesRevokeDeviceSessionBatch(revokeDeviceSessionBatchArg, callback, callbackState); }
/// <summary> /// Writes colored string to Console standard out /// </summary> /// <param name="msg">Message to write</param> /// <param name="color">Color of message (defaults to gray)</param> /// <param name="bgcol">Background color of message (defaults to black)</param> public static void coW(this string msg, col color = col.gray, col bgcol = col.black) { owrite(msg, color, bgcol); }
public Field(col col) { this.col = col; }
public Piece(col color) { this.color = color; }
public Knight(col color) : base(color) { letterDisplay = 'N'; }
/// <summary> /// <para>Adds members to a team.</para> /// <para>Permission : Team member management</para> /// <para>A maximum of 20 members can be specified in a single call.</para> /// <para>If no Dropbox account exists with the email address specified, a new Dropbox /// account will be created with the given email address, and that account will be /// invited to the team.</para> /// <para>If a personal Dropbox account exists with the email address specified in the /// call, this call will create a placeholder Dropbox account for the user on the team /// and send an email inviting the user to migrate their existing personal account onto /// the team.</para> /// <para>Team member management apps are required to set an initial given_name and /// surname for a user to use in the team invitation and for 'Perform as team member' /// actions taken on the user before they become 'active'.</para> /// </summary> /// <param name="newMembers">Details of new members to be added to the team.</param> /// <param name="forceAsync">Whether to force the add to happen asynchronously.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> public t.Task<MembersAddLaunch> MembersAddAsync(col.IEnumerable<MemberAddArg> newMembers, bool forceAsync = false) { var membersAddArg = new MembersAddArg(newMembers, forceAsync); return this.MembersAddAsync(membersAddArg); }
public Bishop(col color) { Color = color; LetterDisplay = 'B'; }
/// <summary> /// <para>Begins an asynchronous send to the members get info route.</para> /// </summary> /// <param name="members">List of team members.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginMembersGetInfo(col.IEnumerable<UserSelectorArg> members, sys.AsyncCallback callback, object callbackState = null) { var membersGetInfoArgs = new MembersGetInfoArgs(members); return this.BeginMembersGetInfo(membersGetInfoArgs, callback, callbackState); }
/// <summary> /// <para>Removes members from a group.</para> /// <para>The members are removed immediately. However the revoking of group-owned /// resources may take additional time. Use the <see /// cref="Dropbox.Api.Team.Routes.TeamRoutes.GroupsJobStatusGetAsync" /> to determine /// whether this process has completed.</para> /// <para>Permission : Team member management</para> /// </summary> /// <param name="group">The group</param> /// <param name="users">The users</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{GroupMembersRemoveError}">Thrown if there /// is an error processing the request; This will contain a <see /// cref="GroupMembersRemoveError"/>.</exception> public t.Task<GroupMembersChangeResult> GroupsMembersRemoveAsync(GroupSelector @group, col.IEnumerable<UserSelectorArg> users) { var groupMembersRemoveArg = new GroupMembersRemoveArg(@group, users); return this.GroupsMembersRemoveAsync(groupMembersRemoveArg); }
/// <summary> /// <para>Returns information about multiple team members.</para> /// <para>Permission : Team information</para> /// <para>This endpoint will return an empty member_info item, for IDs (or emails) that /// cannot be matched to a valid team member.</para> /// </summary> /// <param name="members">List of team members.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{MembersGetInfoError}">Thrown if there is /// an error processing the request; This will contain a <see /// cref="MembersGetInfoError"/>.</exception> public t.Task<col.List<MembersGetInfoItem>> MembersGetInfoAsync(col.IEnumerable<UserSelectorArg> members) { var membersGetInfoArgs = new MembersGetInfoArgs(members); return this.MembersGetInfoAsync(membersGetInfoArgs); }
/// <summary> /// <para>Begins an asynchronous send to the get folder metadata route.</para> /// </summary> /// <param name="sharedFolderId">The ID for the shared folder.</param> /// <param name="actions">Folder actions to query.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginGetFolderMetadata(string sharedFolderId, col.IEnumerable<FolderAction> actions = null, sys.AsyncCallback callback = null, object callbackState = null) { var getMetadataArgs = new GetMetadataArgs(sharedFolderId, actions); return this.BeginGetFolderMetadata(getMetadataArgs, callback, callbackState); }
/// <summary> /// <para>Begins an asynchronous send to the linked apps revoke linked app batch /// route.</para> /// </summary> /// <param name="revokeLinkedApp">The revoke linked app</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginLinkedAppsRevokeLinkedAppBatch(col.IEnumerable<RevokeLinkedApiAppArg> revokeLinkedApp, sys.AsyncCallback callback, object callbackState = null) { var revokeLinkedApiAppBatchArg = new RevokeLinkedApiAppBatchArg(revokeLinkedApp); return this.BeginLinkedAppsRevokeLinkedAppBatch(revokeLinkedApiAppBatchArg, callback, callbackState); }
/// <summary> /// <para>Begins an asynchronous send to the list folder members route.</para> /// </summary> /// <param name="sharedFolderId">The ID for the shared folder.</param> /// <param name="actions">Member actions to query.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginListFolderMembers(string sharedFolderId, col.IEnumerable<MemberAction> actions = null, sys.AsyncCallback callback = null, object callbackState = null) { var listFolderMembersArgs = new ListFolderMembersArgs(sharedFolderId, actions); return this.BeginListFolderMembers(listFolderMembersArgs, callback, callbackState); }
set => PutPixel(col, row, value);
/// <summary> /// Writes colored line to Console standard error. (With line break.) /// </summary> /// <param name="msg">Message to write</param> /// <param name="color">Color of message (defaults to gray)</param> /// <param name="bgcol">Background color of message (defaults to black)</param> public static void ewritel(this string msg, col color = col.gray, col bgcol = col.black) { Console.ForegroundColor = col2Color(color); Console.Error.WriteLine(msg); Console.ForegroundColor = ConsoleColor.Gray; }
/// <summary> /// <para>Allows an owner or editor (if the ACL update policy allows) of a shared /// folder to add another member.</para> /// <para>For the new member to get access to all the functionality for this folder, /// you will need to call <see /// cref="Dropbox.Api.Sharing.Routes.SharingRoutes.MountFolderAsync" /> on their /// behalf.</para> /// <para>Warning: This endpoint is in beta and is subject to minor but possibly /// backwards-incompatible changes.</para> /// </summary> /// <param name="sharedFolderId">The ID for the shared folder.</param> /// <param name="members">The intended list of members to add. Added members will /// receive invites to join the shared folder.</param> /// <param name="quiet">Whether added members should be notified via email and device /// notifications of their invite.</param> /// <param name="customMessage">Optional message to display to added members in their /// invitation.</param> /// <returns>The task that represents the asynchronous send operation.</returns> /// <exception cref="Dropbox.Api.ApiException{AddFolderMemberError}">Thrown if there is /// an error processing the request; This will contain a <see /// cref="AddFolderMemberError"/>.</exception> public t.Task AddFolderMemberAsync(string sharedFolderId, col.IEnumerable<AddMember> members, bool quiet = false, string customMessage = null) { var addFolderMemberArg = new AddFolderMemberArg(sharedFolderId, members, quiet, customMessage); return this.AddFolderMemberAsync(addFolderMemberArg); }
/// <summary> /// Writes colored string to Console standard out /// </summary> /// <param name="msg">Message to write</param> /// <param name="color">Color of message (defaults to gray)</param> /// <param name="bgcol">Background color of message (defaults to black)</param> public static void owrite(this string msg, col color = col.gray, col bgcol = col.black) { Console.ForegroundColor = col2Color(color); Console.Out.Write(msg); Console.ForegroundColor = ConsoleColor.Gray; }
/// <summary> /// <para>Revoke a list of linked applications of the team members</para> /// </summary> /// <param name="revokeLinkedApp">The revoke linked app</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{RevokeLinkedAppBatchError}">Thrown if /// there is an error processing the request; This will contain a <see /// cref="RevokeLinkedAppBatchError"/>.</exception> public t.Task<RevokeLinkedAppBatchResult> LinkedAppsRevokeLinkedAppBatchAsync(col.IEnumerable<RevokeLinkedApiAppArg> revokeLinkedApp) { var revokeLinkedApiAppBatchArg = new RevokeLinkedApiAppBatchArg(revokeLinkedApp); return this.LinkedAppsRevokeLinkedAppBatchAsync(revokeLinkedApiAppBatchArg); }
set => Add(col, row, value);
public Castle(col color) { Color = color; LetterDisplay = 'C'; }
/// <summary> /// <para>Get information about multiple user accounts. At most 300 accounts may be /// queried per request.</para> /// </summary> /// <param name="accountIds">List of user account identifiers. Should not contain any /// duplicate account IDs.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error /// processing the request; This will contain a <see /// cref="GetAccountBatchError"/>.</exception> public t.Task<col.List<BasicAccount>> GetAccountBatchAsync(col.IEnumerable<string> accountIds) { var getAccountBatchArg = new GetAccountBatchArg(accountIds); return this.GetAccountBatchAsync(getAccountBatchArg); }
public Castle(col color) : base(color) { letterDisplay = 'C'; }
ref Block8x8 blockRef = ref this.GetBlockReference(col, row);
get => Get(new Point(col, row));
get => GetPixel(col, row);
/// <summary> /// <para>Begins an asynchronous send to the members add route.</para> /// </summary> /// <param name="newMembers">Details of new members to be added to the team.</param> /// <param name="forceAsync">Whether to force the add to happen asynchronously.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginMembersAdd(col.IEnumerable<MemberAddArg> newMembers, bool forceAsync = false, sys.AsyncCallback callback = null, object callbackState = null) { var membersAddArg = new MembersAddArg(newMembers, forceAsync); return this.BeginMembersAdd(membersAddArg, callback, callbackState); }
/// <summary> /// <para>Begins an asynchronous send to the add folder member route.</para> /// </summary> /// <param name="sharedFolderId">The ID for the shared folder.</param> /// <param name="members">The intended list of members to add. Added members will /// receive invites to join the shared folder.</param> /// <param name="quiet">Whether added members should be notified via email and device /// notifications of their invite.</param> /// <param name="customMessage">Optional message to display to added members in their /// invitation.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginAddFolderMember(string sharedFolderId, col.IEnumerable<AddMember> members, bool quiet = false, string customMessage = null, sys.AsyncCallback callback = null, object callbackState = null) { var addFolderMemberArg = new AddFolderMemberArg(sharedFolderId, members, quiet, customMessage); return this.BeginAddFolderMember(addFolderMemberArg, callback, callbackState); }
public King(col color) { Color = color; LetterDisplay = 'K'; }