|
Hi,
I would like your enlightened advice on this matter:
For my next application I have to setup an interface in 3D.
The interface will be an office with a desktop and some usual items like pens, papers, telephone, lamp, etc...
There won't be complex animation, just slight rotation around the desktop BUT...the scene has to be rendered in a very realistic way, offering a 'global illumination' (like?) quality display! (realistic light effects and shadows)
How should I realize this? Will I have to use a 3D game engine? If so, which one would you advice me to use?
My question is not on the content of the scene (a 3D graphic artist will manage this) but on how to achieve a realtime high quality render of the scene!
Thank you very much!
|
|
|
|
|
Jayme65 wrote: The interface will be an office with a desktop and some usual items like pens, papers, telephone, lamp, etc...
Sounds like you're reinventing Microsoft Bob[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
This is a question for Google: there are many papers, tutorials and samples to be found.
|
|
|
|
|
I have two forms form1 and form2.in form1 I have a button that opens form2.in form2 I have a combobox and button.on clicking a button in form1,form2 will be displayed,then in form 2 I will add items to comboxbox by clicking a button present in form2.on closing the form2,the values added by clicking the button disappears,so help me to come out of it.i don't want to use databases.i just want that values be binded until the close of main form Form1.
Form1.cs
private button1_click(object o,EventArgs e)
{
Form2 F2 = new Form2;
F2.Show();
}
Form2.cs
int i=0;
private void button1_Click(object sender, EventArgs e)
{
i = i + 1;
comboBox1.SelectedIndex = comboBox1.Items.Add("Message" + i);
}
help me with proper examples
The scope of saving,means values on combox box must be remained until the close of Form1.
modified 1-Aug-16 3:12am.
|
|
|
|
|
|
Since you are using Show it's a little complicated.
What you need to do is get the selection back from Form2 to Form1 and then "re-use it" next time you need Form2. That's pretty simple in theory: just write a property in Form2 which gets and sets teh information:
public int SelectedIndex
{
get { return comboBox1.SelectedIndex; }
set { comboBox1.SelectedIndex = value; }
}
And if you use ShowDialog to display Form2, it's easy:
private int index = 0;
private void button1_click(object o,EventArgs e)
{
Form2 F2 = new Form2();
F2.SelectedIndex = index;
F2.ShowDialog();
index = F2.SelectedIndex;
} Or better:
private int index = 0;
private void button1_click(object o,EventArgs e)
{
Form2 F2 = new Form2();
F2.SelectedIndex = index;
if (F2.ShowDialog() == DialogResult.OK)
{
index = F2.SelectedIndex;
}
} But with Show it's more complicated. What you need to do then is handle the FormClosed event:
private int index = 0;
private Form2 F2;
private void button2_Click(object o, EventArgs e)
{
F2 = new Form2();
F2.SelectedIndex = index;
F2.FormClosed += F2_FormClosed;
F2.Show();
}
private void F2_FormClosed(object sender, FormClosedEventArgs e)
{
index = F2.SelectedIndex;
}
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
sorry,it hasn't helped me.any other solutions
|
|
|
|
|
As we can't see any of your code, we can't see whether or not you implemented this properly. Given OG's experience as a developer, I would expect that the problem is you haven't implemented what he told you properly.
This space for rent
|
|
|
|
|
hi Pete O'Hanlon,
can u provide me any working example
|
|
|
|
|
OG already has provided you with the solution. You just need to plug it into your forms. Anything I put would just be duplicating his answer.
This space for rent
|
|
|
|
|
here is the code that I have tried
Form1 has a single button.
Form1.cs
private int index = 0;
private void button1_Click(object sender, EventArgs e)
{
Form2 F2 = new Form2();
F2.SelectedIndex = index;
F2.ShowDialog();
index = F2.SelectedIndex;
}
Form2 has a combobox and a button
Form2.cs
int i = 0;
private void button1_Click(object sender, EventArgs e)
{
i = i + 1;
comboBox1.Items.Add("Message" + i);
}
public int SelectedIndex
{
get { return comboBox1.SelectedIndex; }
set { comboBox1.SelectedIndex = value; }
}
aboveis the code.on running the above.i clicked the button on form1 it opens form2.in form2 on cliking the button I have added items to form1.then I close the form2 and reopen it from form1 button.then also no item will be present in combobox on form2.
please let me know where I did wrong.
|
|
|
|
|
You have missed out the code to re-add items into the combo box when you show the dialog again. I also don't see you returning these added items from Form2 back to Form1 to be re-added back in.
This space for rent
|
|
|
|
|
|
In a similar way that you got the selected index. Put a couple of methods in Form2 - the first to retrieve the list of combo items and the second to set the list. In the second method, populate the combo box - call this before you call ShowDialog. It's not that hard, so I leave it to you to complete.
This space for rent
|
|
|
|
|
how to retrieve combobox values ,I am unable to do that,could you please help me.i want the combobox values to remain same until the close of main form i.e form1.i am trying from two days ,please help me to come out of it.
|
|
|
|
|
Hi,
We know First time EF loads metadata into memory, that takes a time and it will be faster in the seconed time because the EF metadata was loaded in the memory, my question is:
In the Web Application (MVC or Classic Web Application) is the EF must loaded every request or it is loaded at the first time.
Please let me know the Best way to get the Best Performance of the EF.
Please let me know what is your recommended technology to use in our system (MVC with EF), (Web Application with ADO.Net),...
We need to use a technology with the following criteria:
1- Portability: Run across different platforms
2- Mobility: Mobile application
3- Scalability: Capability to handle growing of work amount (Small, medium, and
large business or data).
4- Security: Protect against malicious attack and other hacker risks
5- Cloud
6- Licensing: License price to use the technology
7- Performance
8- DB independence: Could be used with any Database (MS SQL, Oracle, MySQL)
9-Maintainability: The degree to which an application is understood, repaired, or
enhanced.
10-Product type: desktop, web, mobile.
11-Also what is your recommended 3td party tools such as DevExpress,...etc
Thank You
modified 1-Aug-16 2:31am.
|
|
|
|
|
EF is bootstrapped (the object model is generated) once in service-based applications, and as often as IIS feels like in IIS-hosted applications. On IIS, the system handles memory management and may pop your application at any time based on usage.
As portability, scalability, and interoperability are your key metrics, you'll likely need to roll your own ORM abstraction layer. That layer will need to be able to interface with different platforms (so target .NET Core), and will likely need to be controlled via configuration, and provide an interface that can be implemented across a wide spectrum of technologies (ALL databases also includes document stores, object graphs, and even flat files, just to name a few).
That also means that you'll need to build an interface for every platform that you want to talk to. To my knowledge there is no magic "Anything-to-Anything" ORM.
My suggestion: narrow your focus so that you can pick suitable technologies. You need an architecture and it's pretty clear that you do not have one.
My other suggestion: You have both mobile app and cloud picked as application types. That's inherently nonsensical; that would be at least 2 different applications. One would be a native device app (or possibly several, since you're trying to support multiple platforms) and most likely a RESTful micro-service back-end (which is where your ORM would most likely live).
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
A solution looking for a problem.
|
|
|
|
|
zead jalil wrote: Please let me know the Best way to get the Best Performance of the EF. Use a different tool. As suggested you should probably roll your own ORM/DAL.
What you are asking for is a recommendation for full stack development, not something you can get from a forum post. You need an experienced architect or very senior developer to sit down with you and go over your requirements in detail, probably over a number of days. Then generate a high level design document, that should take a few more days.
You are still going to get that persons preferences/prejudices as no one person is going to have detailed knowledge of all the technologies you have covered.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello, I want to create a calculator, so I need and I want to build a class of Math Parser that good word and functioned buy me, any can help me to do it?
Exm: ( 1 + 3 * 8 ) / 5 + 3 ^ 10 + 9 Mod 2 = ?
please Easy describeو step by step and simple
|
|
|
|
|
|
it was english, do you have a persian document?
|
|
|
|
|
This is an English site: all the documents will be in English.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Im doing some online course, I'm trying to learn C # . It appears to me that i created infinite loop. Any hepl?
class Program
{
public static int Sum(int start, int end)
{
if (start >= end)
{
return 0;
}
else
{
return Sum(start, end);
}
}
static void Main(string[] args)
{
int start, end;
Console.WriteLine("ukucajte prvi broj");
start =Convert.ToInt32(Console.ReadLine());
Console.WriteLine("ukucajte drugi broj");
end = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("suma je: " + Sum(start,end));
Console.Read();
}
}
}
|
|
|
|
|
Well, yes...
public static int Sum(int start, int end)
{
if (start >= end)
{
return 0;
}
else
{
return Sum(start, end);
}
}
If you call Sum with start less than end:
Sum(1, 2); Then it will look at the two values, and see which is the greater.
It's end , so the if test will fail, and it will execute the else clause ... which passes the same values to the Sum method so it does teh same thing again, and again, until it runs out of stack space and fails!
Probably, what you meant to do was
return start + Sum(start + 1, end); But to be honest, a recursive method to do this is a bit overkill!
Why not try it with a simple for loop?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|