c#-3.0

x-axis label is not shown at right place in ms chart using windows application

匆匆过客 提交于 2019-12-25 02:18:45
问题 problem: X-axis label is not show at the right place. i want below the x-axis and a dotted line to touch the x-axis label from every column bar. Please give ur comments. 回答1: I presume you want the X Axis labels to be placed below the chart area and not dangling in the center whereby you have the crossing set. In that case you can set it via Chart1.ChartAreas[0].AxisX.IsMarksNextToAxis = false; This should show the labels in the bottom position and not at the crossing. 来源: https:/

Trying to determine best design for this workflow - c# - 3.0

雨燕双飞 提交于 2019-12-25 01:42:43
问题 Input Server - files of type jpg,tif, raw,png, mov come in via FTP Each file needs to be watermarked, if applicable, and meta data added to the file Then each file needs to be moved to an orders directory where an order file is generated and then packaged as zip file and moved to processing server. The file names are of [orderid_userid_guid].[jpg|tif|mov|png...] As I expect the volume to grow I dont want to work on one file at a time and move it through the work flow. I would prefer multi

Named Pipes Server Not Listening

元气小坏坏 提交于 2019-12-24 17:13:27
问题 I am trying to make a Windows Service that simply sits and listens for messages on a named pipe. But it's not working. Trying to connect to the named pipe simply times out, and when I view the process handles of the service's process in Process Explorer, I do not see the named pipe. Here is what I have so far: namespace Service { class Service : ServiceBase { Thread workerThread; static bool serviceStarted = false; static PipeSecurity pipeSecurity = new PipeSecurity(); public Service() { this

Strange error when using “Double.NaN” and “double.MaxValue” in c#

跟風遠走 提交于 2019-12-24 15:42:58
问题 I have a function in my code like (C#, NET 3.5, Visual Studio 2008): public double function CalculateSomething() { ... double a = double.NaN; // Or double.MaxValue, with same behaviour ... } This function is called by the main class, like this: ... double res = o.CalculateSomething(); ... Although it looks like incredible (for me, it is) and ONLY on certain computers (only in 2 computers from 60) without anything special (WinXP SP3), if I use the "alias" (double.NaN or double.MaxValue) the

What version of C# am I using?

血红的双手。 提交于 2019-12-24 15:13:40
问题 How do I tell what version of C# I'm using? I'm using a Mac with xCode. The reason I ask is because i have a book " C# 3.0" and it says that you can declare an multidimensional array like this. int[,] num = new int[2,2]; When I try to do this I get a syntax error. Do I need to import another header other than foundation? 回答1: Have you tried changing new int[2.2] to new int[2,2] ? 回答2: I think Walt's answer is right, but here's a good resource for determining which version of C# you're using

With NAnt, How to use C# 3.0 compiler while targetting .NET 2.0 runtime?

放肆的年华 提交于 2019-12-24 10:38:55
问题 I'm using NAnt 0.85 to build a legacy project. The script itself uses the csc task (not the msbuild task) and works fine. The project is on its way to migrating over .NET 3.5. We already use VS2008, and C# 3.0, while still targeting .NET 2.0 framework runtime. Now the problem occurs when we want to upgrade our NAnt scripts, to compile C#3.0 code using csc task. I managed to compile C#3.0 code with NAnt, by modifying the nant.exe.config to add the net-3.5 framework section, but still, I can't

Error binding to target method in C#3.0

心已入冬 提交于 2019-12-24 07:55:45
问题 I am trying to hook Up a Delegate Using Reflection. This is what I have done so far using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using System.Data; using System.Threading; using System.IO; using System.Reflection; using System.Windows; namespace ChartHelper { public class ICChartHelper { public void RefreshChart() { try { Assembly myobj = Assembly.LoadFrom(@"C:\sample.dll"); foreach (Type mytype in myobj.GetTypes()) { if (mytype

How to get current Checked Item in a checkedlistbox

≡放荡痞女 提交于 2019-12-24 06:33:59
问题 I have a list box and i am trying to get currently checked item inside ItemCheck Handler , but i couldn't , ->I can get List of CheckedItems using property chckdLstBox_Metabolites.CheckedItems But how do i get the item that is checked just before???? 回答1: You can use the event's ItemCheckEventArgs: private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e) { //Note: MessageBox is for demo use only MessageBox.Show("Selected Index: " + e.Index.ToString()); MessageBox.Show(

ASP.Net check if user is internal or external

£可爱£侵袭症+ 提交于 2019-12-24 03:15:21
问题 Can you suggest me some ways on how to identify if a user is accessing my web application internally or externally? Some methods i tried are: Check browser URL (http, internal - https, external) using Request.isSecureConnection I just need some additional insights. BTW, i am using a Web Part. Thanks. 回答1: Basically, you could do that by checking the client's IP address. There are 3 ranges that can be treated as local (or internal) networks. The 3 ranges are (A , B and C classes) 10.0.0.0/8

sort Gridview doesn't work

混江龙づ霸主 提交于 2019-12-24 02:44:31
问题 I have asp.net page contain gridview as following <asp:GridView ID="GridView1" runat="server" AllowPaging="True" OnPageIndexChanging="gridView_PageIndexChanging" OnSorting="TaskGridView_Sorting" AllowSorting="True" AutoGenerateColumns="False" onselectedindexchanged="GridView1_SelectedIndexChanged" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2"> <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" /> <Columns> <asp:boundfield