|
Hi/Hello!
I am working on Final year project.I amm developing a website database editor.I have created many tables in the database e.g user ,table field ,database etc.I want when i click on button create table then this dialog box open,like this kind of dialog box ,here is image link
http:
Can any one help me plz,I am beginner I don't know how to generate this kind of window.Thanks
Please provide me links or other resources e.g video etc.Thanks CODE PROJECT
|
|
|
|
|
Make your mind up:
Hameed Khan wrote: I am working on Final year project
Hameed Khan wrote: I am beginner
The two do not go well together!
All that is, is a simple form with controls dropped on it!.
To create and display it, right click your Project in Visual Studio, and select "Add"..."Windows Form"
Give it a sensible name (frmDetail perhaps) and click the "Add" button.
Drag controls from the tool box onto your form.
In the Code View, add properties to fill the textboxes.
Now go back to your main form and handle a button click event.
Add the following code:
frmDetail detail = new frmDetail();
if (frmDetail.ShowDialog == DialogResult.OK)
{
}
But if you don't know how to do that...I don't hold out a lot of hope for your final year project!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: select "Add"..."Windows Form"
That won't work so well in an ASP.NET project.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Picky, picky, picky!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Where are you stuck?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Use a modal dialog framework. jQuery UI has one but there are others. Some show a different page in an iframe inside the modal, some let you put a div on a page with your controls and the div is shown in the modal, some let you do both. Google for "jquery modal dialog" and you'll find lots of examples and plug-ins. Go through them and pick the one you like.
|
|
|
|
|
Anyone knows how to make something like this?
Ex.(just an example)
When you're copying files from one place to another, a window shows up and a loading bar with an estimated time elapse appear.
How to make the time elapse work with the loading bar. Thanks
|
|
|
|
|
Are you talking about a Progress Bar / Control ?
|
|
|
|
|
Yes? Just like the loading bar. i don't know what it's called, All i know is it looks like loading bar. But i want it to have a time elapse underneath it so that I know how long will it takes to finish.
|
|
|
|
|
Aelmfr wrote: Anyone knows how to make something like this?
Ex.(just an example)
Asking questions is a skill[^]
Elementary school problem :
If it take 1 minute to copy 10% of a file.
- How long does it take to copy the whole file ?
- How long will it take to finish copying the file ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
hmm... Yea just like that. Sorry. In C# it's easy to create loading bar there even if i don't have a background in it, But i don't know how to create the (How long will it take to finish copying the file ?) time elapse of it. Hope you can help me.
|
|
|
|
|
Nooo, seriously. Try to answer this problem and figure out the maths under it .
Elementary school problem :
It already took 1 minute to copy 10% of a file.
- How long does it take to copy the whole file ?
- How long will it take to finish copying the file ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
oh you never said it. i thought you're giving another example for my situation. if my problem is something like that.
well, if a minute is 10%, then it'll take 10minutes for a whole file.
so 10mins? Hmm... not sure what to do with this? I'm not very good at maths and of all, not a programmer. i just use c# because of its drag n drop environment.
|
|
|
|
|
TimeToSendfile= Timespend * FileSize /FilePartSent
TimeRemaining= TimeToSendFile - Timespend
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
at time=0, the time required to copy a file may as well be a guess ... one doesnt know how long it will take until you've had a couple of 'segments/parts' copied that you can then use to provide finer timing details
(which as a discussion on SO and Raymond Chen indicated about 'Explorer', are guesstimates anyway)
|
|
|
|
|
Garth J Lancaster wrote: at time=0, the time required to copy a file may as well be a guess ... one doesnt know how long it will take until you've had a couple of 'segments/parts' copied that you can then use to provide finer timing details That's why you don't estimate remaining time until a minimum amount of data is sent.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
ppolymorphe wrote: If it take 1 minute to copy 10% of a file.
- How long does it take to copy the whole file ?
- How long will it take to finish copying the file ?
Obligatory XKCD[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
load images in an array in memory, build a timer (there are controls for that) and load the next image to the control when timer has elapsed.
that should get you started. Note that this is by definition multithreaded, which is always fun...
|
|
|
|
|
I am trying to convert an array to a dictionary but my code is throwing a null exception. Below is my code
static void Main(string[] args)
{
Product p1 = new Product();
p1.ProductSkew = 99;
p1.ProductName = "Accord";
p1.Color = "Black";
p1.Price = 35000;
Product p2 = new Product();
p2.ProductSkew = 46;
p2.ProductName = "Corvette";
p2.Color = "Black";
p2.Price = 65000;
Product p3 = new Product();
p3.ProductSkew = 35;
p3.ProductName = "Altima";
p3.Color = "Black";
p3.Price = 32000;
Product[] products = new Product[3];
products[0] = p1;
products[1] = p2;
products[2] = p3;
Dictionary<int, Product> productlist = products.ToDictionary(p => p.ProductSkew, p => p);
foreach (KeyValuePair<int, Product> item in productlist)
{
Product product = new Product();
product = item.Value;
Console.WriteLine(
"\nSkew: {0} \n" + "Name: {1} \n" + "Color: {2} \n" + "Price: {3} \n",
product.ProductSkew, product.ProductName, product.Color, product.Price );
}
Console.ReadLine();
}
}
public class Product
{
public int ProductSkew { get; set; }
public string ProductName { get; set; }
public string Color { get; set; }
public double Price { get; set; }
public void AddProduct()
{
Console.WriteLine("Enter Product Skew.");
this.ProductSkew = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Product Name.");
this.ProductName = Console.ReadLine();
Console.WriteLine("Enter Product Color.");
this.Color = Console.ReadLine();
Console.WriteLine("Enter Product Price.");
this.Price = Convert.ToDouble(Console.ReadLine());
}
}
The syntax seems correct but when I step through the code inside of ToDictionay(), p.ProduckSkew is empty and I don't know why. Any help is greatly appreciated, thanks.
|
|
|
|
|
This is weird. Just copy-pasted your code.
- VS 2013
- .net 4.5
- debug and release
Works as expected.
Best,
John
-- Log Wizard - a Log Viewer that is easy and fun to use!
|
|
|
|
|
Hi, thanks for replying. I think I know what the problem is. In my actual code I set the size of the array to 10 but inserted data into only three of the elements.
So my question is how do I test for null values when converting an array to a dictionary. Thanks for your help.
modified 16-Mar-16 18:29pm.
|
|
|
|
|
The most obvious solution would be to use List<Product> instead of Product[] , and then use Products.Add(...); to populate the collection.
List<Product> products = new List<Product>;
products.Add(p1);
products.Add(p2);
products.Add(p3);
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton
|
|
|
|
|
Just add a where clause in your code like this:
Dictionary<int, Product> productlist = products.Where(b => b != null).ToDictionary(p => p.ProductSkew, p => p);
This will ignore all the null products and convert the rest into dictionary.
|
|
|
|
|
Thank you Mathi, your solution works great. Also I will keep everyone else's suggestions in mind as they are all very valuable, thank you all.
|
|
|
|