|
Thanks again for the very quick replies, however my problem is that I want to find the main application path and not the installer path.
If I call Application.UserAppDataPath inside the installer it gives me:
C:\Users\Kåre Tragethon\AppData\Roaming\Microsoft Corporation\Windows Installer - Unicode\5.0.7600.16385
I want to be able to find the main application path:
C:\Users\Kåre Tragethon\AppData\Local\Tragethon_Teknikk\EasyNetTools.exe_Url_mxn53vo4iinbepot2fslrsybsd0vtoiz\0.8.4.9
Let me know if anything is not clear and I will try to explain some more.....
|
|
|
|
|
How about this
AppDomain.CurrentDomain.BaseDirectory
I think you deploy the project use the clickonce,am I right?
|
|
|
|
|
Thanks again for the very quick replies, and for helping me out and sorry for my bad English and explanations.
No I don't use clickonce. I will do some more explaining:
I have a main project (main application) which can be installed on any computer. This application contains user settings (user.config) which lies in the following directory:
C:\Users\Kåre Tragethon\AppData\Local\Tragethon_Teknikk\EasyNetTools.exe_Url_mxn53vo4iinbepot2fslrsybsd0vtoiz\0.8.4.9
This is the standard location of user settings file, however when the main application changes version a new folder is created, e.g.:
C:\Users\Kåre Tragethon\AppData\Local\Tragethon_Teknikk\EasyNetTools.exe_Url_mxn53vo4iinbepot2fslrsybsd0vtoiz\10.8.4.9
I also have an installer application in my project (the standard VS built-in installer). When I un-install the application I want to access the user.config file and get all the settings from this file (and I will save all the settings in the TEMP directory) so that when I install the application again I am able to retrieve all the settings (access the user.config file and write all the previously saved settings).
Most often the reason for uninstall->install is that I have made a new version of the software and therefor I cannot rely on a static path to the user.config file, I will have to get it programmaticly.
|
|
|
|
|
|
|
Hello,
So I have the following layout in my project:
Solution ('sol')
namespace A
------folder 1A
------------folder 1A1
------------------file Af.cs
namespace B
------folder 1B
------------file Bf.cs
Now, in file Bf.cs I want to call a method which is in file Af.cs. How can I do that? I can't create an object of type Af, because I cannot call the namespace A for some reason. I am getting a message namespace A cannot be found whenever I use: using A.1A.1A1;
The dashes above are there just to show the hierarchy ( indentation ).
Thank you!
|
|
|
|
|
If "namespace A" and "namespace B" represent projects, then you have to add reference to project A in project B (right-click project B icon -> "Add reference" -> tab "Projects" select project A and click OK).
|
|
|
|
|
martingeorgiev wrote: Solution ('sol')namespace A------folder 1A
You can have multiple (or nested) folders with the same namespace - so make sure you actually have those namespaces available on those folders.
|
|
|
|
|
I don't see where folders come into the picture.
Maybe you have a Java background, where there was a strong link between namespace structure and file structure; there is no such thing in .NET
Files reside in folders.
Types reside in namespaces.
You can have (parts of) more than one namespace in a file.
You can have a namespace spread over many files and folders.
The project holds files, and the compiler will locate and deal with all types in them.
And to locate types in some other project, you'd have to add a reference.
|
|
|
|
|
Luc Pattyn wrote: there is no such thing in .NET real programming.
|
|
|
|
|
Thanks everybody for your assistance!
|
|
|
|
|
you're welcome.
|
|
|
|
|
Where can I get information on nested masterpages ?
Has anyone tried implementing them and what are it's pros cons?
|
|
|
|
|
An ASP question, eh?
I've used them before, when I want to have a menu in the master, and a sub-menu that only appears on certain pages in the "secondary" master.
Just make the primary the master of the secondary, as shown below:
<%@ Master Language="C#" MasterPageFile="~/Master01.Master" AutoEventWireup="true" CodeBehind="Master02.master.cs" Inherits="Namespace.Master02" %>
Then on the page, use the secondary as master (which will also include its master, the primary):
<%@ Page Language="C#" MasterPageFile="~/Master02.master" AutoEventWireup="true"
(etc...)
|
|
|
|
|
thanks timothy,
well pointed i'll shift to the asp.net MB
|
|
|
|
|
Oh, I wouldn't do that - cross-posting is frowned upon here.
|
|
|
|
|
uh oh..!!! done it already
apologies to admin
|
|
|
|
|
I want to make an application in C# that will control(suppose generate click event on a button without clicking on flash file button) flash file and also get action event from flash file when a button is clicked or something is typed on flash file.
Is it possible?
Please help me.
|
|
|
|
|
Last I checked, Flash doesn't expose any events about anything that's going on while the Flash script is running. That means your code will never know anyone typed in a field in Flash. Nor does it expose a button like Windows does. You can only "click" on a Flash window by sending a crafted MouseDown message, supplying mouse coordinates for the click, to the Flash window.
|
|
|
|
|
I want to write a string "A";
the left of string A is blue and the right of the string A is green.
How to make it?
public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle);
modified on Wednesday, July 7, 2010 11:25 AM
|
|
|
|
|
Any particular colour you would like the horizontal bar?
|
|
|
|
|
Use a LinearGradientBrush as the brush.
|
|
|
|
|
Ok. I have made it.
thanks.
|
|
|
|
|
Hi
I want a DLL that compare 2 text and give me the diffrents (highlight them).
TY.
|
|
|
|
|
Me wants a software that makes me rich or happy (or both)!!!!!!
Read the guidelines at the top of this page and rephrase your "question"!
Greetings
Covean
|
|
|
|