Nadav Popplewell's Q&A profile
Software Development for Windows Vista Readonly Workflow designer
Can I make the workflow designer readonly I would like to display the workflow graph, and allow to select activities to display its properties but I don't want to allow the user to modify neither the workflow, nor the activities. Is there any Readonly or similar property to set in the WorkflowView or other object Thanks in advance Thanks for the link. Actually it resolves part of the problem. The properties dispalyed in the property grid are readonly, but you can modifiy de workflow structure. Also you have to put many lines of code to make it work. It would be nice to provide this behavior out of the box. Bye ...Show All
Visual C# Counter in foreach
Does C# 2.0 have a way of getting the current pointering (index) in a foreach statement ie. foreach(string strCountry in astrCountries) { if(strCountry.Equals("US") == true) { int iIndex = *****get the current index here.... MessageBox.Show(String.Format("This is the {0} country in the list",iIndex)); } } btw, yes I know I can write my own.... Clarification foreach and you Foreach is a idiom for traversing items in a collection. Foreach is usually used in place of a standard for statement. Unlike other for loop constructs, however, foreach loops maintain no explicit counter: it essentially say "do this to everything in this set", rather than "do t ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How do I know if a resource is managed or not?
I'm following the recommended pattern on Loading Resources in the XNA Framework . I know that if I do something like the following: vertexBuffer = new VertexBuffer(device, typeof(VertexPositionTexture), vpt.Length, ResourceUsage.WriteOnly, ResourcePool.Managed ); Then that is a managed resource. But what about the following resources Are they managed or not How do I tell for resources where you don't specify a ResourcePool effect = new Effect(device, compiledEffect.GetShaderCode(), CompilerOptions.None, null); texture = Texture.FromFile(device, "mytex.png"); vertexDeclaration = new VertexDeclaration(Device, VertexPositionTexture.VertexElements); Also, just to make sure, I never have to call .Dispose() on a managed resour ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Debugger hanging at program start (Loader lock related?)
I'm developing a C# MDX application. Sometimes (maybe 1 out of 5 times) when I debug the application (by pressing F5) it hangs before displaying the main window. I'm sure it's happening before DirectX gets setup, but I'm not sure where - because the debugger hangs too. I notice that if I press F10 (step in) followed by F5 (run) the problem never happens and I also notice that it happens more often on slower computers than faster ones. I'm guessing it's a race condition, and it has something to do with the Loader Lock exception that I disabled in order to use MDX. Putting the following code at the very beginning of Main seems to reduce the probability of the problem occurring (but it still happens): ...Show All
SQL Server toogle "point labels"
I have a line chart that i want to have point lables on but i want to give the user the option of having the point lables or not. Basically because if there is alot of data it is ugly. Can this done through code A report paramerater If you set the data point label position to "Auto", the chart will position the labels so that there is no overlapping. If there are too many data point labels, it will remove labels to make room. Alternatively, you would also look into a conditional expression for the data point label string. E.g. you could only show labels if the data point value exceeds a certain threshold: =iif(Sum(Fields!A.Value) > 100, Sum(Fields!A.Value), " ") -- Rober ...Show All
Visual Basic Fonts and comboboxes
I know how to list the fonts in a combobox: Public Sub ListFonts() Dim FontName As FontFamily For Each FontName In System.Drawing.FontFamily.Families Form1.Tool_Font_Fonts.Items.Add(FontName.Name) Next End Sub This works very well; however, I do have a little challenge. While the fonts are bing populated I would like to display the style it's self, such as: Tahoma Arial Verdana Time New Roman Is there any code out there that some one knows I would really like to add this litte feture to my program. I'm using VB 2005 Express if that makes any difference. Thanks There is a sample on the vb-tips website . ...Show All
Visual Basic Docking two forms
Hello, Is it possible to dock two forms together. One form must have the ability to stay in place as the other form closes to open other forms. Then the docked form must then continue to be docked to the new forms. Thanks Michael Yes, You will have to progmattically control the positions of the forms...so that if the user moves one form the other form moves and when one form opens it positioins itself next to the other form... HTH ...Show All
Windows Forms Finding the location of the executing file
Is there a way to find the file location of the Windows forms exe that you are running For example using asp.net you can find the server and location of the page using: string strPath = HttpContext .Current.Server.MapPath( "~") Is there something similar in Windows Forms Thanks in advance. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName contains the full path to your exe. -- SvenC ...Show All
Visual C# int to ascii
How to convert a int to ascii char Example: int = 65, char = 'A' in ascii table. ...Show All
Visual C# Program Crashes. :(
my program keeps crashing and I cant seem to see why, Well I do get another error now.<br><br>Unhandled Exception: System.TypeLoadException: Could not load type 'Odio.MatematiCa' from assembly 'alpineCalc, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at Calculator.Main(String[] args)<br><br>Also I dont mean to be a pain here or anything, I'm just another newbie tring to learn.anyways.. here are my scripts.<br><br><br>calculator.cs<br><br>using System;using System.Text.RegularExpressions;using cono = Odio.MatematiCa;public class Calculator{ public static void Main( string[] args ) { //string retVal; Cons ...Show All
SQL Server Scheduling the replication job agents
Hi all, I have encountered some problems in scheduling the replication agents but before explaining that let me give a small background of the current DB landscape. It is implemented as Star topology or re-publisher topology with the publisher and the subscriber configured on SQL Server 2000 and it consists of ShareDB on SQL Server 2005 which acts as the re-publisher of data. All other databases publish articles to ShareDB which in turn re-publishes to the databases which subscribes for the article. The topology is using a remote distributor on SQL Server 2005 to offload the replication agent jobs processing from the OLTP environment. The distributor job agent is running continuously and it is shared for a specific ...Show All
.NET Development how to change base class in wsdl
Hello I have three classes A,B,C. B derves from A and C derives from B. I only want to include A and C in the wsdl so that the client does not see B. I tried to use the [ XmlType (IncludeInSchema = false )] on B but then C wont be included either. Even adding [ XmlType (IncludeInSchema = true )] to C wont include C. How can this be done I do not want to include B and B:s properties should not be seen in C either. Thanks Rassol, Your example worked fine for me (having the [ XmlType (IncludeInSchema= false )] in B). Maybe the problem is somewhere else or your " // Processing " is doing something that is breaking this... I just tried the code you have above without the "Processing&qu ...Show All
Commerce Server Developer's workstation
I'm still struggling with the notion that all of our developers must have Windows Server 2003 running on their desktops to build CS based applications. There are few references on the net about this and the bottom line is that doing it on XP is an option but not recommended ('I told you so' on one of the blogs). Being aware that some features may not work (warehousing) I still would like to have development done on XP. I've installed CS2007, already have VS2005. I've unpacked CSharpSite and when trying to access the page get this error: ' Login failed for user ''. The user is not associated with a trusted SQL Server connection'. I went to Commerce Server Mangager and for each (I hope I've covered all) connection to into Profiles, Mar ...Show All
Connected Services Framework Message Routing doesn't work
Hi, all. I defined a very simple ASP.NET Web service as follows (namespace omitted): [WebService(Namespace = " http://tempuri.org/ ")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : WebService { [WebMethod] public void Log(string log) { using (StreamWriter writer = File.CreateText(@"C:\log.txt")) { write.WriteLine(log); } } } The session manifest is as follows: <Session timestamp="0001-01-01T00:00:00.0000000-08:00" timeout="30" serialize="None" routeAnyAction="true" ackOnRouteMsgToParticipants="false" xmlns:xsd=" http://www.w3.org/2001/XMLSchema " xmlns:xsi=" http://www.w3.org/2001 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Templates
I have installed XNA on Windows Vista Ultimate and the templates aren't showing up in Visual C#. I know that they are installed because I've located them in the XNA Directory however they aren't showing up. This is a common problem, and you need to make sure you have installed it on Vista in the correct way. Need to run a command prompmt under admin and runn all installs from there. Install VS C# Express Install VS C# Express Service Pack 1 Install the VS Service Pack 1 update for Vista Install The XNA and GSE Systems. This should get you going, as It has work several times for me and others. ...Show All
