public SyncHistory() { _presenter = new SyncHistoryPresenter(this); _commonApi = new CommonApi(); _siteApi = new SiteAPI(); _styleHelper = new StyleHelper(); }
private void Page_Load(System.Object sender, System.EventArgs e) { StyleHelper objStyle; try { RegisterResources(); Utilities.ValidateUserLogin(); if ((m_refAPI.RequestInformationRef.IsMembershipUser > 0) || (m_refAPI.RequestInformationRef.UserId == 0)) { Response.Redirect("blank.htm", false); return; } objStyle = new StyleHelper(); StyleSheetJS.Text = objStyle.GetClientScript(); jsAppImgPath.Text = m_refAPI.AppImgPath; HelpButton.Text = objStyle.GetHelpButton("navtoolbar_aspx", ""); m_msgHelper = m_refAPI.EkMsgRef; } catch (Exception) { } finally { objStyle = null; } }
/// <summary> /// Constructor /// </summary> public Sync() { _presenter = new SyncRelationshipsPresenter(this); _commonApi = new CommonApi(); _siteApi = new SiteAPI(); _styleHelper = new StyleHelper(); }
private void Page_Load(System.Object sender, System.EventArgs e) { StyleHelper objStyle; Ektron.Cms.Common.EkMessageHelper m_refMsg; try { Utilities.ValidateUserLogin(); if ((m_refAPI.RequestInformationRef.IsMembershipUser >0) || (m_refAPI.RequestInformationRef.UserId == 0)) { Response.Redirect("blank.htm", false); return; } m_refMsg = m_refAPI.EkMsgRef; objStyle = new StyleHelper(); m_strStyleSheetJS = objStyle.GetClientScript(); jsAppImgPath.Text = m_refAPI.AppImgPath; Button0.InnerHtml = "<img style=\"MARGIN-LEFT: 3px;\" id=\"iconImage0\" title=\"" + m_refMsg.GetMessage("alt select contenttree button text") + "\" src=\"images/application/navbar/icon_content.gif\" align=\"absmiddle\"> " + m_refMsg.GetMessage("content button text"); if (Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(m_refAPI.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.SocialNetworking)) { Button4.InnerHtml = "<img style=\"MARGIN-LEFT: 3px;\" id=\"Img5\" title=\"" + m_refMsg.GetMessage("alt select workspacetree button text") + "\" src=\"images/application/user.gif\" align=\"absmiddle\" width=\"16\" height=\"16\"> " + m_refMsg.GetMessage("lbl my stuff"); } Button1.InnerHtml = "<img style=\"MARGIN-LEFT: 3px;\" id=\"Img2\" title=\"" + m_refMsg.GetMessage("alt select librarytree button text") + "\" src=\"images/application/navbar/icon_library.gif\" align=\"absmiddle\"> " + m_refMsg.GetMessage("library button text"); Button2.InnerHtml = "<img style=\"MARGIN-LEFT: 3px;\" id=\"Img3\" title=\"" + m_refMsg.GetMessage("alt select moduletree button text") + "\" src=\"images/application/navbar/icon_modules.gif\" align=\"absmiddle\"> " + m_refMsg.GetMessage("modules button text"); Button3.InnerHtml = "<img style=\"MARGIN-LEFT: 3px;\" id=\"Img4\" title=\"" + m_refMsg.GetMessage("alt select admintree button text") + "\" src=\"images/application/navbar/icon_admin.gif\" align=\"absmiddle\"> " + m_refMsg.GetMessage("administrate button text"); } catch (Exception) { } finally { objStyle = null; } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Init(object sender, EventArgs e) { _siteApi = new SiteAPI(); _styleHelper = new StyleHelper(); _parameters = new RestoreParameters(Request); RegisterResources(); }
protected void Page_Init(object sender, EventArgs e) { ltrincremental.Text = this.Sites.EkMsgRef.GetMessage("js incremental crawl"); ltrincrementalRequest.Text = this.Sites.EkMsgRef.GetMessage("js incremental crawl request"); ltrFullC.Text = this.Sites.EkMsgRef.GetMessage("js full crawl"); ltrFullRequest.Text = this.Sites.EkMsgRef.GetMessage("js full crawl request"); if (HasPermission()) { _style = new StyleHelper(); _crawler = new SearchServerCrawler(); JS.RegisterJS(this, JS.ManagedScript.EktronStyleHelperJS); JS.RegisterJS(this, JS.ManagedScript.EktronJFunctJS); JS.RegisterJS(this, JS.ManagedScript.EktronJS); JS.RegisterJS(this, JS.ManagedScript.EktronWorkareaJS); JS.RegisterJS(this, JS.ManagedScript.EktronWorkareaHelperJS); JS.RegisterJS(this, JS.ManagedScript.EktronWorkareaContextMenusJS); Css.RegisterCss(this, Css.ManagedStyleSheet.EktronWorkareaCss); Css.RegisterCss(this, Css.ManagedStyleSheet.EktronWorkareaIeCss, Css.BrowserTarget.LessThanEqualToIE8); styleHelper.Text = _style.GetClientScript(); RenderToolbar(); RenderTitleBar(); if (!string.IsNullOrEmpty(Request.QueryString[ActionParameter])) { switch (Request.QueryString[ActionParameter].ToLower()) { case IncrementalCrawlAction: _crawler.StartIncrementalCrawl(false); Response.Redirect("Status.aspx"); break; case FullCrawlAction: _crawler.StartFullCrawl(); Response.Redirect("Status.aspx"); break; } } try { RenderState(); RenderSettings(); } catch (NullReferenceException) { Utilities.ShowError(Sites.EkMsgRef.GetMessage("msg search status connection error")); } } else { Response.Redirect(ContentAPI.Current.ApplicationPath + "Login.aspx", true); } }
public string LangDD(object showAllOpt, string bgColor) { string myTemp = Request.ServerVariables["PATH_INFO"].Substring(Request.ServerVariables["PATH_INFO"].LastIndexOf("/") + 1) + "?" + Ektron.Cms.Common.EkFunctions.HtmlEncode(Request.ServerVariables["QUERY_STRING"].ToString().Replace("LangType", "L")); myTemp = myTemp.Replace("&", "&"); StyleHelper m_refStyle = new StyleHelper(); string returnValue; returnValue = m_refStyle.ShowAllActiveLanguage(Convert.ToBoolean(showAllOpt), bgColor, "javascript:SelLanguage(this.value, '" + myTemp + "');", ""); return returnValue; }
public Workarea_controls_search_addsuggestedresult() { _siteApi = new SiteAPI(); _styleHelper = new StyleHelper(); _appImgPath = string.Empty; _contentLanguage = string.Empty; _pageMode = string.Empty; _pageAction = string.Empty; _originalPhrase = string.Empty; _suggestedResultRecommendedMaxSize = 10; }
private void Page_Load(System.Object sender, System.EventArgs e) { StyleHelper objStyle = new StyleHelper(); m_refmsg = (new Ektron.Cms.CommonApi()).EkMsgRef; HelpButton1.Text = objStyle.GetHelpButton("FormWizardStep1", ""); HelpButton2.Text = objStyle.GetHelpButton("FormWizardStep2", ""); HelpButton3.Text = objStyle.GetHelpButton("FormWizardStep3", ""); HelpButton4.Text = objStyle.GetHelpButton("FormWizardStep4", ""); HelpButton5.Text = objStyle.GetHelpButton("FormWizardStep5", ""); objStyle = null; }
protected void Page_Load(object sender, EventArgs e) { _MessageHelper = _ContentApi.EkMsgRef; _StyleHelper = new StyleHelper(); if (!String.IsNullOrEmpty(Request.QueryString["id"])) { _Id = Convert.ToInt64(Request.QueryString["id"]); } ViewDeviceToolBar(); BindData(); }
public Community_PersonalTags() { m_refStyle = new StyleHelper(); m_mode = ""; m_userId = 0; m_id = 0; m_refUserApi = new UserAPI(); m_refCommonAPI = new CommonApi(); m_refContentApi = new ContentAPI(); m_refMsg = RefCommonAPI.EkMsgRef; Utilities.SetLanguage(m_refCommonAPI); }
protected void Page_Load(object sender, EventArgs e) { _MessageHelper = _ContentApi.EkMsgRef; _StyleHelper = new StyleHelper(); if (!_ContentApi.RequestInformationRef.IsDeviceDetectionEnabled) { dvMessage.Visible = true; lblEnableDeviceDetection.Text = _MessageHelper.GetMessage("lbl Enable Device Detection"); } BindData(); ViewDevicesToolBar(); }
public override FrameworkElement CreateControl(FormItemContext context) { DatePicker picker = new DatePicker(); var binding = new Binding(context.PropertyInfo.Name) { Mode = BindingMode.TwoWay, }; binding.ValidationRules.Add(new AnnotationValidationRule(context.PropertyInfo)); picker.SetBinding(DatePicker.SelectedDateProperty, binding); CustomValidation.SetValidationProperty(picker, DatePicker.SelectedDateProperty); StyleHelper.ApplyStyle(picker, FormControlConstrants.EDIT_DATE_STYLE); return(picker); }
public reports() { //initialize members _ContentApi = new ContentAPI(); _StyleHelper = new StyleHelper(); _HasData = false; _ContentLanguage = -1; _EnableMultilingual = 0; _ContentTypeSelected = Ektron.Cms.Common.EkConstants.CMSContentType_AllTypes.ToString(); _SiteActivityDataSource = new System.Data.DataView(); _IsSubFolderIncluded = false; _ContentType2 = 0; _FilterId = 0; _MessageHelper = _ContentApi.EkMsgRef; }
protected override void InitExampleInternal() { Surface = new SCIChartSurface(_exampleViewLayout.SciChartSurfaceView); StyleHelper.SetSurfaceDefaultStyle(Surface); var ds1Points = DataManager.Instance.GetDampedSinewave(1.0, 0.05, 50, 5); var dataSeries = new XyDataSeries <double, double>(); dataSeries.Append(ds1Points.XData, ds1Points.YData); var axisStyle = StyleHelper.GetDefaultAxisStyle(); var xAxis = new SCINumericAxis { IsXAxis = true, GrowBy = new SCIDoubleRange(0.1, 0.1), Style = axisStyle }; var yAxis = new SCINumericAxis { GrowBy = new SCIDoubleRange(0.1, 0.1), Style = axisStyle }; var renderSeries = new SCIFastImpulseRenderableSeries { DataSeries = dataSeries, Style = { LinePen = new SCIPenSolid(UIColor.FromRGB(0x00, 0x66, 0xFF), 0.7f), PointMarker = new SCIEllipsePointMarker { FillBrush = new SCIBrushSolid(UIColor.FromRGB(0x00, 0x66, 0xFF)), BorderPen = new SCIPenSolid(UIColor.FromRGB(0x00, 0x66, 0xFF), 2f), Width = 10, Height = 10 } } }; Surface.AttachAxis(xAxis, true); Surface.AttachAxis(yAxis, false); Surface.AttachRenderableSeries(renderSeries); Surface.ChartModifier = new SCIModifierGroup(new ISCIChartModifierProtocol[] { new SCIZoomPanModifier(), new SCIPinchZoomModifier(), new SCIZoomExtentsModifier() }); Surface.InvalidateElement(); }
/// <summary> /// Seals this setter /// </summary> internal override void Seal() { // Do the validation that can't be done until we know all of the property // values. DependencyProperty dp = Property; object value = ValueInternal; if (dp == null) { throw new ArgumentException(SR.Get(SRID.NullPropertyIllegal, "Setter.Property")); } if (String.IsNullOrEmpty(TargetName)) { // Setter on container is not allowed to affect the StyleProperty. if (dp == FrameworkElement.StyleProperty) { throw new ArgumentException(SR.Get(SRID.StylePropertyInStyleNotAllowed)); } } // Value needs to be valid for the DP, or a deferred reference, or one of the supported // markup extensions. if (!dp.IsValidValue(value)) { // The only markup extensions supported by styles is resources and bindings. if (value is MarkupExtension) { if (!(value is DynamicResourceExtension) && !(value is System.Windows.Data.BindingBase)) { throw new ArgumentException(SR.Get(SRID.SetterValueOfMarkupExtensionNotSupported, value.GetType().Name)); } } else if (!(value is DeferredReference)) { throw new ArgumentException(SR.Get(SRID.InvalidSetterValue, value, dp.OwnerType, dp.Name)); } } // Freeze the value for the setter StyleHelper.SealIfSealable(_value); base.Seal(); }
// Token: 0x06000357 RID: 855 RVA: 0x000097C0 File Offset: 0x000079C0 internal void Seal(ValueLookupType type) { if (this._sealed) { return; } this._sealed = true; if (this._property != null && this._binding != null) { throw new InvalidOperationException(SR.Get("ConditionCannotUseBothPropertyAndBinding")); } if (type - ValueLookupType.Trigger > 1) { if (type - ValueLookupType.DataTrigger > 1) { throw new InvalidOperationException(SR.Get("UnexpectedValueTypeForCondition", new object[] { type })); } if (this._binding == null) { throw new InvalidOperationException(SR.Get("NullPropertyIllegal", new object[] { "Binding" })); } } else { if (this._property == null) { throw new InvalidOperationException(SR.Get("NullPropertyIllegal", new object[] { "Property" })); } if (!this._property.IsValidValue(this._value)) { throw new InvalidOperationException(SR.Get("InvalidPropertyValue", new object[] { this._value, this._property.Name })); } } StyleHelper.SealIfSealable(this._value); }
protected override void OnStartup(StartupEventArgs e) { #if DEBUG LogManager.AddDebugListener(); #endif Log.Info("Starting application"); // To force the loading of all assemblies at startup, uncomment the lines below: //Log.Info("Preloading assemblies"); //AppDomain.CurrentDomain.PreloadAssemblies(); // Want to improve performance? Uncomment the lines below. Note though that this will disable // some features. // // For more information, see https://catelproject.atlassian.net/wiki/display/CTL/Performance+considerations // Log.Info("Improving performance"); // Catel.Data.ModelBase.DefaultSuspendValidationValue = true; // Catel.Windows.Controls.UserControl.DefaultCreateWarningAndErrorValidatorForViewModelValue = false; // Catel.Windows.Controls.UserControl.DefaultSkipSearchingForInfoBarMessageControlValue = true; // TODO: Register custom types in the ServiceLocator //Log.Info("Registering custom types"); if (File.Exists("Config.txt")) { using (var reader = new StreamReader("Config.txt")) { set = ModelBase.Load <Settings>(reader.BaseStream, SerializationMode.Xml, _sc); } } else { set = new Settings(); } var serviceLocator = ServiceLocator.Default; serviceLocator.RegisterInstance(typeof(Settings), set); StyleHelper.CreateStyleForwardersForDefaultStyles(); Log.Info("Calling base.OnStartup"); base.OnStartup(e); }
public void User_style_foreground() { var userStyles = new[] { new CustomStyle { Foreground = "Red", Name = "VitallyImportant" } }; StyleHelper.BuildStyles(appResource, userStyles); var style = (Style)appResource["OfferRow"]; var foreground = Foreground(style); Assert.AreEqual(Colors.Red, ((SolidColorBrush)foreground.Value).Color); appResource.Values.OfType <Style>().Each(s => s.Seal()); }
/// <summary> /// Raises the <see cref="E:System.Windows.Application.Startup"/> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs"/> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { #if DEBUG Catel.Logging.LogManager.AddDebugListener(); #endif StyleHelper.CreateStyleForwardersForDefaultStyles(); var serviceLocator = ServiceLocator.Default; serviceLocator.RegisterType <IFamilyService, FamilyService>(); var uiVisualizerService = serviceLocator.ResolveType <IUIVisualizerService>(); uiVisualizerService.Register(typeof(PersonViewModel), typeof(PersonWindow)); base.OnStartup(e); }
public void VerifyFontFamilyForChevron() { Microsoft.UI.Xaml.Controls.ToggleSplitButton toggleSplitButton = null; using (StyleHelper.UseFluentStyles()) { RunOnUIThread.Execute(() => { toggleSplitButton = new Microsoft.UI.Xaml.Controls.ToggleSplitButton(); TestServices.WindowHelper.WindowContent = toggleSplitButton; var secondayButton = toggleSplitButton.GetTemplateChild("SecondaryButton"); var font = ((secondayButton as Button).Content as TextBlock).FontFamily; Verify.AreEqual((FontFamily)Application.Current.Resources["SymbolThemeFontFamily"], font); }); } }
// Token: 0x0600872E RID: 34606 RVA: 0x0024F188 File Offset: 0x0024D388 private UIElement DefaultExpansion(object content, ContentPresenter container) { if (content == null) { return(null); } TextBlock textBlock = ContentPresenter.CreateTextBlock(container); textBlock.IsContentPresenterContainer = true; if (container != null) { StyleHelper.AddCustomTemplateRoot(container, textBlock, false, true); } this.DoDefaultExpansion(textBlock, content, container); return(textBlock); }
/// <summary> /// Raises the <see cref="E:System.Windows.Application.Startup"/> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs"/> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { StyleHelper.CreateStyleForwardersForDefaultStyles(); // TODO: Using a custom IoC container like Unity? Register it here: // Catel.IoC.ServiceLocator.Instance.RegisterExternalContainer(MyUnityContainer); ServiceLocator.Default.RegisterType <IUpdateMessagesListTask, UpdateMessagesListTask>(RegistrationType.Transient); ServiceLocator.Default.RegisterType <IFolderWatcher, FolderWatcher>(RegistrationType.Singleton); ServiceLocator.Default.RegisterType <ITryFindParent, TryFindParent>(RegistrationType.Transient); ServiceLocator.Default.RegisterType <IUpdateMessagesListTask, UpdateMessagesListTask>(RegistrationType.Transient); ServiceLocator.Default.RegisterType <IOpenEmailFile, OpenEmailFile>(RegistrationType.Transient); #if DEBUG Catel.Logging.LogManager.RegisterDebugListener(); #endif base.OnStartup(e); }
void LayoutChild(IControl <UIView> control) { StyleHelper style = _stylesheet.GetHelper <StyleHelper> (); float parentWidth = _view.Frame.Width; float parentHeight = _view.Frame.Height; float w = style.Width(control, parentWidth); float h = style.Height(control, parentHeight); LayoutBehaviour.InitializeImageContainer(_stylesheet, control, ref w, ref h); Bound bound = control.Apply(_stylesheet, new Bound(w, h), new Bound(w, float.MaxValue)); control.Frame = new Rectangle(0, 0, bound); }
/// <summary> /// Retrieve a BindingExpressionBase. /// </summary> /// <remarks> /// This method returns null if no Binding has been set on the given /// property. /// </remarks> /// <param name="target">object from which to retrieve the BindingExpression</param> /// <param name="dp">property from which to retrieve the BindingExpression</param> /// <exception cref="ArgumentNullException"> target and dp cannot be null </exception> public static BindingExpressionBase GetBindingExpressionBase(DependencyObject target, DependencyProperty dp) { if (target == null) { throw new ArgumentNullException("target"); } if (dp == null) { throw new ArgumentNullException("dp"); } // target.VerifyAccess(); Expression expr = StyleHelper.GetExpression(target, dp); return(expr as BindingExpressionBase); }
/// <summary>Return true if the property is currently data-bound</summary> /// <exception cref="ArgumentNullException"> DependencyObject target cannot be null </exception> public static bool IsDataBound(DependencyObject target, DependencyProperty dp) { if (target == null) { throw new ArgumentNullException("target"); } if (dp == null) { throw new ArgumentNullException("dp"); } // target.VerifyAccess(); object o = StyleHelper.GetExpression(target, dp); return(o is BindingExpressionBase); }
internal override bool BuildVisualTree(FrameworkElement container) { object content = ((ContentPresenter)container).Content; UIElement e = content as UIElement; if (e == null) { TypeConverter tc = TypeDescriptor.GetConverter(ReflectionHelper.GetReflectionType(content)); Debug.Assert(tc.CanConvertTo(typeof(UIElement))); e = (UIElement)tc.ConvertTo(content, typeof(UIElement)); } StyleHelper.AddCustomTemplateRoot(container, e); return(true); }
public virtual async Task InitializeBeforeShowingSplashScreenAsync() { InitializeLogging(); var serviceLocator = this.GetServiceLocator(); var themeService = serviceLocator.ResolveType <IThemeService>(); // Note: we only have to create style forwarders once ThemeHelper.EnsureApplicationThemes(typeof(ApplicationInitializationServiceBase).Assembly, false); ThemeHelper.EnsureApplicationThemes(GetType().Assembly, false); if (themeService.ShouldCreateStyleForwarders()) { StyleHelper.CreateStyleForwardersForDefaultStyles(); } }
// Token: 0x0600592B RID: 22827 RVA: 0x0018A420 File Offset: 0x00188620 internal FrameworkElement TryGetHeaderElement() { FrameworkElement frameworkElement = this.HeaderElement; if (frameworkElement != null) { return(frameworkElement); } FrameworkTemplate templateInternal = this.TemplateInternal; if (templateInternal == null) { return(this); } int i = StyleHelper.QueryChildIndexFromChildName("PART_Header", templateInternal.ChildIndexFromChildName); if (i < 0) { ToggleButton toggleButton = Helper.FindTemplatedDescendant <ToggleButton>(this, this); if (toggleButton != null) { FrameworkElement frameworkElement2 = VisualTreeHelper.GetParent(toggleButton) as FrameworkElement; if (frameworkElement2 != null) { int childrenCount = VisualTreeHelper.GetChildrenCount(frameworkElement2); i = 0; while (i < childrenCount - 1) { if (VisualTreeHelper.GetChild(frameworkElement2, i) == toggleButton) { frameworkElement = (VisualTreeHelper.GetChild(frameworkElement2, i + 1) as FrameworkElement); if (frameworkElement != null) { return(frameworkElement); } break; } else { i++; } } } } } return(this); }
// ShowParameters private void ShowParameters() { const int size = 115; GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Sensitivity", GUILayout.Width(size)); myTarget.sensitivity = EditorGUILayout.Slider(myTarget.sensitivity, 1f, 10f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Max Steering Angle", GUILayout.Width(size)); myTarget.maxSteeringAngle = EditorGUILayout.Slider(myTarget.maxSteeringAngle, 36f, 360f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Released Speed", GUILayout.Width(size)); myTarget.releasedSpeed = EditorGUILayout.Slider(myTarget.releasedSpeed, 25f, 150f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Wheel Name", GUILayout.Width(size)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Steering Wheel", GUILayout.Width(size)); myTarget.myData.touchzoneImage.sprite = EditorGUILayout.ObjectField(myTarget.myData.touchzoneImage.sprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); AxesHelper.ShowAxes(size, true); GUILayout.Space(5); EventsHelper.ShowEvents(size); }
internal sealed override void Seal() { if (IsSealed) { return; } // Process the _setters collection: Copy values into PropertyValueList and seal the Setter objects. ProcessSettersCollection(_setters); // Freeze the value for the trigger StyleHelper.SealIfSealable(_value); // Build conditions array from collection TriggerConditions = new TriggerCondition[] { new TriggerCondition( _binding, LogicalOp.Equals, _value) }; // Set Condition for all data triggers for (int i = 0; i < PropertyValues.Count; i++) { PropertyValue propertyValue = PropertyValues[i]; propertyValue.Conditions = TriggerConditions; switch (propertyValue.ValueType) { case PropertyValueType.Trigger: propertyValue.ValueType = PropertyValueType.DataTrigger; break; case PropertyValueType.PropertyTriggerResource: propertyValue.ValueType = PropertyValueType.DataTriggerResource; break; default: throw new InvalidOperationException(SR.Get(SRID.UnexpectedValueTypeForDataTrigger, propertyValue.ValueType)); } // Put back modified struct PropertyValues[i] = propertyValue; } base.Seal(); }
public Frontend2() { InitializeComponent(); Loaded += (sender, args) => { DataGridHelper.Focus(Lines); }; KeyDown += (sender, args) => { if (args.Key == Key.D && ((Keyboard.Modifiers & ModifierKeys.Control) != 0)) { Model.ShowDescription(); } if (args.Key == Key.F1) { Execute(Model.Help()); } if (args.Key == Key.F7) { Execute(Model.Close()); } if (args.Key == Key.F3) { Model.Clear(); } if (args.Key == Key.U && ((Keyboard.Modifiers & ModifierKeys.Control) != 0)) { Execute(Model.Unpack()); } if (args.Key == Key.F4) { Execute(Model.ReturnCheck()); } }; DataContextChanged += (sender, args) => { if (Model == null) { return; } var handler = new BarcodeHandler(this, Model.Settings); handler.Barcode.Subscribe(x => Execute(Model.BarcodeScanned(x))); }; new Editable().Attach(Lines); StyleHelper.ApplyStyles(typeof(CheckLine), Lines, Application.Current.Resources, Legend); }
public void VerifyFontFamilyForChevron() { DropDownButton dropDownButton = null; using (StyleHelper.UseFluentStyles()) { RunOnUIThread.Execute(() => { dropDownButton = new DropDownButton(); TestServices.WindowHelper.WindowContent = dropDownButton; var chevronTextBlock = dropDownButton.GetTemplateChild("ChevronTextBlock") as TextBlock; var font = chevronTextBlock.FontFamily; Verify.AreEqual((FontFamily)Application.Current.Resources["SymbolThemeFontFamily"], font); }); } }
public virtual void EnsureApplicationThemes(ResourceDictionary resourceDictionary, bool createStyleForwarders = false) { Argument.IsNotNull(() => resourceDictionary); EnsureOrchestraTheme(createStyleForwarders); try { var applicationResourcesDictionary = GetTargetApplicationResourceDictionary(); if (applicationResourcesDictionary is null == false) { var alreadyAdded = false; if (resourceDictionary.Source is null) { // Runtime, check by instance alreadyAdded = (from dic in applicationResourcesDictionary.MergedDictionaries where ReferenceEquals(dic, resourceDictionary) select dic).Any(); } else { // Defined, check by uri alreadyAdded = (from dic in applicationResourcesDictionary.MergedDictionaries where dic.Source != null && dic.Source == resourceDictionary.Source select dic).Any(); } if (!alreadyAdded) { applicationResourcesDictionary.MergedDictionaries.Add(resourceDictionary); } // Style forwarders only make sense once something actually changed. If it's a cascaded // call, callers should explicitly call CreateStyleForwarders manually if (createStyleForwarders) { StyleHelper.CreateStyleForwardersForDefaultStyles(applicationResourcesDictionary); } } } catch (Exception ex) { Log.Warning(ex, $"Failed to add application theme '{resourceDictionary?.Source}'"); } }
public SettingsView() { InitializeComponent(); StyleHelper.ApplyStyles(typeof(MarkupConfig), Markups, Application.Current.Resources); StyleHelper.ApplyStyles(typeof(MarkupConfig), VitallyImportantMarkups, Application.Current.Resources); #if !DEBUG DebugTab.Visibility = Visibility.Collapsed; #endif DataContextChanged += (sender, args) => { var model = (SettingsViewModel)DataContext; model.ObservableForProperty(x => x.PriceTagSettings.Value.Type, skipInitial: false) .Subscribe(x => { var isConstructor = ((SettingsViewModel)DataContext).PriceTagSettings.Value.IsConstructor; PriceTagConfig.Visibility = isConstructor ? Visibility.Collapsed : Visibility.Visible; PriceTagConstructor.Visibility = isConstructor ? Visibility.Visible : Visibility.Collapsed; }); model.ObservableForProperty(x => x.Settings.Value.RackingMap.Size, skipInitial: false) .Subscribe(x => { RackingMapConfig.Visibility = x.Value == RackingMapSize.Custom ? Visibility.Collapsed : Visibility.Visible; RackingMapConstructor.Visibility = x.Value == RackingMapSize.Custom ? Visibility.Visible : Visibility.Collapsed; }); }; PriceTagSettings_Value_Type.SelectionChanged += (sender, e) => { (sender as ComboBox).ToolTip = ((SettingsViewModel)DataContext).PriceTagSettings.Value.IsConstructor ? @"Конструктор для редактирования ценников, с учетом нужных размеров и необходимых опций. Для создания нового ценника нажмите Редактировать." : null; }; Settings_RackingMap_Size.SelectionChanged += (sender, e) => { if ((RackingMapSize)((ValueDescription)(sender as ComboBox).SelectedItem).Value == RackingMapSize.Custom) { (sender as ComboBox).ToolTip = @"Конструктор для редактирования стеллажных карт, с учетом нужных размеров и необходимых опций. Для создания нового стеллажной карты нажмите Редактировать."; return; } (sender as ComboBox).ToolTip = null; }; }
/// <summary> /// Raises the <see cref="E:System.Windows.Application.Startup"/> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs"/> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { #if DEBUG Catel.Logging.LogManager.AddDebugListener(); #endif StyleHelper.CreateStyleForwardersForDefaultStyles(); var serviceLocator = ServiceLocator.Default; serviceLocator.RegisterInstance <IConsoleService>(new ConsoleService()); // Force load assembly Console.WriteLine(typeof(Solution)); base.OnStartup(e); }
/// <summary>Locks this style and all factories and triggers so they cannot be changed.</summary> // Token: 0x060008DB RID: 2267 RVA: 0x0001CA5C File Offset: 0x0001AC5C public void Seal() { base.VerifyAccess(); if (this._sealed) { return; } if (this._targetType == null) { throw new InvalidOperationException(SR.Get("NullPropertyIllegal", new object[] { "TargetType" })); } if (this._basedOn != null && Style.DefaultTargetType != this._basedOn.TargetType && !this._basedOn.TargetType.IsAssignableFrom(this._targetType)) { throw new InvalidOperationException(SR.Get("MustBaseOnStyleOfABaseType", new object[] { this._targetType.Name })); } if (this._setters != null) { this._setters.Seal(); } if (this._visualTriggers != null) { this._visualTriggers.Seal(); } this.CheckForCircularBasedOnReferences(); if (this._basedOn != null) { this._basedOn.Seal(); } if (this._resources != null) { this._resources.IsReadOnly = true; } this.ProcessSetters(this); StyleHelper.AddEventDependent(0, this.EventHandlersStore, ref this.EventDependents); this.ProcessSelfStyles(this); this.ProcessVisualTriggers(this); StyleHelper.SortResourceDependents(ref this.ResourceDependents); this._sealed = true; base.DetachFromDispatcher(); }
//Pass in the full path to the style file on disk public async Task <bool> UpgradeStyleAsync(string stylePath) { bool success = false; //Add the style to the current project await QueuedTask.Run(() => StyleHelper.AddStyle(Project.Current, stylePath)); StyleProjectItem style = Project.Current.GetItems <StyleProjectItem>().First(x => x.Path == stylePath); //Verify that style can be upgraded if (style.CanUpgrade) { success = await QueuedTask.Run(() => StyleHelper.UpgradeStyle(style)); } //return true if style was upgraded return(success); }
protected override void InitExampleInternal() { Surface = new SCIChartSurface(_exampleViewLayout.SciChartSurfaceView); StyleHelper.SetSurfaceDefaultStyle(Surface); var data0 = DataManager.Instance.GetDampedSinewave(1.0, 0.01, 1000); var data1 = DataManager.Instance.GetDampedSinewave(1.0, 0.005, 1000, 12); var dataSeries = new XyyDataSeries <double, double>(); dataSeries.Append(data0.XData, data0.YData, data1.YData); var axisStyle = StyleHelper.GetDefaultAxisStyle(); var xAxis = new SCINumericAxis { IsXAxis = true, VisibleRange = new SCIDoubleRange(1.1, 2.7), Style = axisStyle }; var yAxis = new SCINumericAxis { GrowBy = new SCIDoubleRange(0.1, 0.1), Style = axisStyle }; var renderSeries = new SCIBandRenderableSeries { DataSeries = dataSeries, Style = new SCIBandSeriesStyle { Pen1 = new SCIPenSolid(0xFFFF1919, 0.7f), Pen2 = new SCIPenSolid(0xFF279B27, 0.7f), Brush1 = new SCIBrushSolid(0x33279B27), Brush2 = new SCIBrushSolid(0x33FF1919) } }; Surface.AttachAxis(xAxis, true); Surface.AttachAxis(yAxis, false); Surface.AttachRenderableSeries(renderSeries); Surface.ChartModifier = new SCIModifierGroup(new ISCIChartModifierProtocol[] { new SCIZoomPanModifier(), new SCIPinchZoomModifier(), new SCIZoomExtentsModifier() }); Surface.InvalidateElement(); }
protected override void InitExampleInternal() { Surface = new SCIChartSurface(_exampleViewLayout.SciChartSurfaceView); StyleHelper.SetSurfaceDefaultStyle(Surface); var priceData = DataManager.Instance.GetPriceDataIndu(); var dataSeries = new XyDataSeries <DateTime, double>(); dataSeries.DataDistributionCalculator = new SCIUserDefinedDistributionCalculator(); dataSeries.Append(priceData.TimeData, priceData.CloseData); var axisStyle = StyleHelper.GetDefaultAxisStyle(); var xAxis = new SCIDateTimeAxis { IsXAxis = true, GrowBy = new SCIDoubleRange(0.1, 0.1), Style = axisStyle, AxisId = "xAxis" }; var yAxis = new SCINumericAxis { GrowBy = new SCIDoubleRange(0.1, 0.1), Style = axisStyle, AxisId = "yAxis" }; var renderSeries = new SCIFastMountainRenderableSeries { DataSeries = dataSeries, XAxisId = xAxis.AxisId, YAxisId = yAxis.AxisId, Style = { AreaBrush = new SCIBrushLinearGradient(0xAAFF8D42, 0x88090E11, SCILinearGradientDirection.Vertical), BorderPen = new SCIPenSolid(0xaaffc9a8, 0.7f) } }; Surface.AttachAxis(xAxis, true); Surface.AttachAxis(yAxis, false); Surface.AttachRenderableSeries(renderSeries); Surface.ChartModifier = new SCIModifierGroup(new ISCIChartModifierProtocol[] { new SCIZoomPanModifier(), new SCIPinchZoomModifier(), new SCIZoomExtentsModifier() }); Surface.InvalidateElement(); }
protected void Page_Load(object sender, EventArgs e) { _MessageHelper = _ContentApi.EkMsgRef; _StyleHelper = new StyleHelper(); ltrMsgSelItem.Text = _MessageHelper.GetMessage("js:alert please select a config to delete"); ltrMsgDelConfig.Text = _MessageHelper.GetMessage("js:alert you sure you wish to delete this configuration Continue?"); CmsDeviceConfiguration cDevice = new CmsDeviceConfiguration(_ContentApi.RequestInformationRef); if (!Page.IsPostBack) { long _id = -1; if (!String.IsNullOrEmpty(Request.QueryString["id"])) { _id = Convert.ToInt64(Request.QueryString["id"]); } if (_id > -1) { cDevice.Delete(_id); Response.Redirect("settings.aspx?action=viewalldeviceconfigurations", false); } DeleteDevicesToolBar(); BindData(); } else { string _deviceIds = Request.Form["deleteConfigurationId"]; string[] _deviceValues; if (!String.IsNullOrEmpty(_deviceIds)) { _deviceValues = _deviceIds.Split(new char[] { ',' }); for (int i = 0; i < _deviceValues.Length; i++) { cDevice.Delete(Convert.ToInt64(_deviceValues[i])); } Response.Redirect("settings.aspx?action=viewalldeviceconfigurations", false); } } }
/// <summary> /// Seal the condition so that it can no longer be modified /// </summary> internal void Seal(ValueLookupType type) { if (_sealed) { return; } _sealed = true; // Ensure valid condition if (_property != null && _binding != null) { throw new InvalidOperationException(SR.Get(SRID.ConditionCannotUseBothPropertyAndBinding)); } switch (type) { case ValueLookupType.Trigger: case ValueLookupType.PropertyTriggerResource: if (_property == null) { throw new InvalidOperationException(SR.Get(SRID.NullPropertyIllegal, "Property")); } if (!_property.IsValidValue(_value)) { throw new InvalidOperationException(SR.Get(SRID.InvalidPropertyValue, _value, _property.Name)); } break; case ValueLookupType.DataTrigger: case ValueLookupType.DataTriggerResource: if (_binding == null) { throw new InvalidOperationException(SR.Get(SRID.NullPropertyIllegal, "Binding")); } break; default: throw new InvalidOperationException(SR.Get(SRID.UnexpectedValueTypeForCondition, type)); } // Freeze the condition value StyleHelper.SealIfSealable(_value); }
public override Bound Apply(StyleSheet.StyleSheet stylesheet, Bound styleBound, Bound maxBound) { base.Apply(stylesheet, styleBound, maxBound); StyleHelper style = stylesheet.GetHelper <StyleHelper> (); // background color, background image, borders if (!InitBackgroundImage(stylesheet)) { style.SetBackgroundSettings(this); } _backgroundColor = _view.BackgroundColor; // selected-color _selectedColor = style.Color <SelectedColor> (this); return(LayoutChildren(stylesheet, styleBound, maxBound)); }
public void ApplyStyles() { var context = ""; var baseScreen = (BaseScreen)DataContext; if (baseScreen.User != null && baseScreen.User.IsPreprocessOrders) { context = "CorrectionEnabled"; } StyleHelper.ApplyStyles(typeof(OrderLine), Lines, Application.Current.Resources, Legend, context); if (baseScreen.Settings.Value != null && baseScreen.Settings.Value.HighlightUnmatchedOrderLines) { StyleHelper.ApplyStyles(typeof(SentOrderLine), SentLines, Application.Current.Resources, Legend); } StyleHelper.ApplyStyles(typeof(Offer), Offers, Application.Current.Resources, Legend); }
private void Page_Load(System.Object sender, System.EventArgs e) { StyleHelper objStyle; try { m_MsgHelper = m_refAPI.EkMsgRef; objStyle = new StyleHelper(); StyleSheetJS = objStyle.GetClientScript(); jsAppImgPath.Text = m_refAPI.AppImgPath; Utilities.ValidateUserLogin(); } catch (Exception) { } finally { objStyle = null; } }
/// <summary> /// Constructor /// </summary> public Workarea_customproperties() { _siteApi = new SiteAPI(); _commonApi = new CommonApi(); _customPropertyApi = new CustomProperty(); _customPropertyCore = new CustomPropertyBL(); _styleHelper = new StyleHelper(); _pageAction = string.Empty; _propertyId = 0; _language = -1; _pageType = string.Empty; _translate = false; _originalLanguage = 0; _currentPage = 1; _messageHelper = _commonApi.EkMsgRef; _enableMultiLanguage = _commonApi.EnableMultilingual; _appImgPath = _commonApi.AppImgPath; _imageIconPath = _commonApi.AppPath + RelativeIconPath; _commonApi.ContentLanguage = _language; }
/// <summary> /// register Workarea CSS,Dialog CSS /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void Page_Load(object sender, System.EventArgs e) { _MessageHelper = _ContentApi.EkMsgRef; _StyleHelper = new StyleHelper(); this.RegisterWorkareaCssLink(); this.RegisterDialogCssLink(); ConditionalToolBar(); Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronJS); Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronStringJS); Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronXmlJS); Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronJFunctJS); Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekxbrowser.js", "ekxbrowserJS"); Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekutil.js", "ekutilJS"); Ektron.Cms.API.JS.RegisterJSInclude(this, "../RadWindow.js", "RadWindowJS"); Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekformfields.js", "ekformfieldsJS"); this.ClientScript.RegisterClientScriptBlock(this.GetType(), "InitializeRadWindow", "InitializeRadWindow();", true); Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaCss); Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaIeCss, Ektron.Cms.API.Css.BrowserTarget.LessThanEqualToIE7); this.Title.Text = this.GetMessage("lbl conditional section"); }
protected void Page_Load(object sender, EventArgs e) { ContentAPI m_refContentApi = new ContentAPI(); EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef); StyleHelper m_refStyle = new StyleHelper(); ApplicationAPI AppUI = new ApplicationAPI(); string action = ""; if (!string.IsNullOrEmpty(Request.QueryString["action"])) { action = Request.QueryString["action"].ToString(); } if (!string.IsNullOrEmpty(Request.QueryString["folderid"])) { folderId = Convert.ToInt64(Request.QueryString["folderid"]); Hashtable cPerms = AppUI.EkSiteRef.GetPermissions(folderId, 0, "folder"); nId = Convert.ToInt64(Request.QueryString["nid"]); EkContent gtObj = AppUI.EkContentRef; if (!string.IsNullOrEmpty(Request.QueryString["checkout"])) checkout = "&checkout=" + Request.QueryString["checkout"].ToString(); if (!string.IsNullOrEmpty(Request.QueryString["status"])) { if (Request.QueryString["status"].ToString().ToLower() == "o") checkout = checkout + "&status=o"; } string ErrorString = ""; if (ErrorString == "") { if (gtNavs.Count > 0) { string CollectionTitle = gtNavs["CollectionTitle"].ToString(); } } if (checkout != "") gtNavs = gtObj.GetEcmStageCollectionByID(nId, false, false, ref ErrorString, true, false, true); else gtNavs = gtObj.GetEcmCollectionByID(nId, false, false, ref ErrorString, true, false, true); divErrorString.InnerHtml = ErrorString; litEditColl.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("edit collection title")); litEditCollectionTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("edit collection title")); litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?Action=View&nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true); litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt: update collection text"), MsgHelper.GetMessage("btn update"), "onclick=\"return SubmitForm(\'nav\', \'VerifyCollectionForm()\');\"", StyleHelper.SaveButtonCssClass, true); litSearch.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton(action, "") + "</td>"; litTitle.Text = MsgHelper.GetMessage("generic title label"); litIDLabel.Text = MsgHelper.GetMessage("id label"); litPath.Text = MsgHelper.GetMessage("lbl path") + ":"; litTemplate.Text = MsgHelper.GetMessage("generic template label"); litDesc.Text = MsgHelper.GetMessage("description label"); litSitePath.Text = AppUI.SitePath; litLeaveTemplate.Text = MsgHelper.GetMessage("collections: leave template empty"); litInclueSub.Text = MsgHelper.GetMessage("generic include subfolders msg"); litApproval.Text = MsgHelper.GetMessage("lbl approval required"); //// NEED SOME LOGIC HERE frm_nav_template.Value = gtNavs["CollectionTemplate"].ToString(); trID.InnerHtml = gtNavs["CollectionID"].ToString(); if (gtNavs.Contains("FolderPath") && null != gtNavs["FolderPath"] && !string.IsNullOrEmpty(gtNavs["FolderPath"].ToString())) { lblFolderPath.Text = gtNavs["FolderPath"].ToString(); trFolderPath.Visible = true; litFolderSelect.Text = (m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/folderopen.png", "#", MsgHelper.GetMessage("alt select folder"), MsgHelper.GetMessage("btn select folder"), "onclick=\"LoadFolderChildPage(\'\',\'" + AppUI.ContentLanguage.ToString() + "\');\"")).Replace("<td ", "<span ").Replace("</td>", "</span>"); } trApproval.Visible = (m_refApi.IsAdmin() || IsCollectionMenuAdmin() || IsCollectionApprover() || (IsFolderAdmin(Convert.ToInt64(gtNavs["FolderID"])))); } }
protected void Page_Init(object sender, EventArgs e) { _siteApi = new SiteAPI(); _styleHelper = new StyleHelper(); }
protected void Page_Load(object sender, EventArgs e) { MsgHelper = new EkMessageHelper(ContentApi.RequestInformationRef); StyleHelper m_refStyle = new StyleHelper(); Collection gtNavs = new Collection(); string action = ""; string checkout = ""; string ErrorString = ""; string CollectionTitle = ""; ApplicationAPI AppUI = new ApplicationAPI(); Int32 ContentLanguage = 0; if (Request.QueryString["LangType"] != null) { if (!string.IsNullOrEmpty(Request.QueryString["LangType"])) { ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); if (ContentLanguage == 0) ContentLanguage = AppUI.DefaultContentLanguage; ContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); } else { if (!string.IsNullOrEmpty(ContentApi.GetCookieValue("LastValidLanguageID"))) { ContentLanguage = Convert.ToInt32(ContentApi.GetCookieValue("LastValidLanguageID")); } } } else { if (!string.IsNullOrEmpty(ContentApi.GetCookieValue("LastValidLanguageID"))) { ContentLanguage = Convert.ToInt32(ContentApi.GetCookieValue("LastValidLanguageID")); if (ContentLanguage == 0) { ContentLanguage = AppUI.DefaultContentLanguage; ContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); } } } AppUI.FilterByLanguage = ContentLanguage; long nId = Convert.ToInt64(Request.QueryString["nid"]); if (!string.IsNullOrEmpty(Request.QueryString["action"])) action = Request.QueryString["action"]; if (!string.IsNullOrEmpty(Request.QueryString["bpage"]) | !string.IsNullOrEmpty(Request.QueryString["treeViewId"])) bpage = "&bpage=reports"; if (action.ToString().ToLower() == "viewstage") gtNavs = AppUI.EkContentRef.GetEcmStageCollectionByID(nId, false, false, ref ErrorString, true, false, false); else { gtNavs = AppUI.EkContentRef.GetEcmCollectionByID(nId, false, false, ref ErrorString, true, false, false); checkout = ""; } if (Convert.ToBoolean(gtNavs["ApprovalRequired"]) == true && (((string)gtNavs["Status"] == "A") || ((string)gtNavs["Status"] == "S"))) checkout = "&checkout=true"; if (Convert.ToBoolean(gtNavs["ApprovalRequired"]) == true && (string)gtNavs["Status"] == "O") checkout = checkout + "&status=o"; if (string.IsNullOrEmpty(Request.QueryString["folderid"])) { _folderId = Convert.ToInt64(gtNavs["FolderID"]); report = true; } else { _folderId = Convert.ToInt64(Request.QueryString["folderid"]); } if (ErrorString == "") { if (gtNavs.Count > 0) CollectionTitle = gtNavs["CollectionTitle"].ToString(); } if (ErrorString != "") { divError.InnerHtml = ErrorString; } // Toolbar if (Request.QueryString["bpage"] == "reports" || _folderId == 0 || report) litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?action=ViewCollectionReport", MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true); else litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?folderid=" + _folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true); bool primaryStyleApplied = false; if (action.ToString().ToLower() == "viewstage") { litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentViewPublished.png", "collections.aspx?action=View&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("btn view publish"), MsgHelper.GetMessage("btn view publish"), "", StyleHelper.ViewPublishedButtonCssClass, !primaryStyleApplied); primaryStyleApplied = true; if ((string)gtNavs["Status"] == "S") { if (IsCollectionApprover) { litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentPublish.png", "collections.aspx?action=doPublishCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("generic Publish"), MsgHelper.GetMessage("generic Publish"), ""); litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/ui/icons/approvalDenyItem.png", "collections.aspx?action=doDeclineApprCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("lbl decline"), MsgHelper.GetMessage("lbl decline"), ""); } } else if ((string)gtNavs["Status"] == "M") { if (CanDoCollections) { litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentPublish.png", "collections.aspx?action=doDelete&nId=" + nId + "&folderid=" + _folderId + checkout + bpage, MsgHelper.GetMessage("alt: delete collection text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return ConfirmNavDelete();\""); litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/ui/icons/approvalDenyItem.png", "collections.aspx?action=doDeclineDelCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("lbl decline"), MsgHelper.GetMessage("lbl decline"), ""); } } else { if (IsCollectionApprover) litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentPublish.png", "collections.aspx?action=doPublishCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("generic Publish"), MsgHelper.GetMessage("generic Publish"), ""); else litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/approvalSubmitFor.png", "collections.aspx?action=doSubmitCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("generic Submit"), MsgHelper.GetMessage("generic Submit"), ""); litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentRestore.png", "collections.aspx?action=doUndoCheckoutCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("generic Undocheckout"), MsgHelper.GetMessage("generic Undocheckout"), ""); } } else { if ((string)gtNavs["Status"] != "A") { litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/preview.png", "collections.aspx?action=ViewStage&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("btn view stage"), MsgHelper.GetMessage("btn view stage"), "", StyleHelper.ViewStagedButtonCssClass, !primaryStyleApplied); primaryStyleApplied = true; } } string enableQDOparam = null; if (gtNavs["EnableReplication"].ToString().Length == 1) enableQDOparam = "&qdo=1"; litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentAdd.png", "collections.aspx?LangType=" + ContentLanguage + "&action=AddLink&nid=" + nId + "&folderid=" + _folderId + checkout + enableQDOparam, MsgHelper.GetMessage("alt: add collection items text"), MsgHelper.GetMessage("add collection items"), "", StyleHelper.AddButtonCssClass, !primaryStyleApplied); primaryStyleApplied = true; if (((Collection)gtNavs["Contents"]).Count > 0) { litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/remove.png", "collections.aspx?LangType=" + ContentLanguage + "&action=DeleteLink&nid=" + nId + "&folderid=" + _folderId + checkout, MsgHelper.GetMessage("alt: remove collection items text"), MsgHelper.GetMessage("remove collection items"), "", StyleHelper.RemoveButtonCssClass); litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/arrowUpDown.png", "collections.aspx?LangType=" + ContentLanguage + "&action=ReOrderLinks&nid=" + nId + "&folderid=" + _folderId + checkout, MsgHelper.GetMessage("alt: reorder collection text"), MsgHelper.GetMessage("btn reorder"), "", StyleHelper.ReOrderButtonCssClass); } if ((string)gtNavs["Status"] != "M") { if (CanDoCollections) { if (string.IsNullOrEmpty(bpage) && !string.IsNullOrEmpty(Request.QueryString["folderid"]) && Request.QueryString["folderid"] == "0") { bpage = "&bpage=reports"; } litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/delete.png", "collections.aspx?action=doDelete&nId=" + nId + "&folderid=" + _folderId + checkout + bpage, MsgHelper.GetMessage("alt: delete collection text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return ConfirmNavDelete();\"", StyleHelper.DeleteButtonCssClass); } else litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/delete.png", "collections.aspx?action=doSubmitDelCol&nId=" + nId + "&folderid=" + _folderId + checkout, MsgHelper.GetMessage("alt: delete collection text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return ConfirmNavDelete();\"", StyleHelper.DeleteButtonCssClass); } litButtons.Text += StyleHelper.ActionBarDivider; if (action == "ViewStage") litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/properties.png", "collections.aspx?LangType=" + ContentLanguage + "&action=ViewStageAttributes&nid=" + nId + "&folderid=" + _folderId + checkout + enableQDOparam, MsgHelper.GetMessage("alt collection properties button text"), MsgHelper.GetMessage("properties text"), "", StyleHelper.ViewPropertiesButtonCssClass); else litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/properties.png", "collections.aspx?LangType=" + ContentLanguage + "&action=ViewAttributes&nid=" + nId + "&folderid=" + _folderId + enableQDOparam, MsgHelper.GetMessage("alt collection properties button text"), MsgHelper.GetMessage("properties text"), "", StyleHelper.ViewPropertiesButtonCssClass); if (((string)gtNavs["Status"] == "A") && (Convert.ToInt32(gtNavs["EnableReplication"]) == 1)) { litButtons.Text += StyleHelper.ActionBarDivider; litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/translation.png", "DynReplication.aspx?collid=" + nId, MsgHelper.GetMessage("alt quickdeploy collection button text"), MsgHelper.GetMessage("alt quickdeploy collection button text"), "", StyleHelper.TranslationButtonCssClass); } litViewCollection.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("view collection title") + " \"" + CollectionTitle + "\""); litCollItems.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("ViewCollectionItems", "") + "</td>"; string genericView = MsgHelper.GetMessage("generic View"); Collection gtLinks = (Collection)gtNavs["Contents"]; DataTable dtCollection = new DataTable(); dtCollection.Columns.Add("HTML"); dtCollection.Columns.Add("ContentLanguage"); dtCollection.Columns.Add("ContentID"); dtCollection.Columns.Add("ContentLinks"); foreach (Collection gtLink in gtLinks) { DataRow dRow = dtCollection.NewRow(); String backPage = "Action=View&nid=" + nId + "&folderid=" + _folderId; String contentUrl = "content.aspx?action=View&LangType=" + gtLink["ContentLanguage"].ToString() + "&id=" + gtLink["ContentID"] + "&callerpage=collections.aspx&origurl=" + EkFunctions.UrlEncode(backPage); String contentTitle = genericView + " " + gtLink["ContentTitle"].ToString().Replace("'", "`"); String iconurl = ""; try { iconurl = gtLink["ImageUrl"].ToString(); } catch { // ignore errors if we try getting imageurl on regular content } ContentApi.ContentLanguage = ContentLanguage; string dmsmenuhtml = ContentApi.GetDmsContextMenuHTML(Convert.ToInt64(gtLink["ContentID"]), Convert.ToInt64(gtLink["ContentLanguage"]), Convert.ToInt64(gtLink["ContentType"]), Convert.ToInt64(gtLink["ContentSubtype"]), gtLink["ContentTitle"].ToString(), MsgHelper.GetMessage("generic Title") + " " + gtLink["ContentTitle"], contentUrl, "", iconurl); dRow["HTML"] = dmsmenuhtml; dRow["ContentLanguage"] = gtLink["ContentLanguage"].ToString(); dRow["ContentID"] = gtLink["ContentID"].ToString(); dRow["ContentLinks"] = gtLink["ContentLinks"].ToString(); dtCollection.Rows.Add(dRow); } rptColl.DataSource = dtCollection; rptColl.DataBind(); if (ContentApi.EnableMultilingual == 1) { litEnableMult.Text = StyleHelper.ActionBarDivider; litViewLang.Text = MsgHelper.GetMessage("view language") + LangDD(false, ""); } gtNavs = null; if ((Request.QueryString["rf"] != null && Request.QueryString["rf"] == "1") || (Request.QueryString["reloadtrees"] != null && Request.QueryString["reloadtrees"] == "coll")) { ReloadClientScript(""); litRefreshCollAccordion.Text = "<script language=\"javascript\">" + ("\r\n" + "top.refreshCollectionAccordion(") + ContentLanguage + ");" + ("\r\n" + "</script>") + "\r\n"; } }
private void Page_Load(System.Object sender, System.EventArgs e) { StyleHelper shelper = new StyleHelper(); litStyleSheetJS.Text = shelper.GetClientScript(); Utilities.ValidateUserLogin(); if (!(Request.QueryString["action"] == null)) { if (Request.QueryString["action"] != "") { _PageAction = (string) (Ektron.Cms.Common.EkFunctions.HtmlEncode(Request.QueryString["action"].ToLower())); } } if (!(Request.QueryString["LangType"] == null)) { if (Request.QueryString["LangType"] != "") { _ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); _CommonApi.SetCookieValue("LastValidLanguageID", _ContentLanguage.ToString()); } else { if (_CommonApi.GetCookieValue("LastValidLanguageID") != "") { _ContentLanguage = Convert.ToInt32(_CommonApi.GetCookieValue("LastValidLanguageID")); } } } else { if (_CommonApi.GetCookieValue("LastValidLanguageID") != "") { _ContentLanguage = Convert.ToInt32(_CommonApi.GetCookieValue("LastValidLanguageID")); } } if (_ContentLanguage.ToString() == "CONTENT_LANGUAGES_UNDEFINED") { _CommonApi.ContentLanguage = Convert.ToInt32("ALL_CONTENT_LANGUAGES"); } else { _CommonApi.ContentLanguage = _ContentLanguage; } _EnableMultilingual = System.Convert.ToInt32(_CommonApi.EnableMultilingual); EmailHelper ehelp = new EmailHelper(); EmailArea.Text = ehelp.MakeEmailArea(); }
protected void Page_Load(object sender, EventArgs e) { EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef); StyleHelper m_refStyle = new StyleHelper(); CommonApi m_refApi = new CommonApi(); ApplicationAPI AppUI = new ApplicationAPI(); String MenuTitle = String.Empty; long nId = Convert.ToInt64(Request.QueryString["nid"]); Collection gtLinks = AppUI.EkContentRef.GetMenuByID(nId, 0, false); if (gtLinks.Count > 0) { MenuTitle = gtLinks["MenuTitle"].ToString(); gtLinks = (Collection)gtLinks["Items"]; } string action = string.Empty; long folderId = 0; if (string.IsNullOrEmpty(Request.QueryString["action"])) action = Request.QueryString["action"].ToString(); if (string.IsNullOrEmpty(Request.QueryString["folderId"])) folderId = Convert.ToInt64(Request.QueryString["folderId"]); litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton(action, "") + "</td>"; litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("delete menu items title") + " \"" + MenuTitle + "\""); if (m_refApi.TreeModel == 1) litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "menutree.aspx?nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true); else litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?Action=ViewMenu&nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true); litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/delete.png", "#", MsgHelper.GetMessage("alt: delete menu items text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return SubmitForm(\'selections\', \'GetIDs()\');\"", StyleHelper.DeleteButtonCssClass, true); Int32 lLoop = 0; string cLanguagesArray=""; DataTable dtItems = new DataTable(); dtItems.Columns.Add("ItemTitle"); dtItems.Columns.Add("ItemID"); dtItems.Columns.Add("ItemLink"); dtItems.Columns.Add("ItemType"); dtItems.Columns.Add("ID"); dtItems.Columns.Add("ContentLanguage"); dtItems.Columns.Add("lLoop"); foreach (Collection gtLink in gtLinks) { DataRow dRow = dtItems.NewRow(); dRow["ItemTitle"] = gtLink["ItemTitle"].ToString(); dRow["ItemID"] = gtLink["ItemID"].ToString(); dRow["ItemLink"] = gtLink["ItemLink"].ToString(); dRow["ItemType"] = gtLink["ItemType"].ToString(); dRow["ID"] = gtLink["ID"].ToString(); dRow["ContentLanguage"] = gtLink["ContentLanguage"].ToString(); dRow["lLoop"] = lLoop.ToString(); dtItems.Rows.Add(dRow); cLinkArray = cLinkArray + "," + gtLink["ID"] + "_" + gtLink["ItemType"]; cLanguagesArray=cLanguagesArray + "," + gtLink["ContentLanguage"] + "_" + gtLink["ItemType"]; fLinkArray = fLinkArray + "," + folderId; lLoop++; } rptItems.DataSource = dtItems; rptItems.DataBind(); if (cLinkArray.Length > 0) { cLinkArray = cLinkArray.Remove(0, 1); fLinkArray = fLinkArray.Remove(0, 1); cLanguagesArray = cLanguagesArray.Remove(0, 1); } CollectionID.Value = nId.ToString(); form1.Action = "collections.aspx?Action=doDeleteMenuItem&folderid=" + folderId + "&nid=" + nId; litURL.Text = MsgHelper.GetMessage("generic URL Link"); litID.Text = MsgHelper.GetMessage("generic ID"); litGenericTitle.Text = MsgHelper.GetMessage("generic Title"); aSelect.InnerHtml = MsgHelper.GetMessage("generic select all msg"); aClear.InnerHtml = MsgHelper.GetMessage("generic clear all msg"); }
public Workarea_sync2_SyncReview() { _styleHelper = new StyleHelper(); _siteApi = new SiteAPI(); _presenter = new SyncReviewPresenter(this); }
public IOSStyleSheet () { Helper = new StyleHelper (this); }
protected void Page_Load(object sender, EventArgs e) { MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef); StyleHelper m_refStyle = new StyleHelper(); CommonApi m_refApi = new CommonApi(); ApplicationAPI AppUI = new ApplicationAPI(); if (Request.QueryString["LangType"] == "-1") { ContentLanguage = AppUI.DefaultContentLanguage; AppUI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); AppUI.ContentLanguage = ContentLanguage; } else { AppUI.ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); ContentLanguage = AppUI.ContentLanguage; } if (!string.IsNullOrEmpty(Request.QueryString["noworkarea"]) && Request.QueryString["noworkarea"] == "1") { noWorkAreaString = "&noworkarea=1"; } long mpID = Convert.ToInt64(Request.QueryString["parentid"]); long maID = Convert.ToInt64(Request.QueryString["ancestorid"]); string AncestorIDParam = ""; string ParentIDParam = ""; Collection gtNavs = new Collection(); if (string.IsNullOrEmpty(Request.QueryString["ancestorid"])) AncestorIDParam = "&ancestorid=" + Request.QueryString["ancestorid"]; if (string.IsNullOrEmpty(Request.QueryString["parentid"])) ParentIDParam = "&parentid=" + Request.QueryString["parentid"]; FolderId = Convert.ToInt64(Request.QueryString["folderid"]); MenuId = Convert.ToInt64(Request.QueryString["nId"]); string ItemType = Request.Form["ItemType"]; if (mpID != 0) { gtNavs = AppUI.EkContentRef.GetMenuByID(mpID, 0, false); if (gtNavs.Count > 0) { if (gtNavs.Contains("EnableReplication")) enableQDOparam = "&qdo=1"; } } switch (ItemType) { case "content": Response.Redirect("collections.aspx?action=AddLink&addto=Menu&folderid=" + FolderId + "&nid=" + MenuId + "&LangType=" + ContentLanguage + "&iframe=" + Request.QueryString["iframe"] + AncestorIDParam + ParentIDParam + "&back=" + Server.UrlEncode(Request.QueryString["back"]) + enableQDOparam + noWorkAreaString); break; case "newcontent": Response.Redirect("collectiontree.aspx?action=AddLink&addto=menu&noworkarea=1&nid=" + MenuId + "&folderid=" + FolderId + "&LangType=" + ContentLanguage); break; case "submenu": string enableReplicationFlag = ""; if ((gtNavs.Count > 0) && (gtNavs.Contains("EnableReplication"))) enableReplicationFlag = gtNavs["EnableReplication"].ToString(); string strPath = "collections.aspx?action=AddSubMenu&folderid=" + FolderId + "&nId=" + MenuId + "&parentid=" + mpID + "&ancestorid=" + maID + "&LangType=" + ContentLanguage + "&iframe=" + Request.QueryString["iframe"] + "&back=" + Server.UrlEncode(Request.QueryString["back"]) + "&QD=" + enableReplicationFlag + noWorkAreaString; Response.Redirect(strPath); break; case "library": divLibrary.Visible = true; Collection gtFolderInfo = AppUI.EkContentRef.GetFolderInfoWithPath(FolderId); FolderPath = gtFolderInfo["Path"].ToString(); if (FolderPath.Substring(FolderPath.Length - 1, 1) == "\\") FolderPath = FolderPath.Remove(FolderPath.Length - 1, 1); FolderPath = FolderPath.Replace(@"\", @"\\"); divLibrary.Visible = true; litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("Add Menu Item Title")); litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("pAddMenuItem", "") + "</td>"; if (!string.IsNullOrEmpty(Request.QueryString["back"])) litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true); else if (Request.QueryString["iframe"] == "true") litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true); else litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"top.close();\"", StyleHelper.CancelButtonCssClass, true); litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt Save Menu Item"), MsgHelper.GetMessage("btn save"), "onclick=\"return SubmitForm(\'AddMenuItem\', \'VerifyLibraryAssest()\');\"", StyleHelper.SaveButtonCssClass, true); break; default: divOther.Visible = true; litHelp1.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("pAddMenuItem", "") + "</td>"; litTitle1.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("Add Menu Item Title")); if (!string.IsNullOrEmpty(Request.QueryString["back"])) litButtons1.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true); else if (Request.QueryString["iframe"] == "true") litButtons1.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true); else litButtons1.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"top.close();\"", StyleHelper.CancelButtonCssClass, true); litButtons1.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt Save Menu Item"), MsgHelper.GetMessage("btn save"), "onclick=\"return SubmitForm(\'AddMenuItem\', \'VerifyAddMenuItem()\');\"", StyleHelper.SaveButtonCssClass, true); break; } }
protected void Page_Load(object sender, EventArgs e) { MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef); StyleHelper m_refStyle = new StyleHelper(); CommonApi m_refApi = new CommonApi(); ApplicationAPI AppUI = new ApplicationAPI(); sitePath = AppUI.SitePath; AppPath = AppUI.AppPath; AxMenuData menuData = new AxMenuData(); string ErrorString =""; MenuId = Convert.ToInt64(Request.QueryString["nid"]); FolderId = Convert.ToInt64(Request.QueryString["folderid"]); if (Request.QueryString["LangType"] == "-1") { ContentLanguage = AppUI.DefaultContentLanguage; AppUI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); AppUI.ContentLanguage = ContentLanguage; } else { ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); if (ContentLanguage == 0) { ContentLanguage = AppUI.DefaultContentLanguage; AppUI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); AppUI.ContentLanguage = ContentLanguage; } } Hashtable cPerms = AppUI.EkSiteRef.GetPermissions(FolderId, 0, "folder"); if (!(IsCollectionMenuRoleMember() || (cPerms.Contains("Collections") && Convert.ToBoolean(cPerms["Collections"])))) ErrorString = MsgHelper.GetMessage("com: user does not have permission"); if (ErrorString == "") { if (m_refApi.TreeModel == 1) gtLinks = AppUI.EkContentRef.GetMenuByID(MenuId, 0,false); else gtLinks = AppUI.EkContentRef.GetMenuByID(MenuId, 0, true); menuData = AppUI.EkContentRef.GetMenuDataByID(MenuId); if (!string.IsNullOrEmpty(menuData.AssociatedFolderIdList)) { AssociatedFolderIdListString = menuData.AssociatedFolderIdList; AssociatedFolderTitleListString = GetTitlesFromFolderIds(menuData.AssociatedFolderIdList); } if (!string.IsNullOrEmpty(menuData.AssociatedTemplates)) AssociatedTemplatesString = menuData.AssociatedTemplates; } litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("edit menu title")); litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("editmenu", "") + "</td>"; if (Request.QueryString["back"] != "") litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true); else if (Request.QueryString["iframe"] == "true") litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true); else { if (m_refApi.TreeModel == 1) litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "menutree.aspx?nid=" + MenuId + "&folderid=" + FolderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true); else litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?action=ViewMenu&nid=" + MenuId + "&folderid=" + FolderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true); } litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", "Save Menu", MsgHelper.GetMessage("btn save"), "onclick=\"return SubmitForm(\'menu\', \'VerifyMenuForm()\');\"", StyleHelper.SaveButtonCssClass, true); LanguageName = gtLinks["ContentLanguage"].ToString(); }
private void Page_Load(System.Object sender, System.EventArgs e) { //Put user code to initialize the page here string strResult = ""; string sZoom = ""; string sAppPath = ""; sAppPath = m_refContentApi.AppPath; string sSitePath = ""; sSitePath = m_refContentApi.SitePath; StyleHelper aSytleHelper = new StyleHelper(); StyleSheetJS.Text = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + sSitePath + "default.css\" />" + "\r\n"; StyleSheetJS.Text = StyleSheetJS.Text + aSytleHelper.GetClientScript(); if (!(Request.QueryString["zoom"] == null)) { if (Request.QueryString["zoom"] != "1") { sZoom = (string) (Request.QueryString["zoom"].ToString()); } } if (Request.QueryString["display_type"] == null) { //display form block or report in IFRAME ReportForm.Visible = false; PollForm.Visible = true; if (sZoom != "") { PollForm.Style["zoom"] = sZoom; } } else { //post back from "inline" DisplayType "new window", originally in formresponse.aspx PollForm.Visible = false; ReportForm.Visible = true; if (sZoom != "") { ReportForm.Style["zoom"] = sZoom; } Collection cForm; string XmlData = ""; string DisplayType = ""; ArrayList arrResult = new ArrayList(); Hashtable hshQuestions = null; int llResponses; System.Xml.Xsl.XsltArgumentList objXsltArgs = new System.Xml.Xsl.XsltArgumentList(); Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache"); Response.Expires = -1; //Put user code to initialize the page here var ContentLanguage = m_refContentApi.ContentLanguage; var AppImgPath = m_refContentApi.AppImgPath; var FormId = Request.QueryString["id"]; DisplayType = Request.QueryString["display_type"]; if (Request.QueryString["LangType"] != "") { ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); } else { if (m_refContentApi.GetCookieValue("LastValidLanguageID") != "") { ContentLanguage = int.Parse(m_refContentApi.GetCookieValue("LastValidLanguageID")); } } var EnableMultilingual = m_refContentApi.EnableMultilingual; m_refContentApi.ContentLanguage = ContentLanguage; var Security_info = m_refContentApi.LoadPermissions(Convert.ToInt64(FormId), "content", 0); var objMod = m_refContentApi.EkModuleRef; llResponses = Convert.ToInt32(m_refContentApi.EkModuleRef.GetFormSubmissionsByFormId(Convert.ToInt64(FormId))); cForm = objMod.GetFormById(Convert.ToInt64(FormId)); if ((Convert.ToString(FormId) != "") && (Convert.ToInt32(FormId) > 0)) { if ((((DisplayType) == Ektron.Cms.Common.EkEnumeration.CMSFormReportType.DataTable.ToString()) || ((DisplayType) == Ektron.Cms.Common.EkEnumeration.CMSFormReportType.Bar.ToString())) || ((DisplayType) == Ektron.Cms.Common.EkEnumeration.CMSFormReportType.Combined.ToString())) { arrResult = m_refContentApi.GetFormDataHistogramById(Convert.ToInt64(FormId)); hshQuestions = m_refContentApi.GetFormFieldQuestionsById(Convert.ToInt64(FormId)); XmlData = m_refContentApi.EkModuleRef.CreateHistogramFormDataXml(cForm, llResponses, arrResult, hshQuestions, ""); } else if ((DisplayType) == Ektron.Cms.Common.EkEnumeration.CMSFormReportType.Pie.ToString()) { bool showAxis = false; string ImageUrl; //ImageUrl = sAppPath & "chart.aspx?form_page=form_page&grpdisplay=" & DisplayType & "&responses=" & llResponses & "&showAxis=" & showAxis & "&fieldOptionNames=" & strFieldOptionNames & "&FieldNames=" & strFieldNames & "&FormValues=" & strFieldOptionValues ImageUrl = sAppPath + "chart.aspx?form_page=form_page&grpdisplay=" + DisplayType + "&responses=" + llResponses + "&showAxis=" + showAxis + "&formid=" + FormId; XmlData = m_refContentApi.EkModuleRef.CreateHistogramFormDataXml(cForm, llResponses, arrResult, hshQuestions, ImageUrl); } else { } } lblReport.Text = ""; objXsltArgs = new System.Xml.Xsl.XsltArgumentList(); objXsltArgs.AddParam("displayType", string.Empty, DisplayType); objXsltArgs.AddParam("appPath", string.Empty, sAppPath); try { strResult = m_refContentApi.EkModuleRef.InsertRefreshReportJS(""); strResult = strResult + Ektron.Cms.Common.EkFunctions.XSLTransform(null, null, true, false, objXsltArgs, true, null); } catch (Exception ex) { strResult = ex.Message; } lblReport.Text = strResult; } }
private void Page_Load(System.Object sender, System.EventArgs e) { StyleHelper m_refStyle = new StyleHelper(); m_refMsg = (new CommonApi()).EkMsgRef; RegisterResources(); if (PageAction == "viewlibrarycategory") { // txtTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("library folder title bar") & " """ & FolderInfo.Name & """") // ViewLibraryCategoryToolBar() divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("library folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); ViewLibraryByCategoryToolBar(); } else if (PageAction == "viewlibrarybycategory") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("library folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); ViewLibraryByCategoryToolBar(); } else if (PageAction == "updateqlinktemplatebycategory") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("Update URL Link Template for") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); UpdateQLinkTemplateByCategoryToolBar(); } else if (PageAction == "addlibraryitem") { if (Operation == "overwrite") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("overwrite folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); } else { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("add to lib folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); } AddLibraryItemToolBar(); } else if (PageAction == "viewlibraryitem") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("view lib folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); ViewLibraryItemToolBar(); } else if (PageAction == "deletelibraryitem") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("delete lib folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); DeleteLibraryItemToolBar(); } else if (PageAction == "editlibraryitem") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("edit lib folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); EditLibraryItemToolBar(); } else if (PageAction == "viewlibrarysettings") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("library page title")); ViewLibrarySettingsToolBar(); //ElseIf (PageAction = "viewloadbalance") Then // divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("view lb settings")) // ViewLoadBalanceToolBar() //ElseIf (PageAction = "addloadbalance") Then // divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("add lb path msg")) // AddLoadBalanceToolBar() //ElseIf (PageAction = "editloadbalancesettings") Then // divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("edit lb path msg")) // EditLoadBalanceSettingsToolBar() //ElseIf (PageAction = "removeloadbalance") Then // divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("remove lb path msg")) // RemoveLoadBalanceToolBar() } else if (PageAction == "editlibrarysettings") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("library page title")); EditLibrarySettingsToolBar(); } }
public meta_data50() { _StyleHelper = new StyleHelper(); _SearchHelper = new SearchHelper(); _ContentApi = new ContentAPI(); _ApplicationName = _ContentApi.AppName; _ApplicationPath = _ContentApi.AppPath; _SitePath = _ContentApi.SitePath; _MessageHelper = _ContentApi.EkMsgRef; AppImgPath = siteRef.AppImgPath; CurrentUserId = siteRef.UserId; EnableMultilingual = siteRef.EnableMultilingual.ToString(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); string helpScreenAlias = ""; if(!String.IsNullOrEmpty(Request.QueryString["report"])) { helpScreenAlias = Request.QueryString["report"]; } else { helpScreenAlias = "overview"; } //report=visits&provider=Omniture, Omni_visits if (Request.Url.AbsolutePath.ToLower().Contains("trends.aspx")) { if (Request.QueryString["report"] == "visits" && Request.QueryString["provider"] == "Omniture") { helpScreenAlias = "Omni_visits"; } } //Webtrend //Overview.aspx?provider=WebTrends, wt_overview if (Request.Url.AbsolutePath.ToLower().Contains("overview.aspx")) { if (string.IsNullOrEmpty(Request.QueryString["report"]) && Request.QueryString["provider"] == "WebTrends") { helpScreenAlias = "wt_overview"; } } StyleHelper m_refStyle = new StyleHelper(); DateRangePicker1.BadStartDateFormatErrorHandler += BadDateFormatErrorHandler; DateRangePicker1.BadEndDateFormatErrorHandler += BadDateFormatErrorHandler; DateRangePicker1.BadStartDateFormatMessage = GetMessage("msg bad start date format"); DateRangePicker1.BadEndDateFormatMessage = GetMessage("msg bad end date format"); DateRangePicker1.MaximumDate = DateTime.Today; DateRangePicker1.DefaultEndDate = DateTime.Today.AddDays(-1); // today is a partial day DateRangePicker1.DefaultStartDate = DateRangePicker1.DefaultEndDate.AddDays(-30); // set ID to make use of cookie persistence: DateRangePicker1.PersistenceId = "EktronWorkareaReportsAnalytics"; litHelp.Text = m_refStyle.GetHelpButton(helpScreenAlias, "center"); ////Defect:58466 ////report=visits&provider=Omniture, Omni_visits //if (Request.Url.AbsolutePath.ToLower().Contains("trends.aspx")) //{ // if (Request.QueryString["report"] == "visits" && Request.QueryString["provider"] == "Omniture") // { // litHelp.Text = litHelp.Text.Replace("#visits", "#Omni_visits"); // } //} ////Webtrend ////Overview.aspx?provider=WebTrends, wt_overview //if (Request.Url.AbsolutePath.ToLower().Contains("overview.aspx")) //{ // if (string.IsNullOrEmpty(Request.QueryString["report"]) && Request.QueryString["provider"] == "WebTrends") // { // litHelp.Text = litHelp.Text.Replace("#overview", "#wt_overview"); // } //} Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronStyleHelperJS); }