Request For Community Programmers
-
This post is deleted! -
Dont suppose you know any good tutorials for databinding a ComboBox to an ObservableCollection? Id like to make an ObservableCollection <objdb>of KoreaObj files (strictly speaking a simple class whose property is the containing folder of that file, as a string), and then have the ComboBox populated by that collection. Been poking at it here: https://github.com/Blu3wolf/3DDBBuilderGUI/tree/databinding-combobox
Not had a great deal of luck so far. I think I have made such an ObservableCollection, and the class of which type the Collection is. Not having so much luck with getting the ComboBox to reflect that collection, however. Had a look through a number of tutorials, such as this one: https://www.codeproject.com/Articles/301678/Step-by-Step-WPF-Data-Binding-with-Comboboxes
The ones I have found so far mostly seem to use a List instead of an ObservableCollection. They also seem to assume use of the MVVM structure, which is a bit confusing to try to ‘simplify’ to understand the core concepts.</objdb> -
Sounds like WPF or WinForms is where I should be for this, then. I suspect that for the forseeable future, managed code is for the best, for me.
It’s been obsoleted along with Silverlight and Mono has no implementation at all. BUT it’s not going anywhere.
You definitely shouldn’t throw out your existing knowledge with WPF! Don’t start over. People still use XNA despite it being very officially ignored by MSFT for many years.
I didn’t intend my comment to cause that kind of a reaction. My apologies.
It’s definitely best to start programming with automatic memory management and either a scripting language, or a typed language with an easy type system. C# is as good as it gets for beginners.
Once you start visualizing the models, drop me a PM. I can help you with drawing them in pure software (textured, shaded or wireframe) without learning opengl or direct3d.
-
Not had a great deal of luck so far. I think I have made such an ObservableCollection, and the class of which type the Collection is. Not having so much luck with getting the ComboBox to reflect that collection, however. Had a look through a number of tutorials, such as this one: https://www.codeproject.com/Articles/301678/Step-by-Step-WPF-Data-Binding-with-Comboboxes
The ones I have found so far mostly seem to use a List instead of an ObservableCollection. They also seem to assume use of the MVVM structure, which is a bit confusing to try to ‘simplify’ to understand the core concepts.If you can’t do it with declarative data binding, do it with events. From my Forms experience, data binding has some edge cases where it’s very counterintuitive to get it right.
You can use MVC/MVVM if it helps you, but if it slows you down, just ignore it. Once you have experience with software architecture, you won’t need a “MVC framework” to separate code right.
-
This post is deleted! -
Getting the containing folders by asking the registry nicely for the BMS install, then looking at the theaterdefinition.lst file for the other theater.tdf files, then reading them and looking for the 3dobjectdir line which gives me the relative location from the Data folder. I build that into a path and I have a list of folders that contain KoreaObj.LOD hopefully.
I was thinking I can make databases a class, and the path to that database being a property of that object. Then I can add each object to the ObservableCollection <objdb>and if the combobox is bound to that, and displays the path, that should work? I think?
It’s definitely best to start programming with automatic memory management and either a scripting language, or a typed language with an easy type system. C# is as good as it gets for beginners.
Once you start visualizing the models, drop me a PM. I can help you with drawing them in pure software (textured, shaded or wireframe) without learning opengl or direct3d.
Well, I played a bit with Lua before getting into C#. Dabbled a little with JavaScript.
Not sure I will need to visualise models for this project, actually. This is just going to be a wrapper for the command line tool, 3ddb_builder.exe which I think doesnt do much with editing or displaying models. Pretty much the extent of it is adding GUI controls and making those controls fire off command line instructions, then doing useful stuff with the results of those instructions. Getting stuck on the first part, so fingers crossed for the second part!!</objdb>
-
This post is deleted! -
I think I have got a little better understanding of databinding, now. This post was going to be my asking for help with that, but I figured it out
Im not sure anything else really needs to be in the ObjDB class, really. I guess if I used the DirectoryInfo class instead, it would accomplish the same task and save me a class definition.
I started a new project for the sole purpose of trying to make the databinding work, and it only took about an hour to get the base concept working. So I guess now I move that across to the existing project and see where the differences are between the old, nonworking version, and the new, barebones but working version. Slowly getting somewhere!
-
Gotten somewhere master is updated again with working databinding finally. Hopefully it is the sort of thing that gets easier with repetition. Also discovered I can set the working directory in ProcessStartInfo, which makes me happy. Ill be able to simplify my process calls to 3ddb_builder.exe with that to eliminate the /objectdir argument, and I can do the same for the /build function which doesnt habe a corresponding CLI argument. I can just set its working directory instead and achieve the same goal
-
This post is deleted! -
Then for now, the build option is just going to require the extracted DB to be copied to the GUI folder first, then. Seeing as the 3ddbbuilder tool normally expects to be copied to the folder containing the extracted DB for it to build. According to the documentation, there isnt a parameter to tell it to build a DB located in another folder. And apparently, I cant just start it here and set its working directory to be some other folder (I really liked that plan )
I note I can change the working directory of my own exe with Directory.SetCurrentDirectory(). I guess I cant do that to the other app, though.
I guess the other way around it would just be copying the exe and dll to wherever it was needed before building the database, then deleting it afterwards. That would probably not run into any additional permissions issues that were not already going to be run into, really.
-
This post is deleted! -
I can specify where the output goes, but I cant specify the location of the input.
EDIT: actually, according to the documentation, I can only specify the input location, not the location to output to. That is much more reasonable, I guess.
EDITED: well, despite the documentation, it seems I can specify the output location also, by using the /objectdir parameter in conjunction with the /build_old parameter. The argument taken specifies the output location. So that is that problem sorted.
-
I can safely say this has been a learning experience! Lots of new stuff learned. For example, today I learned that I should be validating inputs rather than just assuming that things are what I expect them to be.
-
Now let’s ask the community who is willing to create a rock solid, super trooper, super wow and stable User Interface for this application?
[h=2][BMS Tool] F4 3D Database Builder - v4.8[/h]
As I understand it, it will be a command line injector - executor and it will wait for what ever results this app returns.
It will maybe need some file browsers to select files and text editors to provide new names ans selectors (radio buttons - combo boxes etc) to select the various options and parameters this executable has.
Maybe set some default folders…
Maybe initiate the new ogglod to view a model…https://github.com/Blu3wolf/3DDBBuilderGUI/releases
Well, rock solid I am not sure about. Super trooper and super wow, perhaps not. Stable? It ran into an unhandled exception while I was testing the Test function. So I guess not stable, either
It does handle all the functions of the tool, and it does wait for the results (I guess I need to learn about asynchronous programming to get around that). File browsers, check. Text boxes, check. Comboboxes, check. Default folders are set by searching your BMS install to find object folders. So, check. Does not yet do anything with ogglod. Hasnt been extensively tested. Doesnt yet do anything very helpful for updating the database - you can do it, but there is way more stuff that can be done to make this more helpful.
What would be helpful is concrete information about what stuff the tool should do, how it could help you but currently doesnt.
The other useful thing would be any errors or unexpected behavior - stuff it currently does but possibly shouldnt.
-
This post is deleted! -
The error was I tried to Process.Start() a file which apparently hadnt quite been created yet. Called the test function which outputs a text file, then tried to open a text file of that name which threw an exception that no such file existed. Cant remember details at this junction.
As far as waiting, the application presently hangs while waiting for the 3ddb_builder.exe process to finish its assigned task. Opened Issue #3 for it.
-
This post is deleted! -
This post is deleted! -
Invalid Attachment Specified?