Unity Setting When Defined In Code?

Apr 14, 2010

I have problem when asking for default ILogger from Unity container. I have this setting defined in code (its VB.net)

Dim container As IUnityContainer
...
container.RegisterType(Of ILogger, NullLogger)()

[code].....

View 1 Replies


ADVERTISEMENT

Implement A Constructor In MVVM Unity?

Feb 28, 2012

I have just started using MVVM design pattern with unity and I'm strugling to work out how you add a constructor.my code currently works if I comment out my constructor that requires input the view gets added to the shell.

Protected Overrides Sub ConfigureModuleCatalog()
MyBase.ConfigureModuleCatalog()
Dim moduleCatalog As ModuleCatalog = CType(Me.ModuleCatalog, ModuleCatalog)
moduleCatalog.AddModule(GetType(GridModule))
End Sub

how do I pass in variables into my GridModule ?

View 5 Replies

Automatically Register All Reports In A Unity Container?

Oct 28, 2010

I'm trying to automatically register all reports in a unity container.All reports implement IReport and also have a Report() attribute which defines the title, description and unique key (so I can read these without instantiating a concrete class).So...I get the report types like this

Public Shared Function GetClassesWhichimplementInterface(Of T)() As IEnumerable(Of Type)
Dim InterfaceType = GetType(T)
Dim Types As IEnumerable(Of Type)[code]....

why the container isn't preserving the registration?

View 1 Replies

Repository Is Nothing But Added In The Container Later (correctly) (using Unity, Repositories) In ASP.Net MVC 3?

Sep 1, 2011

