private void UserControl_Loaded (object sender, RoutedEventArgs e) { if (System.ComponentModel.DesignerProperties.GetIsInDesignMode (this)) return; if ((CommonAccessRightsDefinition.CurrentRollen == null) || (CommonAccessRightsDefinition.CurrentRollen.Length == 0)) { MessageBox.Show ("Für Sie sind leider keine\r\n" + "Benutzerberechtigungen eingetragen,\r\n" + "bitte wenden Sie sich an WPMedia"); return; } if (CommonAccessRightsDefinition.CurrentRollen.Contains("Administrator")) { //InsertNewTab.IsEnabled = true; //InsertNewTab.Visibility = Visibility.Visible; ProfileTab.IsEnabled = true; ProfileTab.Visibility = Visibility.Visible; //VerwaltungTab.IsEnabled = true; //VerwaltungTab.Visibility = Visibility.Visible; CommonProfileTab.IsEnabled = true; CommonProfileTab.Visibility = Visibility.Visible; OPATab.IsEnabled = true; OPATab.Visibility = Visibility.Visible; } if (CommonAccessRightsDefinition.CurrentRollen.Contains("Autor")) { //InsertNewTab.IsEnabled = true; //InsertNewTab.Visibility = Visibility.Visible; } if (CommonAccessRightsDefinition.CurrentRollen.Contains("Manager")) { //InsertNewTab.IsEnabled = true; //InsertNewTab.Visibility = Visibility.Visible; OPATab.IsEnabled = true; OPATab.Visibility = Visibility.Visible; } if ((CommonAccessRightsDefinition.CurrentRollen.Contains("Redakteur")) || (CommonAccessRightsDefinition.CurrentRollen.Contains("Administrator"))) { //RedaktionTab.Visibility = Visibility.Visible; //RedaktionTab.IsEnabled = true; AutomationTab.Visibility = Visibility.Visible; AutomationTab.IsEnabled = true; //ArbeitsListenTab.Visibility = Visibility.Visible; //ArbeitsListenTab.IsEnabled = true; } WCFAccess = new WCFStandards (); WMB.WPMediaApplicationState.Instance.Properties ["WCFAccess"] = WCFAccess; WMB.WPMediaApplicationState.Instance.Properties ["DefaultConnectionStringName"] = "AltErlaaInfoConnectionString"; WCFAccess.DefaultConnectionStringName = (String) WMB.WPMediaApplicationState.Instance.Properties ["DefaultConnectionStringName"]; WCFAccess.DefaultModelName = "AltErlaaInfoModel"; ClientSchema = WCFAccess.CreateWCFStandardClientSchema(); /* TemplateContextMenu.LastRecallSearchFunctionData.RequestParentActivityCall = new TemplateRuntime.RequestParentActivityEvent (FullShowControl_RequestParentActivityCall); TemplateContextMenu.ActuallRedaktionCommunicationData.RequestParentActivityCall = new TemplateRuntime.RequestParentActivityEvent(Redaktion_RequestParentActivityCall); //TemplateContextMenu.ActuallAutomationCommunicationData.RequestParentActivityCall // = new TemplateRuntime.RequestParentActivityEvent (Automation_RequestParentActivityCall); */ }