|
Hi all,
I am very new to c#,
My current project is on E-Learning Domain(Asp.net 2.0 and c#).
can any one suggest me which type of Design pattern is best suited for this type of Projects.
Please respond as early as possible
Thanks and regards,
Y.A.krishna Prasad.
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
Design patterns are patterns that describe sections of the software architecture. You don't just have 1 pattern that describes an entire software application. I suggest you do some reading on design patterns (if that is what you want to learn about) and try to understand how the patterns can be applied to your specific application.
Don't overuse patterns though, as they can merely increase complexity without providing any advantage.
Simon
|
|
|
|
|
try to Read GOF (Gang of Four ) Desing pattern, there types, appliclibility and consequence and then you can decide which pattern you want to use.
cheers,
Abhijit
Think Sharp | Code Sharp | C Sharp
|
|
|
|
|
Hi there! I have an app and I have a local database within the app. After I finished building, I was testing the app at my local computer and it was working fine. After that I installed on a computer without any kind of sql server instance installed on it and it didn't run at all and was giving me error that the remote connections are not allowed. Is it possible the app not to run cause there is no instance of sql server or it's something else?? Thx ahead for your advices
|
|
|
|
|
Yes, if you are using a local SQL database in the app, you will need to install SQL server on the pc for it to work. You can use SQL Express[^] to reduce the amount you need to install. SQL express is a smaller version of SQL server that just handles small database files. It is specifically designed to be redistributed with applications.
Make sure you check the restrictions on database size etc for SQL express:
http://en.wikipedia.org/wiki/SQL_Server_Express[^]
Simon
|
|
|
|
|
Thx for your interest about this issue, I have a sql express within visual studio as well, but most of the clients what will use this app are people who are not related with developing thus they do not have any VS or SQL express instance installed on the computer. You want to say that for running at their machine, installing at least sql express is mandatory?? Thx ahead for any other advice
|
|
|
|
|
Yes, you must install SQL express on their PC.
(The alternative is to use a database on a server like Guffa has suggested)
Simon
|
|
|
|
|
Hi Laziale,
You donot need to install SQLServer in each client m/c.If you are using SQL DMO for backup and restore of db throgh application than only you need to add the required DLL in your setup(Using merge module).
Thanks
Hem
|
|
|
|
|
As your application is using a database, it has to have a database to use.
You either have to install a local database on the client computer, or you need an instance of SQL Server (not express) on a server that they can access via LAN/internet.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
IF you plan to run the application on a different machine, BUT connect to the database on your local machine, you will need to allow remote connection on the SQL server, using Surface Area Configuration. It is turned off by default. Also check the firewall to allow the port to go through also.
IF you plan to run the application on a different machine AND connect to the database on that machine, yeah, you will need to install SQL server on that machine.
|
|
|
|
|
Hello. Got an annoying problem here. I'm trying to create a custom TextBox which renders the text central vertically. Additionally, I want the font to reduce in size if it is wider than the TextBox so it is all visible. The problem is the text renders fine until it's too wide, then it won't draw at all. Here's the KeyPress event handler:
private void TextArea_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 8)
{
if (baseString.Length > 0) baseString.Remove(baseString.Length - 1, 1);
}
else
baseString.Append(e.KeyChar);
if (baseString.Length == 0)
{
using (Graphics gfx = this.CreateGraphics())
{
gfx.Clear(this.BackColor);
return;
}
}
// Setup the graphics object
Graphics g = this.CreateGraphics();
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
SizeF stringSize = g.MeasureString(baseString.ToString(), this.Font);
if (stringSize.Width > this.Width)
{
while (stringSize.Width > this.Width)
{
this.Font = new Font(this.Font.FontFamily, this.Font.Size - 1);
stringSize = g.MeasureString(baseString.ToString(), this.Font);
}
}
else
{
while (stringSize.Height < (this.Height - 6))
{
this.Font = new Font(this.Font.FontFamily, this.Font.Size + 1);
stringSize = g.MeasureString(baseString.ToString(), this.Font);
}
}
g.Clear(this.BackColor);
float posX, posY;
posX = (this.Width / 2) - (stringSize.Width / 2);
posY = (this.Height / 2) - (stringSize.Height / 2);
g.DrawString(baseString.ToString(), this.Font, new SolidBrush(this.ForeColor), posX, posY);
g.Dispose();
}
You can see the reduced size string flicker in and out when typing fairly fast but then it disappears. Any help would be appreciated.
-----------------------------------------------------------------
EDIT: Realised I should have put the painting in the OnPaint method which I did, and found an unintentional loop which I've removed. It's working correctly now apart from the fact that as the text gets longer, and therefore the font smaller, my alignment veers off to the left a bit.
modified on Wednesday, September 24, 2008 9:29 AM
|
|
|
|
|
How can i count all location respectively while licking a city...by using class r any material avilable?
krishna
|
|
|
|
|
Create a integer variable. Set it to 0 to begin with. Increment it by one every time a city is clicked.
When you have finished, output the integer. This is the number of times cities were clicked.
Simon
|
|
|
|
|
krishnavaradharajan wrote: licking a city
Ooh yuck . I'd rather not lick a city - it tastes all concretey.
|
|
|
|
|
Pete O'Hanlon wrote: I'd rather not lick a city - it tastes all concretey.
Yeah. And all the graffiti leaves my tounge looking really funny...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
That's a typo; he meant "clitty".
|
|
|
|
|
Pete O'Hanlon wrote: rather not lick a city - it tastes all concretey.
Probably more than just concretey
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
hi,
I have to find the width and height of glyphs in xps document using only the indices attribute in wpf.
I tried with the formula,
width = (advancewidth*fontsize)/ 100;
but advancewidth is an optional one .At that time what i should use to calculate width.
For eg:
<Glyphs
FontUri = "C:\WINDOWS\Fonts\TIMES.TTF"
FontRenderingEmSize = "14"
Indices="75;45;68,49"
StyleSimulations = "BoldSimulation"
UnicodeString = "hai"
Fill = "Black"
OriginX = "0"
OriginY = "150"
/>
Is there any possiblity to get the width and height from the fontfile used in the xps document.if yes how?
Plz reply
|
|
|
|
|
i need to create public folder on exchange server 2003 in c#
i looking for the most simple way
thank you.
|
|
|
|
|
Hi friends ,
I am using visual studio 2003.In my project I have a combobox populated directly from a dataset using 'displaymember' and 'valuemember' properties.But sometimes my combobox is hanging ie , it can be selected with scroll of mouse but pulldown is not working.Any way to correct this issue friends ?
with warm regards
|
|
|
|
|
|
Brother ,
Thanxxxxx a lot for your reply.The same code I used in my project.Yaa but the problem was with frame work.I converted project in to VS 2005.It is working fine there.Also conversion cleared a lots of unhandled exceptions in my project.Once again thanxx for your reply...Take care
|
|
|
|
|
Hi everybody i am exactly what my name suggests a newbie to programming world but i have matured in C# basically so i know some internal stuff(creating simple apps. and codes) but the next step i want to achieve is connecting with databases so not yet ready to make the big jump i want to just do this .....
I have an excel file (Office 2007) and i want to display the information in the file in the textboxes of the C# application so when i googled it all i get is OLEDB which i am not very sure and i remeber using VS2005 and connecting to SQL2005 and retrieving data but since now i am using its all LINQ i guess but as i said earlier i dun want to go near the SQL yet .........i know i know i am bit long winded pls forgive me but pls need an answer or may be a simple article on this would be helpful...tks to the future answer guy before hand
|
|
|
|
|
First, you should google "punctuation" so you can type lucid messages.
Second, you didn't google hard enough (or lied about doing it), because I found dozens of examples of reading an Excel file.
Here's one.[^]
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I would like to drag and drop a row in DataGridView on .net framework 2.0 the row is a file detail from window explorer.
<br />
private void dGV_fileUpload_DragDrop(object sender, DragEventArgs e)<br />
{<br />
<br />
Object fileName = (Object)e.Data.GetData(typeof(????));<br />
<br />
FileInfo file = new FileInfo(fileName);<br />
DataGridViewRow row = new DataGridViewRow();<br />
row.CreateCells(dGV_fileUpload);<br />
row.Cells[0].Value = file.Name;<br />
row.Cells[1].Value = GetFileSize(file.Length);<br />
row.Cells[2].Value = file.LastAccessTime.ToString();<br />
this.dGV_fileUpload.Rows.Add(row);<br />
}<br />
modified on Wednesday, September 24, 2008 5:44 AM
|
|
|
|