|
Maybe, just maybe, we'll know when some one adds more describtion...
Anyway parents dropping their children into a maze seems a tad irresponsible to me.
|
|
|
|
|
sitnet wrote: How to find parent's child in matrix (in maze)?
please more describtion for me...!
Electronic tagging would be a good start, or possibly a really long lead with a motorised winder to reel that kid right back in.
|
|
|
|
|
|
I'm playing with my first C# application and have a few questions about style. Bear with me here; I've been programming about 100 years, but I'm fairly new to the Windows environment, and a total newbie in C#.
I'm working on an app that is intended to allow unskilled people to enter information about electrical substations. The four functions to be supported are: entering the equipment readings for several classes of equipment each month, recording services performed on the equipment, recording the movement of equipment within substations and inventory, and managing inventory. I've built Windows Forms for each of the basic functions, but now wonder how to proceed.
My first thought was to create a sequence of dialogs launched from each major function page to collect data and post it to a database. Then it occured to me that I might also embed data collection forms into the main pages and play with the visibility of each as I walked the user through the steps. Another option would be to create individual forms for each step and just overlay them as the user navigates through the steps. I'm trying to create a uniform appearance so as to make the app friendly to people who don't like to use computers, but since I'm new to the language and environment, I'd also like to save myself a lot of unnecessary pain. I don't want to lock myself into a solution that will require advanced knowledge of the language that I lack.
What would you recommend? Any suggestions would be appreciated...
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
How about TabPages, one for each type of action?
|
|
|
|
|
Hmmm.... I never even looked at that. It sounds complicated, though, and this is a first project in a new language. I'm not sure I'm up to that yet. I'm trying to get the look and feel of a web page, because while the users are fairly good at surfing the 'net for naughty pictures, they'd be totally stumped trying to use Quicken. Building a whole slew of forms with a common appearance seems one obvious way, but though I can figure out how to load a new page, I haven't found an unload function yet. Back to MSDN for ideas then...
Thanks for the suggestion.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
You might want to consider the MS CAB.
|
|
|
|
|
I don't know what that means...
I'm fairly sure I can't afford a taxi to Redmond, though...
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
|
Thanks, Mark! That looks interesting, though a bit beyond my skill level. I'll give it a look after work.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
hi all,,,
I have a mobile application project(server, client).
I want to connect between them using ip address write it in a client(mobile) and save this ip to a textfile...
the problem is... i can not access the file to read from it.
Thanks all
|
|
|
|
|
Ok, first off, the message subject is totally irrelevant to your problem, and if you have pulled through your "mobile" problem, all you have to do now is just open a System.IO.StreamReader and read the ip file.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi, how do i use a proxy with a AxWebBrowser? I have codes like:
[DllImport("wininet.dll", SetLastError = true)]
private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength);
private struct INTERNET_PROXY_INFO
{
public int dwAccessType;
public IntPtr proxy;
public IntPtr proxyBypass;
};
public void SetProxyServer(string proxyServerAddress)
{
const int INTERNET_OPTION_PROXY = 38;
const int INTERNET_OPEN_TYPE_PROXY = 3;
const int INTERNET_OPEN_TYPE_DIRECT = 1;
INTERNET_PROXY_INFO struct_IPI;
// Filling in structure
if (proxyServerAddress == "")
{
// Clear any proxy settings and go "direct" to the Internet.
struct_IPI.dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
struct_IPI.proxy = IntPtr.Zero;
struct_IPI.proxyBypass = IntPtr.Zero;
}
else
{
// Assign the specified proxy server and port to access the Internet.
// This supports only anonymous proxy servers; support for authentication
// coming in the future.
struct_IPI.dwAccessType = INTERNET_OPEN_TYPE_PROXY;
struct_IPI.proxy = Marshal.StringToHGlobalAnsi(proxyServerAddress);
struct_IPI.proxyBypass = Marshal.StringToHGlobalAnsi("local");
}
// Allocating memory
IntPtr intptrStruct = Marshal.AllocCoTaskMem(Marshal.SizeOf(struct_IPI));
// Converting structure to IntPtr
Marshal.StructureToPtr(struct_IPI, intptrStruct, true);
bool iReturn = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY, intptrStruct, Marshal.SizeOf(struct_IPI));
}
then after i'll call the method passing in the ip address followed by wb2.nagivate("url).
but it doesn't show that I'm in a proxy when a "check ip" site is being loaded because it shows my original ip address..anyone wanna help out?
|
|
|
|
|
When u copy something from Internet be sure to check everything it writes in the article
Take a look to webBrowser.CreateObjRef on MSDN.
use RefreshIESettings("proxy:port") when u enter the link to the webbrowser. Look for Pandora flash browser for more directions on it.
modified on Sunday, November 9, 2008 7:08 AM
|
|
|
|
|
thanks for the reply..
I thought I should call SetProxyServer(123.132.123.123:8080) to set the proxy settings through my own defined method?
|
|
|
|
|
Should be SetProxyServer("123.132.123.123:8080") indeed ... i remained stucked with the original function name(that being RefreshIESettings).
|
|
|
|
|
How do you check whether you have successfully set the proxy?
|
|
|
|
|
Hi
i'm working in a C# client proyect, that client call SOAP methos from a PHP NUSOAP
this is the method using in PHP (nusoap)
require_once('lib/nusoap.php');
$server = new soap_server();
$ns='http://localhost/';
$server->configurewsdl('ApplicationServices',$ns);
$server->wsdl->schematargetnamespace=$ns;
$server->register('prueba',array('texto' => 'xsd:string'),array('return' => 'xsd:string'),$ns);
$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA'])
? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
$server->service($POST_DATA);
function prueba($texto) {
$var1 = "Tu texto es: " . $texto;
return $var1;
}
exit();
?>
well, the soap code works fine. Now, the C# client
namespace soap1
{
[System.Web.Services.WebServiceBinding(Namespace = "http://localhost/", Name = "ApplicationServices")]
public class localhost1 : System.Web.Services.Protocols.SoapHttpClientProtocol
{
[System.Diagnostics.DebuggerStepThrough()]
public localhost1()
{
this.Url = "http://localhost/logeo.php";
}
[System.Web.Services.Protocols.SoapDocumentMethod("http://localhost/logeo.php",
RequestNamespace = "http://localhost/",
ResponseNamespace = "http://localhost/",
Use = System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string prueba(string texto)
{
object[] resultado = this.Invoke("prueba", new object [] { texto });
return(Convert.ToString(resultado[0]));
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
localhost1 app1 = new localhost1();
string s = app1.prueba("pato");
MessageBox.Show(s);
}
}
}
now, the c# code here, works fine and they detect my php method
¿the problem?
well, in that line
string s = app1.prueba("pato");
the "s" variable has in blank, no result, no value return
i test the SOAP server code in a SOAP client code and works fine, return a string value, but in this c#, no string value returns. why??
NOTE: Sorry for my BAD english
|
|
|
|
|
hello all,
actually i am working on richtextbox control in window application.
i have a problem in font class. because i want to show rtf file paragraph in para for <\p>,
for bold paragrpah<\b>,
For ITalic Paragrph,<\I>.
so, how here i am use font class to generate such tag with every paragrph.
my code is here,plz help me ...???
richTextBox1.LoadFile(filepath,RichTextBoxStreamType.RichText);
string inputstring = richTextBox1.Text;
StringBuilder sb =newStringBuilder(inputstring);
//string xx = inputstring;
//string yy = xx.Replace("", "");
sb.Insert(0, "<p>");
//string yy = xx.Replace("", "");
//sb.Replace("<p>", "");
//int num = 0;
// sb.Replace("<p>"
//Random rand = new Random(3);
string rt = "" ;
for (int i = 0; i < 10; i++)
{
rt = i.ToString();
}
//sb.Insert(0, "<p local_id = P-" + rt + ">");
sb.Replace("\n", "</p>" + "\n" + "<p>");
//sb.Replace("<p local_id = P-" + rt + ">" +"</p>", "");
//sb.Append("</p>");
//sb.Replace("<p local_id = P-" + rt + ">" + "</p>", "");
sb.Replace("\n\n", "\n");
sb.Replace("\n\n", "\n");
sb.Replace("\n\n", "\n");
sb.Replace("\n\n", "\n");
sb.Replace("\n\n", "\n");
sb.Replace("\n\n", "\n");
int p=0;
string xx = sb.ToString ();
int ppara = 0;
ppara = xx.IndexOf("<p>", 0);
while (ppara!= -1)
{
p = p+1;
string f1 = Convert.ToString(p);
f1.ToString().PadLeft(3);
xx = xx.Remove(ppara, 3);
xx = xx.Insert(ppara, "<p local-id=\"p-" + p + "\">");
ppara = xx.IndexOf("<p>", ppara+3);
}
richTextBox1.Text = xx.ToString();
}
//}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
|
|
|
|
|
use RichTextBox.Select(int start, int lengthofselection) and then apply the style you want to selection using RichTextBox.SelectionFont property
|
|
|
|
|
thanks for ur warm response...
when applied this its not working prperly...
code is:-
while (ppara <= xx.Length)
{
int postspace = xx.IndexOf("", 0);
if (postspace != -1)
{
string word = xx.Substring(x, postspace);
richText.Select(x, postspace);
richTextBox1.SelectionFont.Bold;
xx = xx.Insert(ppara, "");
}
}
help me for code.....
|
|
|
|
|
int postspace = xx.IndexOf("", 0); is equivalent to int postspace = xx.IndexOf(String.Empty, 0); which doesn't make too much sense ... if you're looking for the first occurence of a space use int postspace = xx.IndexOf(" ", 0);
|
|
|
|
|
hello,
here i want to read every character while space. when new word come again then he read continue..if any character is bold and italic he show in richtextbox with sequence no...
i am new in C# dot net.so plz provide me some specific code related to it.
|
|
|
|
|
What I want to do is be able to stick a form to the top, left, right or bottom of the screen - all the way across. I found this: http://www.codeproject.com/KB/dialog/FormDocker.aspx but I don't know how I would use a VB class in a C# project, plus I don't want to have to install the VB component of VS2008 just to compile a class.
|
|
|
|
|
My.Computer.Screen.WorkingArea.[Width, Height, Top, Bottom] and use them according to your needs.
|
|
|
|
|