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.
Related
Newbie here.
I am trying to create an app for a local library and was hoping to be able to have the synopsis of the book show up when you click on the synopsis button. I would like it to show different information depending on which record is being shown. Is this something that is possible to do?
Thank you community!
Megan
Library App User Interface:
This may be a very basic question, but I never managed to find something that quite covers my question.
I'm working on a program in C# that lets you select different options (Imagine a shopping list in which you can check different items) if you hit the print button, it is supposed to create a file that has a title, some basic information, all are provided by the program itself and than makes a list of basically everything you have selected. After this "page" is created, it should be send to the same "standard windows print menu" everything goes to when you hit the print button in any program.
I have never done anything like this before and I have no real clue where to start trying to format my texts, is there an elegant way you could do this?
Question:
Is there some effective way to hide some portions of the WinForm/WPF desktop program based on user settings/permissions?
Why I need this?
I'm starting a big accounting project which will contain hundreds of forms/dialogs.
The program is going to launch a main window which shows 1 to 4 divisions. The user selects each of those and it will then launch the a window which contains a sidebar with a bunch of buttons on sidebar (something like Microsoft Outlook). Now, when the user clicks on each of these buttons, it will open that section of the program and the user will work with that part. Based on the user permissions/settings, there's a need to sometimes hide some of these buttons though. For instance suppose I have 4 main divisions A, B, C and D. When you launch A, you'll get a sidebar containing A1, A2, ..., A100. A user might opt to see only A1 & A50!
Our initial approach was to use WinForms for this because the team was very familiar with it. I suspect that for doing so, we have to build some sort of model which contains information about user preferences and write lines of code like btnA1.Visible = false; a lot.
Frankly just thinking about doing that disgusts me. That's why I'm looking for a better way to achieve such result. I've searched around and found PRISM.
I'm not sure just yet but I think to use PRISM I need to make each of those buttons or their dialog a module and load them after I decide which of them is needed for the user.
It seems like a nice way to do this but considering the fact that this project is very urgent and we don't need to load different modules for different users (we just need to load them - ideally on demand - and sometimes hide some), I have some concerns:
My team might need some time to learn WPF
All of us don't know much about Unity and PRISM.
This might be overly complex, i.e. there might be a more simple way to achieve this without going into such lengths.
Also, I'm watching Prism & Silverlight Series and PRISM5 for WPF from Channel9.
a window which contains a sidebar with a bunch of buttons on sidebar (something like Microsoft Outlook). Now, when the user clicks on each of these buttons, it will open that section of the program and the user will work with that part.
That sounds to me like a TabControl. You'd rather not try to reinvent the wheel as it's already been invented.
The only difference between that example and your requirement is that instead of hard coding the tabs you're going to bind to a collection of ViewModels, like this, and then have each instance of TabViewModel toggle it's own IsVisible property depending on user permissions / user selections.
Simple as that. No need for complex MVVM frameworks. No need for silly obsolete useless winforms stuff.
I have iOS application with UITabBarController that contains UINaviagtionController for each Tab, like on the picture below.
I also want to port my application to WindowsPhone (>=7.5).
My question is: Which UI components/services can I use to create the navigation flow like in my iOS app?
Update
About UITabController you can think like about tabs in windows
The hierarchy of controllers that painted on the picture above mean that each tab in UITabController will have own UINavigationController (in the WP terms this is NavigationService). So if you will use the navigation on one tab this will not affect to navigation on other tabs.
But as far as I know by default WP application have only one instance of NavigationService.
So actually my question is relevant to a question: Can WP application use more than one NavigationService?
Windows Phone uses slightly different UI concepts. Instead of using Tab control you should use either Panorama or Pivot control. The former is used whenever you want to display completely disparate elements on a single large page, the latter is for displaying multiple views of the same data. This means that Panorama is used for displaying multiple views of different data.
Whenever you navigate from one page to another using NavigationService, it will keep the current stack. It serves as a history for the hardware Back button (unlike software button in iOS).
This means that you hold only one sequence of previously open pages in your application that can be navigated backwards, there cannot be any "side" stacks since they make no sense.
So if you were to navigate from one pivot item to some other application page, you would use the one and only NavigationService. Therefore each pivot/panorama item uses the same stack as the rest of the application.
If some things are still unclear, feel free to ask here.
I am in the middle of creating a form that will work with Tablet PCs. But right now i need to see what are the best practices that one can have when creating them. When i am creating forms i am referring to the forms where a user fills in data presses next it is similar to a survey application.
Does anyone have any helpful links or even suggestions that will help me understand the best practices for tablet PCs?
Although this isn't directly C# related, I found it to be a fine example of how to do forms for Tablets in the manner you describe, where the user can hit the Next or Back button to navigate thru a form in a user-friendly environment: http://jqtouch.com/
I just started converting a site that was designed for Tablet users earlier today and managed to finish about a 20+ field form to the point where I'm ready to plug in the existing .NET form fields first thing on Monday. If I can, I'll post an example after it's ready to go
Just create a next form & On Button_Click require.FormName & Form1.Visible=false
So a next form will open with different options,etc and the fist form will hide so it will look like a different page.