Example #1
0
        void f_ServicesLoaded(object sender, EventArgs e)
        {
            ArcServerFolder f   = sender as ArcServerFolder;
            AccordionItem   itm = new AccordionItem();

            itm.Header = f.folderName;
            ScrollViewer scroll = new ScrollViewer();

            scroll.Width = this.accordion1.ActualWidth - 10;
            StackPanel stack = new StackPanel();

            foreach (ServiceDef svc in f.Services)
            {
                if (svc.Type.ToLower() == "mapserver")
                {
                    CheckBox chk = new CheckBox();
                    chk.Content    = svc.Name.Replace(f.folderName + "/", "");
                    chk.Tag        = f.parentUrl + "/" + svc.Name + "/MapServer";
                    chk.Checked   += new RoutedEventHandler(chk_Checked);
                    chk.Unchecked += new RoutedEventHandler(chk_Unchecked);
                    stack.Children.Add(chk);
                }
            }
            scroll.Content = stack;
            itm.Content    = scroll;
            if (stack.Children.Count > 0)
            {
                this.accordion1.Items.Add(itm);
            }
        }
Example #2
0
 private void loadFolders(ServerInfo si)
 {
     foreach (string folder in si.Folders)
     {
         ArcServerFolder f = new ArcServerFolder(folder, this.baseUrl);
         f.ServicesLoaded += new EventHandler(f_ServicesLoaded);
         f.GetServices();
     }
 }