Class - Add A Readonly Property To Layer That Is Calculated Using Some Layer Information?
Nov 30, 2010
I am working in VB.NET defining my own classes. I have 5 classes, Policy, Coverage, CoverageCollection, Layer, and LayerCollection. Policy has a bunch of data items, one of which is of type CoverageCollection. Coverage has a bunch of data items, one of which is of type LayerCollection.
Policy
private id as Long
private name as String[code].....
Then I do like "dim p as Policy". So, iIn order to get to properties on a Layer, I reference it like p.cov(0).lyr(0).face. What I am trying to do is add a readonly property to Layer that is calculated using some Layer information but also using something from Coverage (or even Policy). I can take this in as a parameter to the property, but I think there should be a way to get at Coverage/Policy information since I am "under" it already. Is there a way to do this?
I am generally following this tutorial, the main differences being I'm using 2008 R2 Express and Windows Forms, he is using 2005 & ASP.NET Web Site:'m building a minimalist Windows Form project for learning purposes. So I'm using a 1-table database with 2 columns, ContactID & Name. I added a dataset file, 'ContactsDataSet.xsd' to my project and added a single minimalist table adapter with just a fill() & getdata() method.Then I added a DataGridView control and connected it to the ContactsDataSet to confirm it was working and that worked fine. I ran it and it filled up with data as expected. Everything up to this point was auto-generated code.
I am trying to prototype an application with a data layer on my computer at home using Visual Basic 2008 express edition with SQL Server Compact 3.5. My production situation at work is SQL Server 2000 and I am using Visual Basic 2005 professional for development.I am trying to write the code to create a seperate data layer. Here is my code. First the data layer:
Imports System.Data Imports[code].....
My Problem is that the data does not show up in the text boxes.
I'm having a problem with making the Picturebox Transparent to the a Image layered underneath I'm getting tranparent to the form background color. Is there a Visual Basic Code Solution to achieve these properties? I used the imagebox in Visual Basic 6 and had no problem with this.
Ok, so I was playing around with Ninject, a "Service Layer" and a "Repository Layer".I built a simple console application to to play around, this is what I came up with:
Imports Ninject Module Module1 Sub Main() Dim Kernel As IKernel = New StandardKernel(New CustomerModule) Dim Service = Kernel.Get(Of CustomerService)() Console.WriteLine(Service.GetCustomerByID(1).Name) Console.Read()
I would like to build a base class for my SQL Data Access Layer. I have most of it based out, but have a question about how to handle errors within the base class. I have a method for ExecuteNonQuery, ExecuteReader, ect...
I have a form which has two panels each containing there own controls (Pnl1, Pnl2). By Default I want Pnl1 to show and Pnl2 to be hidden which I have set but I want Pnl2 to sit ontop of Pnl1 so when Pnl2 is selected Pnl2 is Visiable and Pnl1 is hidden. Therefore Pnl2 and the controls sit in the same place as the controls in Pnl1. I have got everything lined up but as I move Pnl2 over Pnl1 to sit ontop, Pnl2 is moved into Pnl1 and becomes a Panel within the Controls of Pnl1. Therefore when I hide Pnl1 everything is hidden as Pnl2 is part of Pnl1.
(non-coding request)Okay, I have my client, my server, and my map editor...a 2d online game, and yes it's written in VB.NET.I have had a lot of trouble finding anything to do with adding an animation layer something that will flash with a timer to appear as if something like fire is animated. I have a lot done so far and I kinda want to stick with VB.NET working with this.
I'm not really looking for code here, but maybe an idea of "how" an animation layer plays into a map editor and client...specifically what is needed.Running this through my head I believe I am going to need a timer on both the map editor and client, showing and hiding the animation layer...but I don't think it is that easy, and am hoping someone here has an idea of the logic of how this works. I'm almost certain that the timer doesn't go on the server to control this, but am probably wrong.
I have an application that does complex calculations for members. Each member can have multiple US states linked to their profile. Each state has got different calculations for each course a member completes. As of now I have been performing the calculations in the DB (SQL Server 2008) and then sending data back to app layer where they can see their history and then download a certificate for each course. I have a business logic layer but not a lot happens there. I know this has been asked a lot but where do you think I should perform these calculations: business layer or database? I am going back and forth
I'm having a bit of trouble creating draggable panels that will stay on top of all the other panels and not 'hide' behind them. My code for dragging works fine, I just need to set the layer of a panel to the top of all the different controls
i know drawing or fill shapes codes (creategraphic) ... but how i can to draw a shape like ellipse as a new layer that user can to move it after draw and also can to change colors and other property .
I have created a class called clsLogIn [code]Now I am on a different form, frmSchedule, and I want to get the ProviderNum property from clsLogin into a text box.
What i am looking is how to create a layer between the application and database? I need to create an xml files where the application will fetches the data and updates the data into local cache. Later from the xml files the data has to be transferred to database. Here the application need to work even when the application is in offline and database is not been connected.
I've never used a List(Of) before and I'm not sure how to pass it to the Data Layer of my application. The ColResCategory is a property within the Business Layer (See below) and it needs to be passed to the Data Layer. ReplaceResCategory (See 2nd Code view) is another class file within my Business Layer and the ColResCategory references it.
Public Property ColResCategory() As List(Of ReplaceResCategory) Get If IsNothing(mColResCategory) Then mColResCategory = New List(Of ReplaceResCategory) End If Return mColResCategory [Code] .....
I'm creating a Data Layer for a Web Application and in one of my functions, I need to pass in a Structure full of Customer info. This Data Layer is essentially a DLL. My problem is that I'm not sure how to do this.Below is my code and what I want to do.
I am trying to layer some program to take up the space of the wallpaper, like maybe just below the icons but above the wallpaper? Does anyone know if this is possible? Anyways, I am trying to make some video thing behind the icons but above the wallpaper to let u know of things that will happen if you start messing with the computer, as a simple, don't mess with things doesn't seem to work.
I am putting some heavy though into re-writing the data access layer in my software(If you could even call it that). This was really my first project that uses, and things were done in an improper manner. In my project all of the data that is being pulled is being stored in an arraylist. some of the data is converted from the arraylist into an typed object, before being put backinto an arraylist.Also, there is no central set of queries in the application.This means that some queries are copy and pasted, which I want to eliminate as well.This application has some custom objects that are very standard to the application, and some queries that are very standard to those objects.
I also went though the whole "ASP.Net in 24 Hours" book by Scott Mictchell. I followed everything that went on in that book and built the final project successfully. I also used the tutorials here to better understand the whole Membership Provider/User tables setup that was going on in the book. Next, I thought I would learn more about accessing data for ASP.Net since that is what most application do.I went through the first Data Tutorial here. I seemed to understand what was going on just fine.The second Data Tutorial seemed to just show a lot of VB code to build the Business Logic Layer. There was not much explanation about how to do it yourself.I think I can keep going in the tutorials here. I downloaded the code from the second tutorial and went through it.I am guessing that the code in the second tutorial was given just to proceed with the overall project that is being built throughout the tutorial sequence.
I've been working to refactor my code and ended up with a quite clean main BLL class that has only a few manager classes that pass information between eachother. They handle separate tasks/areas like socket connection, data, etc. It's only one instance of each of these manager objects, so I believe maybe the base layout is a structural singleton (?) ..but not sure. This seems to give quite good oversight and a clean separation of PL/BLL as the main form only access the BLL through one instance of a single class. But now I'm trying to figure out how to lay out the presentation layer. So with this I would like to understand a few points: Do you have all controls as members of the form class, or can you make sub classes where some controls only exist on lower levels? Like for example if you have a tab where all controls only interact with each other, and not the rest of the form, would it then be possible to make this a separate class that holds both controls and additional logic ? The first problem I get when trying this is with the events, as if I simply move an event handler method to another class than the form class, I get the message: Handles clause requires a WithEvents variable defined in the containing type or one of its base types.What does this mean? and is there an easy way around this? I would like to understand how a slightly more complex PL is designed, so I know what direction to move in for studying/developing this.
I am using normal windows form application. I wanted a way whereby I could create a layer over my form which would be semi transparent and nothing would be accessible until I click a button or do something like that. What I want is similar to a grey sheet that covers your screen in vista or 7 when user admin Yes/No box is displayed. Nothing is accessible behind. Or as you might see in some webpages where till we dont click a button or so the content behind is inaccessible.
Actually I want this to apply only on my mdi child form (a particular one) and it should enable me to see whats in the form but semi transparent and till i dont click a button on it, the content behind should'nt be accessible. Kinda like what you see in webpages whereby there is a button in the center and till you dont click it you can't select or click on content behind it.
Okay, I'm making a fresh start and re-exploring my options. I'm trying to put a layer of transparency over a program that will act as a drawing layer. The cursor should be able to sniff to see whether it's sitting on transparency, or a drawn object. Transparency it will click through, while clicking on a drawn object will enable the user to edit said drawn object.
I've been trying to do this using a user control I made from scratch, but this is starting to look more and more like a dead end the deeper I get into it. Currently the layer of transparency works, along with the cursor sniffing, but the user control refuses to be brought to the front.
Any ideas on other ways to go about this / ways to make the user control work?
I am implementing a Data Access Layer (DAL), which is basically a set of classes with (VB.NET) Shared functions to actually execute the database (CRUD) calls. I am trying to figure out the best place to place the calls to the DAL within the class hierarchy. Let me give an example.Suppose I have a class Customer, with only standard ID, Name, Address1, etc. properties and maybe an overridden ToString function or so. I also have a DAL class with Shared methods, such as:[code]Would this be "cleaner" OOP? Or is it acceptable practice to let the presentation call the Dal, passing the business objects like my previous example:[code]
If code the parameter list as seperate arguments then this wouldnt be a problem, but following a taught pattern that i should take collection as parameters in update or create methods.
Assume the there are three members in a class and in the update or create methods that was told code them to take collection, therefore create.
update methods of that class take collection but the problme the caller faces that it doesnt know the order and names of each element of the collection.
I'm building a database control layer DLL for my project.HelpDB is the project.HDB is the class name.I've written a few methods for connecting to the db, querying, and the usual.I've recently included a public class HDB_ParamValue in HDB to handle query parameters.
[Code]...
Note 1: I'm moving from VB6, so you'll appreciate that I have little experience with this real OOP. If there is a link or article you can recommend that might answer this, recommend away!Note 2: I'm not concerned about databases and parameters per se, but more the _concept_ of class in a class (or class of a class).
i have a program and i need to take some images and add some points lines or something with layer system and i wanna save my picture and layers couse i can delete my lines or points.
Im experiencing some problems while attempting to read a connection string from an App.config file in my Data Access Layer.I added the App.Config to the DAL Class Library, and added my connection string to the connectionStrings section but when I try to read it from my DAL its Returing Nothing.