|
Hi,
Recently, the User Interface Process Application Block made by Edward Jezierski (Microsoft Corporation), Michael Stuart (Microsoft Corporation), Lin Joyner (Content Master Ltd), and Pablo Cibraro (Lagash Systems) was released by Microsoft as part of their Application Blocks for .NET.
Since I'm a currently implementing a MCV pattern in our current application I badly needed to study UIP Application Block. But the UIP Solution is in VS.NET 2003 format, so I migrated all the code and created a Solution that can run on VS.NET 2002. So far I have a working copy of the UIP Application Block Source Code (with one migrated example) that runs pretty well in VS.NET 2002. I have studied the code and since we are using windows form, rather than ASP, I have no choice but to create a struts-like controller to suit are project's core engine.
In order not to put my effort to waste, I'm sharing the migrated solution to anyone interested to study/implement further the UIP using VS.NET 2002.
Just reply to this post if you need the code.
for more details on UIP (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/uip.asp)
|
|
|
|
|
Hi,
How can I do similarity detection in .NET? The main question is how to calssify two related news.
Any idea?
Nothing
|
|
|
|
|
|
leppie wrote:
42?
Maybe the infinite improbablity drive would work in this situation?
iid[^]
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
What is a quick way to get the size of a file?
/\ |_ E X E GG
|
|
|
|
|
Really quick example (the FileInfo class provides a Length property to identify the size of the current file):
string dirName = "C:\\";
DirectoryInfo dirInfo = new DirectoryInfo(dirName);
Console.WriteLine("{0} contains the following files:", dirName);
Console.WriteLine("Size\t Filename");
foreach (FileInfo fileInfo in dirInfo.GetFiles())
{
try {
Console.WriteLine("{0}\t {1}",
fileInfo.Length, fileInfo.Name);
}
catch (IOException e) {
Console.WriteLine("\t {0}: {1}", fileInfo.Name, e.Message);
}
}
-Nick Parker
|
|
|
|
|
thanks for the quick response.
that's just what I needed.
/\ |_ E X E GG
|
|
|
|
|
Hi! I have a interesting question : but i don't know !
Main()
{
Form fm = new Form();
fm.Show(); --> (1) ( or fm.ShowDialog() --> (2) )
Application.Run();
Application.Run(new Form()); --> (3)
}
What is difference between (1) , (2) and (3)? thx!
|
|
|
|
|
No. 3 create a new thread of your application but number 1 and 2 create child forms,so not new thread of appplication.
For number 1 and 2 from MSDN:
ShowDialog:
Shows the form as a modal dialog box.Show:
Show:
Showing the control is equivalent to setting the Visible property to true. After the Show method is called, the Visible property returns a value of true until the Hide method is called.
Mazy
No sig. available now.
|
|
|
|
|
1 shows it modeless, 2 shows it as a dialog box (modal) and 3 doesn't show it all.
What would really be amazing is if you wrote that code asnd using a debugger you tested it out yourself.
|
|
|
|
|
currently have a tree menu that allowes nodes to be added and selected, however i am trying to make it so that the parent/root node can't be selected.
to achieve this i have been through if statements but if anybody could post some code it would be most helpful!
thanks in advance
|
|
|
|
|
a) Add an event handler for the TreeView.BeforeSelect event.
or
b) Override the TreeView.OnBeforeSelect method of your TreeView-inherited control.
Then, check the TreeViewCancelEventArgs.Node property and set TreeViewCancelEventArgs.Cancel to false to prevent selecting the node.
Example:
private void treeView_BeforeSelect(object sender, TreeViewCancelEventArgs e)
{
TreeNode parent = e.Node.Parent;
if (parent == null)
{
e.Cancel = true;
}
else if (parent.Parent == null)
{
e.Cancel = true;
}
}
|
|
|
|
|
cool thanks will give it a try
|
|
|
|
|
Hi all,
first i tried using ADO
<br />
ConnectionClass connection = new ConnectionClass();<br />
CommandClass command = new CommandClass();<br />
RecordsetClass rs = new RecordsetClass();<br />
<br />
connection.Open("Provider=msdaipp.dso;Data Source=http://pandora/radar", null, null, -1);<br />
<br />
command.ActiveConnection = connection;<br />
command.CommandText = @"select ""DAV:displayname"" from scope('deep traversal of ""/radar/documents""')";<br />
<br />
ArrayList list = new ArrayList();<br />
try{<br />
rs.Open(command, null, ADODB.CursorTypeEnum.adOpenUnspecified, ADODB.LockTypeEnum.adLockUnspecified, -1);<br />
<br />
while (!rs.EOF){<br />
list.Add(rs.Fields[0].Value);<br />
}<br />
}<br />
catch(Exception e){<br />
throw new Exception(e.Message, e);<br />
}<br />
but this always fails with a (an ambigous and unhelpful)exception from a sharepoint dll from the rs.Open line.
I was thinking their might be some security problem happening.. but theres no way to know. I've run similar code from my machine in a Word macro and it worked fine.
Anyone tried this?
[worldspawn]
|
|
|
|
|
:-OHi:
Does anyone know how to automate tasks like (New Project Creation, Build Solution etc..) in a C# Console Application.
Nivitha
|
|
|
|
|
im trying to implement the algorithm of RSA for fun...but im having a problem with the mod function in .net returning the wrong values.
the algorithm im using is.
Encrypt: value^e mod PQ
Decrypt: (x^e mod PQ)^d mod PQ= value;
A implementation i use is hard coded...and i have varifyed the values with the windows calculator and found that the awnser is returned correctly. Here is where is the code with the problem
<br />
double E = 17 ; <br />
double D = 2753;<br />
double PQ = 3233;<br />
double P = 61 ;
double Q = 53 ;
int i = Math.Pow(123,E)%PQ;<br />
May it be that my chosen key pairs and primes are in correct ? Thanks for your time peoples
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
I think the problem is arising because you are using doubles to store your values. The number 123^17 probably can't be stored exactly as a double. You should use a BigInteger class that can hold as many bits as you want for your encryption algorithm.
Check out this article for some good info on implementing a BigInteger class:
http://www.codeproject.com/csharp/BigInteger.asp[^]
Using that class you will get the correct ciphertext (855) with this code:
BigInteger e = new BigInteger(17);
BigInteger d = new BigInteger(2753);
BigInteger p = new BigInteger(61);
BigInteger q = new BigInteger(53);
BigInteger n = p * q;
BigInteger P = new BigInteger(123);
BigInteger C = P.modPow(e, n);
|
|
|
|
|
Anyone know how to do this????
|
|
|
|
|
what do you mean by database labels?
|
|
|
|
|
Can someone please answer me a question??????????
I am trying to create a deployment project. Under the Launch Conditions window, I am trying to do a registry search to make sure that DirectX 8 is installed. The registry key is as follows:
Software/Microsoft/DirectX
Under the Key, there is "Version" under the name column and "4.08.01.0810" under the data column. Under the Launch Conditions, in the properties, I type Software/Microsoft/DirectX under the RegKey property. The problem is that under the value property, it seems to only want to work with Name properties and not value Properties. For instance....it will detect DirectX if I type "Version" in the value property. It will not detect DirectX(even though it exists) if I type 4.08.01.0810 in the value property. How can I effectively detect DirectX version in the registry????????????
Someone please help,
Thanks,
Kendal
|
|
|
|
|
Hi,
I have a method to render HTML from XSLT. Here is the method:
///
/// Method that renders HTML from XSLT document
///
/// <param name="writer" />
protected override void Render(HtmlTextWriter writer)
{
XPathDocument xdoc = new XPathDocument(Context.Server.MapPath(sourceFilePath));
XslTransform xslt = new XslTransform();
xslt.Load(Context.Server.MapPath(transformFilePath));
xslt.Transform(xdoc, null, writer);
}
I am now getting this warning:
warning CS0618: 'System.Xml.Xsl.XslTransform.Transform(System.Xml.XPath.IXPathNavigable, System.Xml.Xsl.XsltArgumentList, System.IO.TextWriter)' is obsolete: 'You should pass XmlResolver to Transform() method'
I need some help resolving this warning. Can you help?
Kyle
|
|
|
|
|
kyledunn wrote:
I need some help resolving this warning. Can you help?
Try this:
protected override void Render(HtmlTextWriter writer)
{
XmlDocument xdoc = new XmlDocument();
xdoc.Load(Context.Server.MapPath(sourceFilePath));
XPathNavigator nav = xdoc.CreateNavigator();
XslTransform xslt = new XslTransform();
xslt.Load(Context.Server.MapPath(transformFilePath));
xslt.Transform(nav, null, writer);
}
-Nick Parker
|
|
|
|
|
Thank you Nick!
I did need to use an XPathNavigator but even then the error message about using XmlResolver still appeared. Upon further research I found that XmlResolver is a argument in the Transform method.
Transform(XPathNavigator, XsltArgumentList, TextWriter, XmlResolver);
I still have no clue as to when or why to use a XmlResolver but found when I inserted a null for the arguemnt that the error disappeared.
Transform(nav,null,writer,null);
I suspect you can create custom resolvers to influence the Transform but that's for another day. Problem solved. Thank you.
Kyle
|
|
|
|
|
I need combo1 tied to tableA 'customers'
table is ID, Name
I need combo2 tied to tableB 'Stores"
table is CustomerID, Store Number
what is the best way to tie these together?
|
|
|
|
|
Hello,
I want to allow the user to edit columns but not delete or add new columns..
How can I do this??
Note: The read-only attribute allows me to edit, delete and add rows.. how can I only enable the "edit" without the "delete" and "add"
Thank you!!
|
|
|
|