Monotouch UITableView or MonoTouch.Dialog - c#

I am building an iPhone app with MonoTouch and it gets its data from a web service.
The trouble I am having is that the first screen gets a list of say countries. When the user selects a country it should then retrieve the list of cities from the web service only for that selected country... Once a city is selected, the user is then taken through 2-3 more screens to add additional details like text, dates etc and there is a confirmation screen on the end where all the data is collected and posted to the web service.
I am struggling to find an optimum solution and determine if this can be achieved with MonoTouch.Dialog or if I should be using standard UINavigation views.
I have tried the first list with dialog and it successfully lists the countries that can be selected and they show an empty view when selected with a back button, however I am stuck in trying to find a way to populate that next view.
Any help please?
George

There are several samples available for MonoTouch.Dialog, starting with it's own Sample application that will show you how to use every elements (and multiple levels).
Another one is Touch.Unit that shows something similar to what you want to do, i.e. it initialize its UI from a list of TestSuite (instead of countries) and, when selected, shows a list of TestCase (instead of cities). That should be very close to what you're trying to achieve.

Related

Need help storing information on multiple item sand retrieve these items and display them on another screen

I have a project I am currently working on and looking for some advice.
I need to be able to create multiple items which contains certain variables (mostly strings) and save these newly created items. Then I need to be able to retrieve these items data and show it on a main screen along with all the other items the user created in their own boxes.
I mostly just need help with the general concept of what I need to learn to be able to achieve this and can finish it on my own.
Concept:
The program is supposed to be where the user (a desktop user, the data is saved locally for now) can upload different plants they are currently growing and track information on it, such as the type of plant, plant lighting, and other types of variables related to growing plants.
This information is created through a popup form asking the user for the information needed. (This part is already done) This data then needs to be saved in some format (which I need help on).
This data then needs to be used to display a list on the main page of all the plants the user added, giving vital information on the plant and then having a button to allow the user to view/edit data on the plant (I have very little idea on how to do this at the moment).

How do I get the button dynamically programmed

I am new to the xamarin development. I am working on an app that adds the information from the SQLite database about the user. But my problem is it should dynamically create the button to show the user info after entering the info in the database.
I am able to get the information from the database and shows it on the activity but unable to create the button as shown in the picture.
I am not sure if button will solve the issue or this is a list view.
This is a list view as it is dynamically populated and also has a separator.
You can create a custom cell with a image view, text view and a disclosure indicator.You can reuse this cell within the list view.
You can go through this sample on List views.

Combine two pages into one in Windows 10 UWP?

I have developed a Windows 10 app and I have List View with ListViewItems, when user clicks on the item, I am navigating it to new page in which details are shown for that ListViewItems. Now, my app needs to be used for desktop app also, so how can I combine these two views into one similar as Split View (left side item List and right side its data). Example Skype Preview app, in that when device is in landscape mode, then it shows, left side contacts list and right side chat details. I want to achieve same in my app. Is there any easy way to achieve this requirement or I need to create new UI for this?
You can refer to the official Master/detail sample. When on PC, it uses ContentPresenter and bind its content to the selected item of ListView. And when on Mobile, it uses navigation to navigate to the detail page and together pass the selected item as parameter to the detail page.
Is there any easy way to achieve this requirement or I need to create new UI for this?
I think it is needed to modify your layout, and you can use VisualStateManager to make your layout adjust to the window's size.

how to use datastructures in windows form in c#

I don't know if I am saying this clearly but I wanted to know how can we use data structures in windows form in c#, for example if I want to make a shopping store, in console app I can use linked lists to show list of items and when they are selected I put them in stack to make invoice later on..
but I want to know how to do all this in windows form, I click a button and it gives the linked list in form of buttons.
and one more thing if we can do the above mentioned thing can we also make linked list of buttons?
I know its a vague question but I want to know if we can do this.. if no then I stick to the console app.

Wpf application -- How to save and load which screen the application is on

I've looked over Stack overflow and seen some posts that almost solve this problem but not really. To be specific I'm referring to an application that is deployed to users who might have 3 or 4 displays and the application would want to remember which one to go to on startup.
I have a WPF application and I want to save what screen it was on when the form does it's OnClose. Then when it loads I want to put my application on that screen.
How can this be done (without hacky Win32 API calls)?
EDIT: In a previous StackO post someone mentioned doing something like:
var screen = System.Windows.Forms.Screen.FromRectangle(
new System.Drawing.Rectangle(
(int)myWindow.Left, (int)myWindow.Top,
(int)myWindow.Width, (int)myWindow.Height));
Once I have screen it seems that the only thing I can do is check whether the application is either on the primary screen or not. Which is fine...if my users only have two screens, but not good if they have 3+. Is there something better I can do with this resulting screen object than just check if it's primary.
You can get more infomation on multiple monitors from Screen.AllScreens property
http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.allscreens.aspx
Also from memory, I think if you just save your Window Left and Top position and restore them when you load your app, this works with multiple monitors.
I did this previously with a ViewManager class, a custom XML config file and MVVM. Essentially, when OnClose is called, the ViewManager class (A custom class that really just held a collection of also custom ViewInfo instances) is polled to find out which views are currently open and in which order (as they could be tabbed through using Ctrl+Tab) and what the ID of the record was that was being displayed; this app was using Entity Framework to access database data, each application view mapped to either a collection of records or a single record of a specific type.
Anyhow the XML output would contain the name of the View, the Application (there were several portions to the app which I referred to as applications internally) to which it belonged, information about the record that was loaded, etc.
Upon loading the program, the only View that is automatically loaded is the HomeView which potentially contains all other views. ViewManager checks the XML file and loads views based on it's content. This action could be turned off in the options screen so that users where presented with a clean workspace upon entering if they like.

Categories

Resources