|
Thanks for reply james.
Ista wrote:
you can do it throuogh the IDE and then just edit it there
But where can I save it? When user request it how can I force VS.NET use my wsdl, not create its own version?
Mazy
No sig. available now.
|
|
|
|
|
Its created based on your asmx file. What exactly are you trying to do so I can fully understand why you are trying to change it.
You might want to change the web service attributes in your class inorder to change that file. Because it is created based on your your web attributes and what not. Are you trying to build custom wsdl by client or what?
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hello all
I'm trying to create a logon web application and would like to check the validity of a new user's email address...
apart from string searching for '@' and '.' etc
I would like to check that the server exists and that there is an account for the new user (maybe use a ping somehow)
Thanks a lot
gil s
|
|
|
|
|
|
I've published, in a first cut form, our plugin to Visual Studio .NET to
support integrated test runs of NUnit tests, complete with integrated
debugger support. It's totally free, and pretty handy -- please report your
bugs to help us improve it.
http://www.mailframe.net/Products/TestRunner.htm
|
|
|
|
|
this code shows me the current line and character index in a richtextbox control. the char index, however, is counted from position 0 at line 0 but i need the char index to start from 0 at each line and NOT from line 0.
how can i do this?
private void rtb1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
<br />
int Line = rtb1.GetLineFromCharIndex(rtb1.SelectionStart);<br />
MessageBox.Show(Line.ToString());<br />
<br />
int pos = rtb1.GetCharIndexFromPosition(new Point(e.X, e.Y));<br />
MessageBox.Show(pos.ToString());<br />
<br />
}
Thanks for your help.
.gonad
|
|
|
|
|
the only way I might see is if you do this:
int Line = rtb1.GetLineFromCharIndex(rtb1.SelectionStart);
int pos = rtb1.SelectionStart;
while ( (newLine = rtb1.GetLineFromCharIndex(pos--) == Line)
MessageBox.Show("The beginning char index of the line is " + ++pos.ToString());
now that code is not tested I just typed it in but it should work for the char index of the first Line
MessageBox.Show(String.Format("Your caret is {0} characters away from the beginning",rtf1.SelectionStart - pos);
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
It's a static method - no constructor needed.
System.Windows.Forms.MessageBox.Show("You must enter a name.",
"Name Entry Error",MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
uhh what are you talking about?
maybe its the wrong question assigned. lol
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hi,
I'm working on a POS project using C# .NET. For now, I don't have a barcode reader and a receipt printer which are definitly a MUST for a POS system in the future.
I would like to know the nature of these two things, so that when i program the POS system, I know how to program as a way of using these two things.
I cannot purchase these two items before the completion of the project. So, I totally cannot try in my program or even know what it is. I want to program my system so that i do not need to have a big modification when i purchase these two things afterward.
Please help!
|
|
|
|
|
I have worked on a few POS systems in the past.
There are a few things to take into consideration.
1. What type of barcode scanner do you plan to use. If you are using a a wedge reader then the data that is read will be just like pasting a block of text into a edit box and it can be read simply. If the scanner is a COM port based scanner you will need to write a device driver or serial port capture routines to read the data. There is a good serail port class on this site http://www.codeproject.com/system/cserialport.asp.
2. Which barcode will you be using ??? Sometimes the barcode will contain additional characters that you are not interested in. The data that will be read in may have an extra characters at the start and/or end (e.g. check digit) depending on the barcode type and reader. Usually POS systems use the barcode EAN-13 (european standard) or EAN-8 (Which I think is the US standard)
3. POS Printer. You can simulate having a POS Printer. Do you have access to a printer? The only real programming difference between a POS printer is the width of the paper. You can setup your printer with a custom size paper that matches the width of the intended POS reciept printer and it will be just as if you has the receipt printer.
Hope this helps.
|
|
|
|
|
Thank you very much!!!! Your advice helps me a lot@!!!! Thanks
AdrianT wrote:
1. What type of barcode scanner do you plan to use.
I don't know. But i think I will look for some reader that support USB. And I heard from someone that some reader plug into the PS/2 port (for keyboard or mouse..). Am I thinking something right?
AdrianT wrote:
If you are using a a wedge reader
What is wedge reader? (i guess normal reader that plug in keyboard wedge or USB? i saw something: USB Adapter for Keyboard Wedge Barcode Scanners from web http://www.skandata.com/usb.html. So I guess wedge is that "plug" for keyboard??!! )
AdrianT wrote:
then the data that is read will be just like pasting a block of text into a edit box and it can be read simply.
Is that mean after reading the barcode, it just acts as a person typing character from keyboard or number pad then leave it there? (no return or ENTER signal?)
AdrianT wrote:
2. Which barcode will you be using ???
I think I will use the American standard (i'm in Canada). Since it is a bookstore POS, I will use the barcode behind each books or cards and print some barcodes by my own for other items (such as gift)
AdrianT wrote:
3. POS Printer.
That means i can just set the page size as small as a receipt, then use my home printer to simulate it...right? Oh.....easy...haha...
THANK YOU VERY MUCH!!!!!! ;);P
|
|
|
|
|
if its an object why not include general methods that can be adapted later
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
hi,
QUESTION 1: i understand you can add modifier to interface:
public interface IA
{
public void DoA(); //Yes, I understand this is INVALID - so, I didnt do this.
void DoB();
void DoC();
double salary
{
get;
}
}
But I thought access modifier is OK when you declare implementation in class? I tried access access modifier in class but the compiler keep bitching that it's NOT legal to do so - and it didnt provide error code (like C1324)! See "QUESTION" below:
public class Capitalist : IA, IB, ICapitalist //QUESTION 2: Can you specify public/private... in interface inheritance? How?
{
//Implement interface IA:
public void IA.DoA() //QUESTION 1: compiler complained here!!
{
Console.WriteLine("Capitalist.IA.DoA");
return;
}
void IA.DoB() //This, on the other hand, is oK.
{
Console.WriteLine("Capitalist.IA.DoB");
return;
}
... and the rest of it ...
}
THanks!
norm
|
|
|
|
|
|
You can append access modifer when you implement it in a class, PROVIDED that the interface is not the base interface of another interface that the class implements.
Using example below, IAccMaintenance is the base interface of IAccManager:
interface IAccMaintenance
{
int EditAccProfile(...); //DO NOT append access modifer to this method when you implement it.
}
interface IAccManager : IAccMaintenance
{
...
}
Now, when you implement it in a class:
class SiteManager : IAccManager
{
public int IAccManager.CreateAcc(...) {...} //That's OK. You can use access modifier here.
public int EditAccProfile(...) {...} //ERROR: You can't use access modifier - the method comes from an interface that's not directly inherited. But why would .NET team design it this way???
...
}
***********************************************************************
In case you want to just compile the code and see...
using System;
namespace try_interface2
{
public interface IAccMaintenance
{
int EditAccProfile(int accID);
}
public interface IOldAccMaintenance
{
int EditAccProfile(int accID);
}
public interface IAccManager : IAccMaintenance, IOldAccMaintenance
{
int CreateAcc(string accType, int accID);
int DestroyAcc(int accID);
int numAccount
{
get;
set;
}
}
interface IConnManager
{
int Connect(string Destination, int connID);
int Disconn(int connID);
}
class CSiteManager : IAccManager, IConnManager
{
protected int m_numAccount;
//(1) Implementing IAccManager interface:
public int CreateAcc(string accType, int accID)
{
Console.WriteLine("CreateAcc... account type: {0}, account ID: {1}", accType, accID.ToString());
return 1;
}
public int DestroyAcc(int accID)
{
Console.WriteLine("Destroy Acc... account ID: {0}", accID.ToString());
return 1;
}
public int numAccount
{
get{ return m_numAccount; }
set{ m_numAccount=value; }
}
int IAccMaintenance.EditAccProfile(int accID)
{
int err=0;
Console.WriteLine("edit acc profile ver 0. accID: {0}", accID);
return err;
}
int IOldAccMaintenance.EditAccProfile(int accID)
{
int err=0;
Console.WriteLine("edit acc profile ver 0. accID: {0}", accID);
return err;
}
//(2) Implementing IConnManager interface (Default method access modifier: private):
int IConnManager.Connect(string Destination, int connID)
{
int err=0;
Console.WriteLine("Connect... destination: {0} connID: {1}", Destination, connID);
return err;
}
int IConnManager.Disconn(int connID)
{
int err=0;
Console.WriteLine("Disconn... connID: {0}", connID);
return err;
}
}
///
/// Summary description for Class1.
///
class AppClass
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
CSiteManager siteManager = new CSiteManager();
siteManager.CreateAcc("developer_premimum", 731);
siteManager.DestroyAcc(423);
siteManager.numAccount = 14302;
Console.WriteLine("Number of registered accounts: {0}", siteManager.numAccount);
}
}
}
norm
|
|
|
|
|
From MSDN[^]:
All interface members implicitly have public access. It is a compile-time error for interface member declarations to include any modifiers. In particular, interfaces members cannot be declared with the modifiers abstract, public, protected, internal, private, virtual, override, or static.
Hope this helps.
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
i know. That's why I didn't add any access modifier in interface declaration. But in the class that implements it... the code is below, compile it and see for yourself:
using System;
namespace deda
{ //namespace deda
public interface IA
{
void DoA();
void DoB();
void DoC();
double salary
{
get;
}
}
public interface IB : IA
{
new void DoA();
}
public interface ICapitalist
{
void HireSlave();
void FireSlave();
}
public class Capitalist : IA, IB, ICapitalist
{
//Implement interface IA:
public void IA.DoA()
{
Console.WriteLine("Capitalist.IA.DoA");
return;
}
void IA.DoB()
{
Console.WriteLine("Capitalist.IA.DoB");
return;
}
void IA.DoC()
{
Console.WriteLine("Capitalist.IA.DoC");
return;
}
public double salary {
get{ return m_salary;}
}
//Implement interface IB:
void IB.DoA()
{
Console.WriteLine("Capitalist.IB.DoA");
return;
}
//Implement interface ICapitalist:
void ICapitalist.HireSlave(){
Console.WriteLine("Capitalist hiring");
return;
}
void ICapitalist.FireSlave(){
Console.WriteLine("Capitalist layoff people");
return;
}
//Class' protected attributes:
protected double m_salary;
}
} //namespace deda
norm
|
|
|
|
|
I think one is called implicit implementation.
Like this
IA.Dob()
{
}
if you want to use access modifiers then
like he said.
public void Dob()
{
}
Bo Hunter
|
|
|
|
|
Hi, just want to know how to separate method declaration and implementation.
Example:
namespace anothersucker
{
public class SomeClass : IA, IB, IC
{
//QUESTION: How can I do implementation elsewhere so I can separate declaration and implementation like we do in C++
public void DoA() {return;}
protected void DoB() {return;}
public void DoC() {return;}
public void DoD() {return;}
}
}
norm
|
|
|
|
|
|
|
|
no, .NET is not lame at all, big step forward from the lame MFC. i was just bitching that you can't separate declaration and implementation in C#.
.net framework is so much more intuitive and organized and with much shorter learnign curve than MFC/WIN32. documentation is much better.. just so much better.
norm
|
|
|
|
|
I'll agree with that. I'll be most happy if/when they finally make C# be a language that keeps up with modern concepts (which it does now), does not have the excess baggage/clutter of C++ (C# is good here), AND has the power that C++ achieves (they have a ways to go here). It's definitely not too hard to accomplish.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|