Select to view content in your preferred language

add_in a download tool to Layer Context Menu

2054
1
07-03-2012 04:11 AM
BarraLoubna
Deactivated User
hello,

I would add a new tool to download the contents of the layers in the Layer COntext Menu, I managed to do it when I specipie the path directly file such as:

public void Execute (object parameter)
         {

System.Windows.Browser.HtmlPage.Window.Navigate (new Uri ("V: \ \ GIS \ \ DATA \ \ Base Addresses \ \ Addresses PT LuxembourgVille \ \ LuxembourgVille.MPK" UriKind.Absolute), "_newWindow");
maintenant je voudrais le faire automatiquement pour chaque layer, vue que j'ai plusieurs couches dans mon Map Contents.

Now I want to do this automatically for each layer, for I have many layers in my Map Contents.

I had done:

public void Execute (object parameter)
         {
                 var = Uri (parameter as ContextMenu). Tag as Layer;
                String fileName;
if (Uri == null)
MessageBox.Show ("null");
else
{
fileName = "V: \ \ ICMA \ \ Loubna_Barra \ \ data \ \";
fileName = fileName + + Uri.ID. "mpk";
System.Windows.Browser.HtmlPage.Window.Navigate (new Uri (fileName, UriKind.Absolute));
}

}

but I got the following errors in on attachments, does anyone have a solution please?

thank you.
0 Kudos
1 Reply
by Anonymous User
Not applicable
Original User: loubna064@yahoo.fr

hello,

I would add a new tool to download the contents of the layers in the Layer COntext Menu, I managed to do it when I specipie the path directly file such as:

public void Execute (object parameter)
         {

System.Windows.Browser.HtmlPage.Window.Navigate (new Uri ("V: \ \ GIS \ \ DATA \ \ Base Addresses \ \ Addresses PT LuxembourgVille \ \ LuxembourgVille.MPK" UriKind.Absolute), "_newWindow");
maintenant je voudrais le faire automatiquement pour chaque layer, vue que j'ai plusieurs couches dans mon Map Contents.

Now I want to do this automatically for each layer, for I have many layers in my Map Contents.

I had done:

public void Execute (object parameter)
         {
                 var = Uri (parameter as ContextMenu). Tag as Layer;
                String fileName;
if (Uri == null)
MessageBox.Show ("null");
else
{
fileName = "V: \ \ ICMA \ \ Loubna_Barra \ \ data \ \";
fileName = fileName + + Uri.ID. "mpk";
System.Windows.Browser.HtmlPage.Window.Navigate (new Uri (fileName, UriKind.Absolute));
}

}

but I got the following errors in on attachments, does anyone have a solution please?

thank you.




Hello, I always encounter the same problem, does anyone have an idea.

Thank you very much
0 Kudos