visual-studio-2010

apply a template to a column of datagrid

与世无争的帅哥 提交于 2019-12-25 10:48:08
问题 I'm using MVVM and I want to apply a template to a specific column of my datagrid. I create Machine class which have Name, costs, properties. I create also Operation Class which have Name porperty, ExecutiveMachine property (Type : Machine) When I use itemsSource to display my list of opertations, I see the path of my machines whereas I want to display their name. I added DataGridTemplateColumn but now, I have machine column twice (one correct, and the other is incorrect) Actually my code is

How to make MSBuild correctly track files generated with an external tool across referenced projects?

佐手、 提交于 2019-12-25 10:48:06
问题 I have MSBuild code that takes files with a particular Build Action ( CompileFoo in this example) and generates output files (with a different extension). This is the code I have so far: <Target Name="BuildFoo" BeforeTargets="Compile" Inputs="@(CompileFoo)" Outputs="@(CompileFoo -> '$(OutputPath)%(RelativeDir)%(Filename).bin' )" > <!-- makefoo doesn't know how to create directories: --> <MakeDir Directories="$(OutputPath)%(CompileFoo.RelativeDir)"/> <Exec Command="makefoo -o "$(OutputPath)%

CertCreateCertificateChainEngine returning “Invalid Parameter” (0x80070057)

醉酒当歌 提交于 2019-12-25 10:21:33
问题 I have been trying to create a non-default certificate chain using modified version of an example posted https://msdn.microsoft.com/en-us/library/windows/desktop/aa382042(v=vs.85).aspx CERT_CHAIN_ENGINE_CONFIG chainConfig; HCERTCHAINENGINE hChainEngine; :: SecureZeroMemory (&chainConfig, sizeof (CERT_CHAIN_ENGINE_CONFIG)); chainConfig.cbSize = sizeof(chainConfig); chainConfig.hRestrictedRoot = NULL; chainConfig.hRestrictedTrust = NULL; chainConfig.hRestrictedOther = NULL; // Following two

CertCreateCertificateChainEngine returning “Invalid Parameter” (0x80070057)

狂风中的少年 提交于 2019-12-25 10:19:09
问题 I have been trying to create a non-default certificate chain using modified version of an example posted https://msdn.microsoft.com/en-us/library/windows/desktop/aa382042(v=vs.85).aspx CERT_CHAIN_ENGINE_CONFIG chainConfig; HCERTCHAINENGINE hChainEngine; :: SecureZeroMemory (&chainConfig, sizeof (CERT_CHAIN_ENGINE_CONFIG)); chainConfig.cbSize = sizeof(chainConfig); chainConfig.hRestrictedRoot = NULL; chainConfig.hRestrictedTrust = NULL; chainConfig.hRestrictedOther = NULL; // Following two

How to validate number range array in textbox in visual basic?

你离开我真会死。 提交于 2019-12-25 10:00:35
问题 So basically in a form, you have 3 textboxes and each of them you can input a number, then you have a button that check if each of these textboxes are in a range of numbers specified. It's very much like a lock combo, but I need help checking values, for example; the only thing i can figure out is Dim intOne As Integer Dim intTwo As Integer Dim intThree As Integer Dim blnInputOk As Boolean = True If Integer.TryParse(lblOne.Text, intOne) = False Then MessageBox.Show("Value must be an integer")

Program that sends an email notification if url is down

喜你入骨 提交于 2019-12-25 09:48:04
问题 I am attempting to write this type of program as stated in the question. I have failed miserably and after no luck on msdn or google I am asking the intelligent minds of StackOverflow. My code is below for those interested in reading it. I would like this program, on execution, to read a url to see if it is active and working properly. If it is not, and I get a bad response, an email is sent notifying someone that the website is down. Im writing this is visual studio 2010 with C# and 3.5net.

Visual Studio 2010: When creating new project vs2010 wants to open html file of wizard

房东的猫 提交于 2019-12-25 09:42:32
问题 As title says when I'm creating new project in vs2010 it wants to open wizard html in browser. The file it wants to open: file:///C:/Program Files/Microsoft Visual Studio 10.0/VC/VCWizards/AppWiz/Generic/Application/html/1033/default.htm So in the end I can't create project. Any ideas what can be wrong? I'm using Windows 7 64bit. I tried uninstalling Internet Explorer but it didn't solve my problem. I'll explain how it works now: I click File -> New -> Project... I choose win32 console app,

Is it possible to add a web user control to a class library in VS2010

*爱你&永不变心* 提交于 2019-12-25 08:57:54
问题 I was trying to add Web user control in Class Library in VS2010. is there a way to do that? 回答1: at last I found one way, just copy the files from other project (website/ web application) and pest them inside Class Library Project. 来源: https://stackoverflow.com/questions/5295586/is-it-possible-to-add-a-web-user-control-to-a-class-library-in-vs2010

Program execution ends suddenly, with no warnings or exceptions, ONLY when debugging!

ε祈祈猫儿з 提交于 2019-12-25 08:39:37
问题 I'm having a very strange issue. My program runs absolutely perfectly if I run it without debugging (by pressing CTRL-F5), but if I try to run it with the debugger, it will crash back to the environment with absolutely no warning, error message, or exception. In fact, according to the output window, the program exited with error code 0, ie, normally! I've tried running the program on two computers, on one it works absolutely fine and lets me debug it, but on the other it doesn't. That just

How can I merge these two web.config files?

♀尐吖头ヾ 提交于 2019-12-25 08:34:33
问题 I have 2 web.config files -- one in my root and one in my /knowledgebase/ directory -- which I have converted to an application in IIS7 . Nevertheless, I still get the: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\Users\Owner\Documents\Visual Studio 2010\WebSites\USS\knowledgebase\web.config 35 My /knowledgebase/ web.config line 35