public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Medical.Apartment.Silverlight.UI;component/Security/ContextComponentTree.xaml", System.UriKind.Relative));
     this.chkExpandAll = ((System.Windows.Controls.CheckBox)(this.FindName("chkExpandAll")));
     this.uiRoleComponentTreeView = ((Telerik.Windows.Controls.RadTreeView)(this.FindName("uiRoleComponentTreeView")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Medical.Apartment.Silverlight.UI;component/Security/RoleComponentAdminPage.xaml", System.UriKind.Relative));
     this.LayoutRootOrgAdmin = ((System.Windows.Controls.Grid)(this.FindName("LayoutRootOrgAdmin")));
     this.uiTitle = ((System.Windows.Controls.TextBlock)(this.FindName("uiTitle")));
     this.uiParamsDisplay = ((System.Windows.Controls.TextBlock)(this.FindName("uiParamsDisplay")));
     this.layoutContent = ((Medical.Apartment.Silverlight.UI.ClippedGrid)(this.FindName("layoutContent")));
     this.lblRole = ((System.Windows.Controls.TextBlock)(this.FindName("lblRole")));
     this.uiRoles = ((System.Windows.Controls.ComboBox)(this.FindName("uiRoles")));
     this.lblUserHasRole = ((System.Windows.Controls.TextBlock)(this.FindName("lblUserHasRole")));
     this.ucContextComponentTree = ((Medical.Apartment.Silverlight.UI.ContextComponentTree)(this.FindName("ucContextComponentTree")));
     this.uiUsersTreeView = ((Telerik.Windows.Controls.RadTreeView)(this.FindName("uiUsersTreeView")));
     this.btnSave = ((Medical.Apartment.Silverlight.UI.SingleClickButton)(this.FindName("btnSave")));
     this.btnCancel = ((System.Windows.Controls.Button)(this.FindName("btnCancel")));
 }
Beispiel #3
0
 private void CheckMenuItem(object mnu, List <string> lst, bool isFull)
 {
     if (mnu is Telerik.Windows.Controls.RadOutlookBarItem)
     {
         Telerik.Windows.Controls.RadOutlookBarItem obj = mnu as Telerik.Windows.Controls.RadOutlookBarItem;
         if (!isFull)
         {
             if (obj.Tag != null)
             {
                 string nameKey = obj.Tag.ToString();
                 if (lst.Contains(nameKey))
                 {
                     obj.Visibility = Visibility.Visible;
                     if (obj.Content is Telerik.Windows.Controls.RadTreeView)
                     {
                         Telerik.Windows.Controls.RadTreeView rtv = obj.Content as Telerik.Windows.Controls.RadTreeView;
                         foreach (var child in rtv.Items)
                         {
                             CheckMenuItem(child, lst, isFull);
                         }
                     }
                 }
                 else
                 {
                     obj.Visibility = Visibility.Collapsed;
                 }
             }
         }
         else
         {
             obj.Visibility = Visibility.Visible;
             if (obj.Content is Telerik.Windows.Controls.RadTreeView)
             {
                 Telerik.Windows.Controls.RadTreeView rtv = obj.Content as Telerik.Windows.Controls.RadTreeView;
                 foreach (var child in rtv.Items)
                 {
                     CheckMenuItem(child, lst, isFull);
                 }
             }
         }
     }
     if (mnu is Telerik.Windows.Controls.RadTreeViewItem)
     {
         Telerik.Windows.Controls.RadTreeViewItem obj = mnu as Telerik.Windows.Controls.RadTreeViewItem;
         if (!isFull)
         {
             if (obj.Tag != null)
             {
                 string nameKey = obj.Tag.ToString();
                 if (lst.Contains(nameKey))
                 {
                     obj.Visibility = Visibility.Visible;
                     foreach (var child in obj.Items)
                     {
                         CheckMenuItem(child, lst, isFull);
                     }
                 }
                 else
                 {
                     obj.Visibility = Visibility.Collapsed;
                 }
             }
         }
         else
         {
             obj.Visibility = Visibility.Visible;
             foreach (var child in obj.Items)
             {
                 CheckMenuItem(child, lst, isFull);
             }
         }
     }
 }