I have a "MenuService", which uses an "MenuRepository".When the MenuService is created, it loads correctly with the MenuRepository.Then it wants to save it in the UnityControllerFactory, but the MenuRepository in the MenuService is Nothing then (it wasn't before).Some additional info:I'm using the Unity and Repository pattern.The problem happens with a partial view (for a menu), which i have included in the "HomeController", it could be relevant information, so i included this, just in case:

Function Menu() As ActionResult
Return PartialView("~Views/Shared/_Menu.vbhtml", _MenuService.GetAllMenuItems)
End Function

Also, my partial "menu" view is like this:

~/_Menu.vbhtml
@ModelType IEnumerable(Of FacturatieMVCv2.Domain.Slave.MenuItem)
@*<div id="myslidemenu" class="jqueryslidemenu">*@

[code]....

And i'm calling the partial view with:

@Html.Action("Menu","Home")

View 1 Replies

Forms :: Using A TextBox Defined In Code

Jan 7, 2012

I started making an application that would perform matrix multiplication. For that I need to take in the matrix data(row,column, elements). I've asked the user about number of rows and columns in a form. I then send him to another form which will contain row*column number of textboxes used to enter the elements.After reading a bit about the TextBox Class I used the following code to create the variable number of textboxes.[code]How do I get the data that the user enters into these boxes ? Using the usual textbox.text gives me a build error.

View 6 Replies

Wpf - Bind To Custom Control Properties Defined In Code Behind

May 14, 2011

I have a custom control defined in code-behind:

Public Class MyControl
Inherits Button
Private _A As String

[Code]......

What code I have to write to bind to those properies?

View 1 Replies

C# - Make Sure That The Class Defined In This Code File Matches The 'inherits' Attribute?

May 28, 2012

Sometimes in my web applications I used to get this sort of error, I have no clue why is it coming however if I refresh the page few times the page is loading normally.I am using .net framework 2.0 and visual web developer 2005.

View 1 Replies

Code - Calculations Are Not Being Excecuted Properly - Ertain Equations Are Being Done Before Certain Terms Are Defined

Dec 10, 2009

Due to the way I currently have it setup, the calculations are not being excecuted properly. I've been tweaking for a while and haven't gotten it yet. I think the problem is that certain equations are being done before certain terms are defined. If I click the calculate button multiple times, it works fine, but I need it to function on the first click.

Take a look:

Public Class frmford
Dim Make, Model, InitialPrice, Options, AirConditioningTax, GST, PST, Total, Subtotal, APR, Months, RoofRack, SunRoof, SideAirBags, TintedGlass, RearSpoiler, GPS, PowerLocks, FreightAndPDI, AirConditioning As Single

[CODE]...

View 17 Replies

Define User Defined Paper Size In Bar Code Zebra Printer?

May 1, 2009

How to define user defined paper size in bar code zebra printer using dot net

View 5 Replies

User Defined Directories - Code - "Project Processing' Section Doesn't Run At All?

May 28, 2009

I am having trouble with this code. Can someone tell me why the "Project Processing' section doesn't run at all? The 'Client Processing' section runs and executes find but it seems the 'Project Processing' section does not.

Code:

Public Sub btnExecute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExecute.Click Dim mBaseFolder As String Dim mProjectFolder As String Dim mClientName As String Dim sClientFolder As String Dim sProjectFolder As String

[CODE]...

View 3 Replies

'User Defined Type Not Defined' When Trying To Define A New 'process'

Dec 29, 2011

I am trying to redirect command line output to a list box in a vba macro, and I've found some code that I think might point me in the right direction, but I keep on getting the same error. When I use this code [code]It gives me the error in the title and highlights the first declaration line.What does it take to define a new "process".

View 1 Replies

Create A New Setting From Source Code?

Apr 28, 2010

Is there any way to create a new setting from source code instead of having to create the setting first and editing it later?

View 5 Replies

DB/Reporting :: Setting Field Value From Code?

Feb 19, 2008

I have an open database (dataset) with two tables. It is binded to toolboxes, but I have one field, what I have to calculate about other parameters. I have binding navigator, and I can set field values from controls (eg. toolbox). I can step my rows, with binding navigator. I can update my database. But how can I set field value from code?

I want a code line:
database.fields("fieldname") = something - or something like this

View 8 Replies

Setting A GridView's Colour In WPF Via Code?

Mar 30, 2011

I've been searching for quite a long time how to do this. I don't know how to set the colour of a row item in the GridView (WPF) using code I don't want an example in XAML. My data comes from me loading & pulling apart an XML file. I then put it into a small class with properties and those are bound to the column to populate the data. Later, it can begin some functions on the table's data. Because this takes at some times over 10 minutes it's on a thread & I would like to colour the rows I've completed parsing depending on the result. (IE: Red for HTTP error, Orange for XML parsing error ect...)This is the GridView's XAML:[code].....

I am then parsing the data using the url column. I am currently changing the selected item as I go through. I want to know if theres something I can do to change the specific item. Let's assume I'm on row 500: I use: setSelected(i) which uses Dispatcher to safely change the selected row. Is there anything I can do to change the colour as well?

View 1 Replies

Setting Anywhere That Will Enable To Open The Code?

May 23, 2010

This there a setting anywhere that will enable you to open the code editor and all sub/functions etc will be "shrunk", i have a lot of sub and hate opening the IDE att the start of the day and having to minimise everything.

View 2 Replies

VS 2008 : Setting IE Proxy In Code?

Dec 7, 2009

I've been trying to search a way to set IE's proxy in code and ran across the WinINet API.I then found some code that someone made to set the proxy:

VB.NET
' The Windows API function that allows us to manipulate
' IE settings programmatically.
Private Declare Auto Function InternetSetOption Lib "wininet.dll" _

[code]....

how to modify it correctly.

View 2 Replies

Binding A TextBox To A Setting Withoute Using Code?

Aug 18, 2011

How can I bind a TextBox to a Setting withoute using code like this below?

Private Sub Form1_Load(ByVal sender
As System.Object,
ByVal e As System.EventArgs)
Handles MyBase.Load

TextBox1.Text = My.Settings.MyString

[Code]...

View 4 Replies

Forms :: Bug When Setting FolderBrowserDialog1.SelectedPath In Code?

Mar 2, 2010

Do you know why this happens? If (strCampaignFolder <> "") Then 'Next line works fine when strCampaignFolder already has a value set by FolderBrowserDialog1.SelectedPath further below.

FolderBrowserDialog1.SelectedPath = strCampaignFolder Else 'PROBLEM: Next line causes the external .NET code 'UnsafeNativeMethods' to put the app to sleep when strCampaignFolder has no existing value!

[Code]...

View 3 Replies

Setting Column Count For Datagrid Using Code

Dec 7, 2011

I have a form in which i need to add column depending on the counts of records in database. For that i need to set column count using code.

View 4 Replies

Setting Richtextbox Font Size Through Code In Vb?

Jan 9, 2012

I am trying to find an example of code to help me set the font size of a richtextbox.

View 2 Replies

Setting User Control's DataContext From Code-Behind?

Jul 8, 2009

This should be pretty easy, but it throws VS2008 for a serious loop.I'm trying out WPF with MVVM, and am a total newbie at it although I've been developing for about 15 years, and have a comp. sci. degree. At the current client, I am required to use VB.Net. I have renamed my own variables and removed some distractions in the code below, so please forgive me if it's not 100% syntactically perfect! You probably don't really need the code to understand the question, but I'm including it in cas.

I have a very simple MainView.xaml file:
<Window x:Class="MyApp.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

[code].....

View 3 Replies

VS 2008 Bug When Setting FolderBrowserDialog1.SelectedPath In Code?

Mar 2, 2010

Do you know why this happens?

vb.net
If (strCampaignFolder <> "") Then
'Next line works fine when strCampaignFolder already has a value set by

[code].....

View 4 Replies

VS 2008 Pre-setting Scan Options In VB Code

Feb 4, 2011

We have become disenfranchised with our med records scanning package and are doing in house development to create our own. With most of the interface built out, the monster of calling the Fujitsu Twain driver and pre-setting scan options is what I am looking for. Fujitsu does not have an SDK available on their web for this.

[Code]...

View 2 Replies

File I/O And Registry :: Setting The Font Size And Style With Vb Code

Jan 14, 2010

I set the font size and style using Vb code as i'm designing a Notepad like application, and when i start a new form i want to reset all the settings. Everything else is working, i'm just having a hard time working these out.

View 4 Replies

Tutorial/instructions On Setting Up A View-Switching Application In VB Code?

Dec 15, 2011

I have been a VB6 developer for several years, and switched to .NET couple of years ago.Since then, I switched to WPF, and now, i am attacking Silverlight + PRISM I whould like to know if anyone of you programmers have some GOOD and CLEAR tutorial/instructions on setting up a View-Switching application in VB code please?So the main goal whould be a menuregion (working!).When the user clicks some buttons, i need the MainRegion to refresh its view, depending on the selection ofcourse.I am also looking on information how to keep track of the changes made when trying to switch the view?

View 2 Replies

VS 2008 Setting The Back Color Property Of A Text Box By Code

Sep 4, 2010

I am trying to change the BackColor property of a text box , by code , but I can't do it ... I know the color value (i.e. 255;445,255) but I can't find out how can I set that value by code ... This MSDN has become so useless I can barely get any help from it .

View 8 Replies

VS 2008 - Code Tells That = Type "Streamwriter" Is Not Defined?

May 22, 2009

I have this code to save a listbox

[code]...

But it tells me = type "Streamwriter" is not defined same thing goes for File How can I solve this?

View 4 Replies

Datagrid.mouseup - Error "user-defined Type Not Defined"

Jun 21, 2010

[Code]...

a messagebox appear that show user-defined type not defined i had try another code but it still same error.. i'm using vb6

View 1 Replies

Error 1004: Application Defined Or Object Defined Error

Apr 14, 2009

Why isnt this working?Sub Macro1()

[Code]...

View 1 Replies

Setting Short Function By Setting Poker Game Points?

Aug 23, 2010

I need help and wondering if you can help me to get my first project...it's a hobby and wondering if you can get me code for this so i can see how it does it* Evaluate( ) Prints the evaluation of the hand to the evaluation Label.

o If IsFlush( ), prints "flush; "
o calls SetPipArray( )
o Uses a For Loop to go through pipArray. For each element, uses a Select Case statement to

[code]....

View 9 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved