Questions tagged as 'c#'

1
answer

How do I format values with custom string formats?

I'm developing a chart and would like to put the Y-axis values as shown below: Ihavefoundthatyoucandothisthrough custom strings formats in this way ChartArea.AxisY.LabelStyle.Format = "formato customizado" , but I could not create a f...
asked by 01.04.2015 / 19:44
1
answer

Download txt file with ASP.NET Web Forms including page HTML in file

I am downloading files with ASP.NET Web Forms in the click event of a LinkButton as follows: var file = new FileInfo(filePath); Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(file.N...
asked by 31.03.2015 / 20:06
2
answers

Error in C # when trying to add an inherited component in ToolBox

I'm trying to create a component that inherits from a ComBox. I created the component by following the steps below, the project is available at: link Without any open project > File > New > Project > Class Library (Visual C #)...
asked by 21.07.2015 / 22:40
1
answer

How to read text from a text box in a Word document via C #

I'm using Interop to manipulate a word, through a console application. using Word = Microsoft.Office.Interop.Word; I can extract the byte array, save as Pdf, as image etc, but a relatively simple thing that I'm needing I still can not do....
asked by 17.07.2015 / 18:42
1
answer

Move character up to point in Unity3D

I have a problem, I need my character to move a certain distance when I click the button, until then I can do it. The problem is that when I do, he does not "walk" to the point, he kind of "teleports", and that's not the intention. I need him...
asked by 17.07.2015 / 22:51
1
answer

How to know the dimensions of an image that is in byte array or base64?

I have the following code: var binario = _documentoWord.Content.EnhMetaFileBits; string img64Bytes = ""; var base64 = Convert.ToBase64String(binario, 0, binario.Length); byte[] imageBytesBase64 = Convert.FromBase64String(base64); MemoryStrea...
asked by 24.07.2015 / 13:35
1
answer

Wrong string conversion for double

I have in my app.config the following code: <add key="FolhaA4" value="0.168056514197457, 6.36413684210526"/> And here's the method to get these key values: private double[] ObterValoresConfiguracao(string chave) { Mana...
asked by 23.07.2015 / 21:42
1
answer

Search SQL database in a text saved by TinyMCE

I'm using TinyMCE for text editing on my site. When I search for a word with an accent. Eg: análise , the query does not count because the bank is saved in HTML an&aacutelise . I'm using ASP.Net MVC with SQL Server.     
asked by 17.08.2015 / 17:21
1
answer

Use the same click event for several buttons in C # WPF

I'm doing a C # project using WPF, which has many buttons. Is there any way to identify which button was clicked so that you do not need to click_event for each Button?     
asked by 19.10.2015 / 18:47
1
answer

How can I make an MVC lambda filter

I'm making a simple filter, and display the data on the page. The code I'm using is this: mt.ModelItens = db.Forecast .Where(f => (f.CanalForecast.area == idArea && f.CanalForecast.despesa == idDespesa))...
asked by 15.10.2015 / 16:52