Search Results - VBForums

Search:

Type: Posts; User: MrNorth

Page 1 of 13 1 2 3 4

Search: Search took 0.05 seconds.

  1. VS 2013 Re: Refactor select-if statement with lot of duplicate code

    Well it works, but code that works is not always good code...

    Like I stated



    Cheers
    /Henrik
  2. VS 2013 Refactor select-if statement with lot of duplicate code

    Hi!

    I came across this piece of code today:



    Public Class Form1
    'Viewmodel stuff that binds to a UI
    Private Property ShowA1 As Boolean
    Private Property ShowA2 As Boolean
  3. VS 2013 Re: Method for conversion, can it be improved?

    Thanks for your suggestions. Yes one idea is definetly to use binaries in the database, but it is a legacy db from the 80's that has been moved intoa sql server, and lots of other systems depend on...
  4. VS 2013 [RESOLVED] Method for conversion, can it be improved?

    Hey!

    We have a situation where we are using data from a service that is from a non normalized database. In this particular case we are trying to create information to a graph component on what...
  5. VS 2013 Re: Discussion on how to share data between private methods

    That sounds reasonable. We ended up with a mix. We put two business objects in the constructor, and then we assigned private member variables to whatever felt the best. Everyone is happy now.
    ...
  6. VS 2013 [RESOLVED] Discussion on how to share data between private methods

    Hi!

    I had a discussion with colleagues today about a class we all are working on. It is a validator class that uses dependent on two business objects

    The purpose of the class is to validate...
  7. Replies
    3
    Views
    154

    VS 2013 Re: How to unit test this method?

    Thanks for the reply. I did manage to do something similar but with Microsoft Fakes, where I used a shim of the System.Windows.MessageBox and just made teh show method return whatever I...
  8. Replies
    3
    Views
    154

    VS 2013 [RESOLVED] How to unit test this method?

    Public Async Function ShowYesNoAsync(message As String, title As String, icon As MessageBoxImage) As Task(Of Boolean) Implements IDialogService.ShowYesNoAsync
    Return Await...
  9. Replies
    0
    Views
    102

    VS 2013 Question about Prism and MVVM

    Hi!

    I am currently developing a WPF prims application, and there are some issues we haven't sorted out. Hopefully there is someone here that can give some tips.

    1) We have a view composed like...
  10. Replies
    2
    Views
    141

    VS 2013 Help to implement task based algorithm

    Hi!

    I have really hit a wall. I need to figure out how to sync the execution and cancellation of tasks based on the following program flow:

    CASE WHEN STARTING APP...
  11. VS 2013 Re: How to wait for an await method to cancel?

    Thanks for the reply.

    Yeah, I ended up doing something similar to your idea, but instead of queuing up all calls, in the carousel_changed event handler I check if work is in progress AND if there...
  12. VS 2013 [RESOLVED] How to wait for an await method to cancel?

    Hi!

    I have an application where the user can scroll through different menu options (like a carousel). And for each of these menu options, different data is to be loaded in a content view.

    If...
  13. Replies
    3
    Views
    233

    VS 2013 Re: How to improve this code?

    Thanks, I figured the code was overly complex!

    /H
  14. Replies
    3
    Views
    233

    VS 2013 [RESOLVED] How to improve this code?

    Hi!

    I have written a small method that keeps track of a pivot control containing months from jan-dec. The pivot can scroll both ways and I have to keep track of which way the scrolling occurs, and...
  15. Replies
    0
    Views
    725

    Best way to generate table?

    Hi!

    We are debating which is is the best way in XAML (for windows phone 8.1) to generate a simple grid with x times y cells, where each cell should be clickable and have it's own datatemplate....
  16. VS 2013 Re: When is the best way to load initial data (MVVM, IoC, Unit testing)?

    The VM is constructed by Unity when the application starts.

    /H
  17. VS 2013 When is the best way to load initial data (MVVM, IoC, Unit testing)?

    Hi!

    I am developing a WPF-application with the MVVM-pattern (no code behind). Yesterday I had a discussion with a colleague on where to load some initial data. Our viewmodel has a...
  18. VS 2013 Looking for a good way to handle string parsing

    Hi!

    I am currently looking at an old .NET 1.1 system, which is a "broker" of sorts, that recieves from a remoting endpoint string values that come from bar code scanners. The code is a horrible...
  19. Re: How to write a method that loops through a given interval by hour

    Well, the above code was faulty... so I gave up trying to use DateTime objects for the enumeration, and resorted to a nested for loop.




    public List<DateTimeValue>...
  20. Re: How to write a method that loops through a given interval by hour

    Hi!

    Sorry for c#, apparently I didn't have vb installed on this client.

    I solved it by not returning DateTimes, since they are a somewhat different animal than what they have in the model. I...
  21. How to write a method that loops through a given interval by hour

    Hi!

    Our customer has a data model where the data is represented by date and hour. Dates are normal dates like "2014-01-01" and there is a separate property on the model for the Hour, from 1 to 24....
  22. Replies
    0
    Views
    198

    4.0 How would you refactor this code?

    Found some "smelly" code...



    public void SendHourlyDataByUnitId(int unitId, DateTime fromDate, int fromHour, DateTime toDate, int toHour)
    {
    if (fromDate.Date ==...
  23. Replies
    2
    Views
    233

    Re: How to improve this SQL

    Hi!

    Yes I agree that code was sure hard to read after I was finished with it. Your code works like a charm, just a few typos and it looks much more clear than before without too much repetitive...
  24. Replies
    2
    Views
    233

    [RESOLVED] How to improve this SQL

    Hi!

    I just wrote up some SQL that I am not really happy about. One of the problems is that I ahve to query a really nasty non-normalized table with lots of duplicate records.

    The thing I am not...
  25. VS 2012 Any tool or setting in VS that prevent/alert on cross thread operations?

    Hi!

    I am doing code review of some of my customers developers code, and found that two of them are producing code (VB.NET and C# windows forms) with a lot of potentially dangerous calls to the UI...
  26. VS 2008 Re: How to programmatically add columns with data to listview or datagridview?

    Interesting thought, but not exactly what I need.

    I have 5 checkboxes representing 5 columns in the grid with statistical data. 3 columns in the grid are mandatory and should always be visible. So...
  27. VS 2008 [RESOLVED] How to programmatically add columns with data to listview or datagridview?

    Hi!

    I have a small issue I have been working on.

    A UI has a search button and a couple of check boxes. Depending on what check boxes are checked, certain columns of data sould be listed in the...
  28. Replies
    0
    Views
    240

    3.0/LINQ Is this a good testable method?

    Hi!

    I started doing maintenance on an old system, and the first thing I did was to fix a bug in a method that loads a connection string from a custom cml config file.
    Here is the code:


    ...
  29. Replies
    5
    Views
    286

    Re: TFS 2012 and Visual Basic 6.0?

    Hi!

    Thanks for all the assistance. I did manage to solve it by installing VS2010 shell and this tool https://visualstudiogallery.msdn.microsoft.com/bce06506-be38-47a1-9f29-d3937d3d88d6

    After...
  30. Replies
    5
    Views
    286

    [RESOLVED] TFS 2012 and Visual Basic 6.0?

    Hi!

    I have been assigned to do some changes in a VB6 + ASP (interdev) project. The whole development environment is in a virtual machine running Windows Server 2003.

    Previously, they used ...
  31. Re: Have problem with url and file://

    Hi!

    My mistake, I assumed this part of the forum was for asp classic and vbscript.
    I solved it by putting " around the path, seem to work like when you are typing paths with spaces in the command...
  32. [RESOLVED] Have problem with url and file://

    Hi!

    I want in ASP generate urls on a web page that point to locally stored files, like a file browser. I build the paths in visual basic code on the server.

    The problem is that files with a...
  33. Replies
    1
    Views
    203

    VS 2012 Help with LINQ query

    Hi!

    I need to create a LINQ query that flattens a list of nested objects into a list that I can easily bind to a gridview.

    The object hierarchy looks like this

    Factory A

    * Client 1
  34. Replies
    0
    Views
    194

    VS 2012 Execute multiple sync operations at once

    Hi!

    I have been trying to follow the example here

    http://msdn.microsoft.com/en-us/library/hh696703.aspx

    but is not exactly as I want to do, the biggest difference is that they have a fixed...
  35. 4.0 Any way to write a method that accepts generic parameter and assign value?

    Hi!

    I am working on refactoring an application that is written as a Model View Presenter (winforms).

    I am stuck on a scenario where the view fires events to the presenter when certain...
  36. 4.0 Refactor this code for binding data to Combobox

    Hi!

    I came across this piece of code from a BaseForm class in one of our projects:



    public void BindDropdownList(ComboBox control, string displayMember, string valueMember, object...
  37. VS 2012 Question about domain entities and properties only for display.

    Hi!

    I am developing a WInforms application where I use Fluent Nhibernate as OR-mapper.

    We have chosen not to expose certain DTO objects to the client, but instead use the Domain Models when...
  38. Replies
    0
    Views
    245

    VS 2012 Help with MenuStrip and MDI

    Hi!

    I have a problem wiht the MenuStrip in MDI applications. I have set the child menus to merge with the main menu. This works just fine, BUT when this happens, the menustrip on the child form is...
  39. VS 2012 Re: Windows FOrms and MVP, Closing forms...

    Hi!

    Thnaks for your suggestions. I solved it by injecting the unity container to the "MainPresenter" and then resolve presenters from those when starting new forms. Kind of the "factory pattern"...
  40. VS 2012 [RESOLVED] Windows FOrms and MVP, Closing forms...

    Hi!

    Im currently building an MDI windows forms application. I use the pattern "Model View Presenter" with the "Passive View" approach, which means that the view know nothing of the presenter, and...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.