예제 #1
0
 protected override object[] BuildLookupData(string name, out DextopSessionVariableSharing sharing)
 {
     switch (name)
     {
     case "OnOff":
         sharing = DextopSessionVariableSharing.Global;
         return(new[] {
             new object[] { true, "On" },
             new object[] { false, "Off" }
         });
     }
     return(base.BuildLookupData(name, out sharing));
 }
예제 #2
0
		protected override object[] BuildLookupData(string name, out DextopSessionVariableSharing sharing)
		{
			switch (name)
			{
				case "OnOff":					
					sharing = DextopSessionVariableSharing.Global;
					return new[] { 
						new object[] { true, "On" },
						new object[] { false, "Off" }
					};
			}
			return base.BuildLookupData(name, out sharing);
		}
예제 #3
0
        /// <summary>
        /// Sets the session variable.
        /// </summary>
        /// <param name="sessionVariableName">Name of the session variable.</param>
        /// <param name="value">The value.</param>
        /// <param name="sharing">The sharing mode.</param>
        public void SetVariable(string sessionVariableName, object value, DextopSessionVariableSharing sharing)
        {
            switch (sharing)
            {
            case DextopSessionVariableSharing.Global:
                SetGlobalVariable(sessionVariableName, value);
                break;

            case DextopSessionVariableSharing.Culture:
                SetLocalizedVariable(sessionVariableName, value);
                break;

            case DextopSessionVariableSharing.None:
                SetVariable(sessionVariableName, value);
                break;
            }
        }
예제 #4
0
 /// <summary>
 /// Builds the lookup data.
 /// </summary>
 /// <param name="lookupName">The lookup name.</param>
 /// <param name="sharing">The sharing mode.</param>
 /// <returns>The lookup data.</returns>
 protected virtual object[] BuildLookupData(String lookupName, out DextopSessionVariableSharing sharing)
 {
     throw new DextopException("Shared lookup data '{0}' is not registered.", lookupName);
 }
예제 #5
0
 void SetLookupData(String name, LookupData data, DextopSessionVariableSharing sharing)
 {
     SetVariable(GetLookupDataKey(name), data, sharing);
 }
예제 #6
0
		/// <summary>
		/// Builds the lookup data.
		/// </summary>
		/// <param name="lookupName">The lookup name.</param>
		/// <param name="sharing">The sharing mode.</param>
		/// <returns>The lookup data.</returns>
		protected virtual object[] BuildLookupData(String lookupName, out DextopSessionVariableSharing sharing)
		{
			throw new DextopException("Shared lookup data '{0}' is not registered.", lookupName);
		}
예제 #7
0
 void SetLookupData(String name, LookupData data, DextopSessionVariableSharing sharing)
 {
     SetVariable(GetLookupDataKey(name), data, sharing);
 }
예제 #8
0
		/// <summary>
		/// Sets the session variable.
		/// </summary>
		/// <param name="sessionVariableName">Name of the session variable.</param>
		/// <param name="value">The value.</param>
		/// <param name="sharing">The sharing mode.</param>
        public void SetVariable(string sessionVariableName, object value, DextopSessionVariableSharing sharing)
        {
            switch (sharing)
            {
                case DextopSessionVariableSharing.Global:
                    SetGlobalVariable(sessionVariableName, value);
                    break;
                case DextopSessionVariableSharing.Culture:
                    SetLocalizedVariable(sessionVariableName, value);
                    break;
                case DextopSessionVariableSharing.None:
                    SetVariable(sessionVariableName, value);
                    break;
            }
        }