コード例 #1
0
 private void bag1_SetValue(object sender, PropertySpecEventArgs e)
 {
     try
     {
         if (e.Property.PropTag != null && e.Property.PropTag is JSetting)
         {
             JSetting setting = e.Property.PropTag as JSetting;
             if (setting.IsCustomSetting())
             {
             }
             else
             {
                 setting.Value = e.Value;
                 setting.ForceValueChangedEvent(this);
             }
         }
     }
     catch (Exception ex)
     {
         Log.ShowError(ex);
     }
 }
コード例 #2
0
 private void bag1_GetValue(object sender, PropertySpecEventArgs e)
 {
     try
     {
         if (e.Property.PropTag != null && e.Property.PropTag is JSetting)
         {
             JSetting setting = e.Property.PropTag as JSetting;
             if (setting.IsCustomSetting())
             {
                 e.Value = Dm.Instance.GetCustomSettingValue(setting, true, AppManager.Instance.PropertyWindowTruncatedMaxItemCount, AppManager.Instance.PropertyWindowTruncatedMaxLength);
             }
             else
             {
                 e.Value = setting.Value;
             }
         }
     }
     catch (Exception ex)
     {
         Log.ShowError(ex);
     }
 }