ceebmoj's Q&A profile
Visual C# Exposing properties
Hi! My idea is to include into language a mechanism to expose a field's properties. Let's say I'm inside some WinForms user controll. My control's got a label named label1. I want to expose the Text proprety of the label inside my user controll class and call it LabelText. The main pattern idea is to 'inherit' all the child's property attributes automaticly (like DefaultValue, Browsable and so on - these are just examples, Text proprety's got some others). I would only have to write single line of code that would do everything for me, like public LabelText = label1.Text; One problem I've noticed is that some of the attributes may be of private nested inside that class types, like class MyClass { [AttributeUsage(Attribut ...Show All
Game Technologies: DirectX, XNA, XACT, etc. SWM Model Component
Hi all! I just finished a simplified version of a swm loader component based on the classes in SpaceWars. I used X-Tatic's converter to transform the tiny.x model into swm http://astaroth.beatbuggy.net:8080/Downloads/x2swm_1_0_0_1.zip I sent the sources to www.xnaspot.com , hopefuly, they will put it online soon. P.S. the smaple also includes components for a grid, and for FPS (which can be set to be displayed in the titlebar, screen or both) Have Fun! Catalin Zima P.S. I also wait for XNAspot to post my sample of VertexTextureFetch in XNA ;) Attention: Zima Catalin I have a little present for you, I have attached a set of folders with al ...Show All
Visual Studio 2008 (Pre-release) LINQ and Atlas
Ok so what I am trying to do is have a form with a textbox for a search dialog. On keypress I want to query top 25 records and display them in a gridview, so as you type it refines the search etc. So I have hooked up all the atlas javascript methods etc but I am not sure if I am able to do this or not. Basically my webservice code looks like (generated with BLINQ): return from dom in db.Domains select dom; So this should return all my records (fine for now in testing) and my javascript receiving function does the following: function OnComplete(result) { var d = document.getElementById( "<%# grid1.ClientID %>" ); d.DataSource = result; d.DataBind(); } This results in an error of: System.InvalidOperati ...Show All
Windows Forms Datagridview comboBox not showing displayMember
I am creating a comboBox in a dataGridView that holds month values. The dataGridView is bound to a datatable which is created from an SQL query. However, this DataTable also contains additional columns that I am creating and populating in code. In particular, I am craeting a "month" column in the DataTable in code after the DataTable is filled from an OdbcDataAdapter. I am trying to add a combo box to my datagrid that will represent my months column, but for some reason, the combobox will display the month ID as opposed to the month name once the combo box has lost the focus. For example, if I select "April" from the combo box, the value will revert to "4" when the combo box has lost focus. As far as I know ...Show All
Visual Studio 2008 (Pre-release) Issues with generating .net 2.0 client for consuming a WCF service
hi all, I have created a WCF service and specified message contracts for defining how a request should be sent when invoking a WCF method and also the response. I am using a Windows Service to host the WCF service. The service runs fine and there are no issues with that. The problem is when I try to generate the proxy class (.Net 2.0 client), I am getting a warning as shown below Warning: This web reference does not conform to WS-I Basic Profile v1.1. R2710: The operations in a wsdl:binding in a DESCRIPTION MUST result in wire signatures that are different from one another. An end oint that supports multiple operations must unambiguously identify the operation being invoked based on the input message that it r ceives ...Show All
Windows Forms Listbox to show options from a related table
On a Windows form, I have textboxes to show data rows of a main table. The main table has a foreign key to a minor table which is a list of status values ("Pending", "In Progress" and "Done"). The object is to display the status in a listbox or combobox. I want to know how to do this. Some notes: 1) The code to set up connections, DataAdapters, CommandBuilders, bindingsources, Datasets, etc works fine. 2) I would like to set up any constructs in code rather than with a wizard. 3) Unless I have to I want to avoid creating the relationship between the tables in the wizard. 4) I get the sense that one Dataset can access and update both tables, but I don't know how to tell the dataset about additional tables. ...Show All
SQL Server Blocked transaction problem
Hello, I am trying to execute next query, but when doing it, TABLE1 locks and it does not finish. SERVER2 is a linked server. BEGIN TRAN INSERT INTO TABLE1 SELECT * FROM SERVER2.DATABASE2.DBO.TABLE2 WHERE TAB_F1 IS NULL COMMIT TRAN I have same configuration in other 2 computers and it works ok. What is the problem Thank you!! What about if you run the thing without any transaction Is it the same problem Do you see any locks on the table during the stale time HTH, Jens K. Suessmeyer --- http://www.sqlserver2005.de --- ...Show All
Visual C# How to make a treeview control like a FolderBrowserDialog that can view files within those folders
hi How to make a treeview control like a FolderBrowserDialog that can view files within those folders so that the user can select the file. Here is a small piece of code modified from your question some time ago: protected void AppendDirectoriesToTreeNode( TreeNode node, string root ) { DirectoryInfo rootDir = new DirectoryInfo( root ); foreach ( DirectoryInfo subDir in rootDir.GetDirectories() ) { TreeNode subdirNode = new TreeNode( subDir.Name ); AppendDirectoriesToTreeNode( subdirNode, subDir.FullName ); foreach ( FileInfo fileInfo in subDir.GetFiles() ) { subdirNode.Nodes.Add( fileInfo.Name ); } node.Nodes.Add( subdirNode ); } } ...Show All
Visual C# Keeping a logfile
I am new to C#. I want to know what is the best way to keep a log of what you do in an application The log will be a file of some sort which can be added to but not updated. There should be an easy way of reading from the file. Oh, you don't need to implement it - when you make the GetLogger() call, it will automatically create a logger of the type you've specified in the config file - in my case, a RollingFileAppender, as you see in the config file I posted. There are several other types, if you look at the documentation. But you don't need to know any of that - you just make the GetLogger call and it'll create an instance for you that you can use. No need to implement the ILog interface. This is the be ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Simple BreakOut Demo (Source included)
Well there it is, my first ever C# and XNA program I hope it'll help some of you. Download BreakOutDemo.zip v0.31 Thank you MS for that wonderful gift that is the XNA. Thanks for the comments guys, I appreciate it! :) I will make some improvements (ball effect, maybe item drops) and upload an updated version later today. And sorry about the question/comment thing Glenn, I will make sure to set it correctly next time. ...Show All
Visual Studio 2008 (Pre-release) Can WCF help me.
Hi, I've been tasked with writing an app that will allow a single scanning system to provide data to multiple programs on a network. In a nutshell, a single PC will be connected via serial cable to scanning hardware. The new app will detect the scan via comm port, then transmit data over the network. There are presently 3 vb6 apps, on different PCs, that need to listen for and recieve the data. Each of these apps will be expecting data from only a single scanner which is identified by ID in its transmission. This will allow my client to have a single scanning system for all software requirements. I was envisaging a WCF app on the scan connected PC, this will have a list of the IPs of the LAN PCs and a list of the scanner IDs, this will ...Show All
Visual Basic Help with SQL "DELETE FROM" command
Here is the code. I am clueless why it isnt working at all!!!!!!!!!!! HELPPPPPPPPPPP! [code] myConnection = New SqlConnection("uid=jsykut;pwd=qntm06;data source=JS-LAPTOP\SQLEXPRESS;initial catalog=CheckWeigher") 'myCommand = New SqlCommand("DELETE FROM Users WHERE UserID = '" & TextBox2.Text & "'", myConnection) 'myCommand = New SqlCommand("DELETE FROM Users WHERE UserID = 'test'", myConnection) 'myConnection.Open() 'myCommand.ExecuteNonQuery() 'myConnection.Close() 'myCommand = New System.Data.SqlClient.SqlCommand("DELETE FROM Users WHERE (UserID, FirstName, LastName, Title, Password) = (@UserID, @FirstName, @LastName, @Title ...Show All
SQL Server Combine raw files using range
HI, I have a dataflow that has two raw files as source and I would like to merge them upon a range condition: RawFile1.Date <= RawFile2.Date Usually, using tables, I would have used a lookup with partial cache to achieve it. Now, since we cannot use lookup transform with raw files, I was wondering how I could achieve this using raw files as source. Is it possible to merge raw files using merge or merge join Thank you, Ccote ccote wrote: Thank you both for your inputs. I will have to revise the design of this package. I wanted to get rid of the table solution since SSIS is installed on an application server (different than SQL server). By using raw files, I would be able to do all ...Show All
SQL Server CRI Designer Adornment class - host WinForms controls?
Hi, I'm developing a CRI and in design mode I would like to have some controls on my adornment windows. Is there a way to use WinForms controls here instead of redefining the wheels... Thomas That is one possible solution. You don't have much flexibility to dynamically change the appearance of your adornment, but you can intercept mouse movements and clicks. You can create a dialog that is invoked by clicking in the adornment. -Albert ...Show All
SQL Server sql express bootstrapping question...
I need to install my own instance of Sql Express, so I copied the bootstrapper for sql express. In package.xml I found this line < BypassIf Property = " VersionNT " Compare = " VersionGreaterThanOrEqualTo " Value = " 5.1 " /> Should this be there Why would we bypass sql installation if VersionNT is >= 5.1 My installation of sql express failed because of this. Thanks a lot A couple things... I'd be interested in hearing more about your "re-write" of the SqlExpressChk.exe. We didn't publish the source code for this as far as I know, what exactly did you re-write I'm also not clear how the package.xml file would have block the installation on Windows XP unless i ...Show All
