public PaymentTermsSheet(IProgram program, IWorksheet worksheet)
        {
            this.program = (Program)program;

            this.Sheet = worksheet;

            this.Controls = new Controls(worksheet);

            this.Binder             = new Binder(this.Sheet, Constants.ChangedStyle);
            this.Binder.ToDomained += this.Binder_ToDomained;

            this.Sheet.SheetActivated += this.Sheet_SheetActivated;

            this.Sheet.Name = $"{nameof(PaymentTermsSheet)}.{this.Sheet.Index}";

            // Fetch after we changed the name.
            this.NamedRanges = this.Sheet.GetNamedRanges();

            // Save so we can re-instate it as an invoicesSheet on startup
            var customProperties = new CustomProperties();

            customProperties.Add(AppConstants.KeySheet, nameof(PaymentTermsSheet));
            customProperties.Add(AppConstants.KeyCreated, DateTime.Now);
            customProperties.Add(AppConstants.KeyCreatedBy, this.program.Services.Configuration["Username"]);
            this.Sheet.SetCustomProperties(customProperties);
        }
 void convertCustomProperties(SerializableDictionary old, CustomProperties @new)
 {
     old.ForEach(
         pair =>
         @new.Add(
             pair.Key, new CustomProperty(pair.Value.name, pair.Value.value, pair.Value.type, pair.Value.description)));
 }
            protected SharpmakeBaseProject(
                bool excludeSharpmakeFiles = true,
                bool generateXmlDoc        = true
                )
            {
                AddTargets(GetDefaultTargets());

                GenerateDocumentationFile = generateXmlDoc;

                RootPath = Globals.AbsoluteRootPath;

                // Use the new csproj style
                ProjectSchema = CSharpProjectSchema.NetCore;

                // we need to disable determinism while because we are using wildcards in assembly versions
                // error CS8357: The specified version string contains wildcards, which are not compatible with determinism
                CustomProperties.Add("Deterministic", "true");

                // Enable Globalization Invariant Mode
                // https://github.com/dotnet/runtime/blob/master/docs/design/features/globalization-invariant-mode.md
                CustomProperties.Add("InvariantGlobalization", "true");

                if (excludeSharpmakeFiles)
                {
                    NoneExtensions.Add(".sharpmake.cs");
                }
            }
        public DebugProject()
            : base(typeof(Target), typeof(Configuration), isInternal: true)
        {
            _projectInfo = DebugProjectGenerator.DebugProjects[GetType()];

            // set paths
            RootPath       = _projectInfo.ProjectFolder;
            SourceRootPath = RootPath;

            // add selected source files
            SourceFiles.AddRange(_projectInfo.ProjectFiles);

            // ensure that no file will be automagically added
            SourceFilesExtensions.Clear();
            ResourceFilesExtensions.Clear();
            PRIFilesExtensions.Clear();
            ResourceFiles.Clear();
            NoneExtensions.Clear();
            VsctExtension.Clear();

            Name = _projectInfo.DisplayName;

            // Use the new csproj style
            ProjectSchema = CSharpProjectSchema.NetCore;

            // prevents output dir to have a framework subfolder
            CustomProperties.Add("AppendTargetFrameworkToOutputPath", "false");

            // we need to disable determinism while because we are using wildcards in assembly versions
            // error CS8357: The specified version string contains wildcards, which are not compatible with determinism
            CustomProperties.Add("Deterministic", "false");

            AddTargets(DebugProjectGenerator.GetTargets());
        }
            protected SharpmakeBaseProject(
                bool excludeSharpmakeFiles = true,
                bool generateXmlDoc        = true
                )
            {
                AddTargets(GetDefaultTargets());

                _generateXmlDoc = generateXmlDoc;

                RootPath = Globals.AbsoluteRootPath;

                // Use the new csproj style
                ProjectSchema = CSharpProjectSchema.NetCore;

                // prevents output dir to have a framework subfolder
                CustomProperties.Add("AppendTargetFrameworkToOutputPath", "false");

                // we need to disable determinism while because we are using wildcards in assembly versions
                // error CS8357: The specified version string contains wildcards, which are not compatible with determinism
                CustomProperties.Add("Deterministic", "false");

                if (excludeSharpmakeFiles)
                {
                    SourceFilesExcludeRegex.Add(@".*\.sharpmake.cs");
                }
            }
Beispiel #6
0
 /// <summary>
 /// Adds a new property definition
 /// </summary>
 /// <param name="name"></param>
 /// <param name="propertyType"></param>
 /// <param name="attributes"></param>
 public static void AddProperty(string name, Type propertyType, List <Attribute> attributes)
 {
     if (!CheckIfNameExists(name))
     {
         CustomProperties.Add(new CustomPropertyInfoHelper(name, propertyType, attributes, typeof(T)));
     }
 }
            protected SharpmakeBaseProject(
                bool excludeSharpmakeFiles = true,
                bool generateXmlDoc        = true
                )
            {
                AddTargets(GetDefaultTargets());

                GenerateDocumentationFile = generateXmlDoc;

                RootPath = Globals.AbsoluteRootPath;

                // Use the new csproj style
                ProjectSchema = CSharpProjectSchema.NetCore;

                CustomProperties.Add("Deterministic", "true");

                // PathUtil.cs uses some unsafe blocks
                CustomProperties.Add("AllowUnsafeBlocks", "true");

                // Adding doc warning suppression here to apply to all configs so it will
                // take effect when publishing for other platforms not specified in the default configurations
                // W1: CS1570: XML comment on 'construct' has badly formed XML - 'reason
                // W4: CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
                CustomProperties.Add("NoWarn", "1570,1591");

                // Enable Globalization Invariant Mode
                // https://github.com/dotnet/runtime/blob/master/docs/design/features/globalization-invariant-mode.md
                CustomProperties.Add("InvariantGlobalization", "true");

                if (excludeSharpmakeFiles)
                {
                    NoneExtensions.Add(".sharpmake.cs");
                }
            }
        public SharpmakeProject()
        {
            Name = "Sharpmake";

            // indicates where to find the nuget(s) we reference without needing nuget.config or global setting
            CustomProperties.Add("RestoreAdditionalProjectSources", "https://api.nuget.org/v3/index.json");
        }
Beispiel #9
0
 protected override void AddCustomPropertiesToInfoWindow()
 {
     CustomProperties.Add(new ShowableProperty {
         Name = "Freeze-Zeit", PropertyName = "freezetime"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Geschwindigkeit in %", PropertyName = "freezepercentage"
     });
 }
Beispiel #10
0
 protected override void AddCustomPropertiesToInfoWindow()
 {
     CustomProperties.Add(new ShowableProperty {
         Name = "Kostenmultiplikator", PropertyName = "shotcostmultiplier"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Kosten pro Schuss", PropertyName = "costpershot", Hint = "Kosten pro Schuss: Multiplikator * Schaden"
     });
 }
Beispiel #11
0
        /// <summary>
        /// Classe astratta base che definisce un comando generico
        /// </summary>
        /// <param name="commandId">Valore guid che identifica univocamente il comando.
        /// Questo valore sarà la chiave dell’istanza del workflow che funegrà da CorrelationId per gli eventi del Service Bus.
        /// Diventerà ultile per determinare quali eventi sono associati a determinate istanze attive.</param>
        /// <param name="commandName">Nome interno del comando</param>
        /// <param name="tenantName">Nome del Tenant del Cliente. Contattare Dgroove per il valore</param>
        /// <param name="tenantId">Guid del Tenant del Cliente. Contattare Dgroove per il valore</param>
        /// <param name="tenantAOOId">Guid del TenantAOO del Cliente. Contattare Dgroove per il valore</param>
        /// <param name="identityContext">Classe che specifica l'Identità dell'utente che sta eseguento l'avvio del Workflow<see cref="IdentityContext"/></param>
        /// <param name="contentType">ContentType col modello di trasporto</param>
        public BaseCommand(Guid commandId, string commandName, string tenantName, Guid tenantId, Guid tenantAOOId, IdentityContext identityContext, TContentType contentType)
            : base(commandId, commandName, tenantName, tenantId, tenantAOOId, identityContext)
        {
            ContentType = contentType;

            if (contentType != null && contentType.Content != null)
            {
                CustomProperties.Add(DocSuiteCustomPropertyNames.CONTENT_TYPE, contentType.Content.GetType().Name);
            }
        }
        public SharpmakeUnitTestsProject()
            : base(generateXmlDoc: false)
        {
            Name = "Sharpmake.UnitTests";

            Services.Add("{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}"); // NUnit

            // indicates where to find the nuget(s) we reference without needing nuget.config or global setting
            CustomProperties.Add("RestoreAdditionalProjectSources", "https://api.nuget.org/v3/index.json");
        }
        public InvoicesSheet(IProgram program, IWorksheet worksheet)
        {
            this.program = (Program)program;
            this.Sheet   = worksheet;

            this.Controls = new Controls(worksheet);

            this.Binder             = new Binder(this.Sheet, Constants.ChangedStyle);
            this.Binder.ToDomained += this.Binder_ToDomained;

            this.Sheet.SheetActivated += this.Sheet_SheetActivated;

            // Save so we can re-instate it as an invoicesSheet on startup
            var customProperties = new CustomProperties();

            customProperties.Add(AppConstants.KeySheet, nameof(InvoicesSheet));
            customProperties.Add(AppConstants.KeyCreated, DateTime.Now);
            customProperties.Add(AppConstants.KeyCreatedBy, this.program.Services.Configuration["Username"]);
            this.Sheet.SetCustomProperties(customProperties);
        }
 /// <summary>
 ///     Sets the value of the specified custom property.
 /// </summary>
 private void SetCustomProperty(string propertyName, string value)
 {
     if (!CustomProperties.ContainsKey(propertyName))
     {
         CustomProperties.Add(propertyName, value);
     }
     else
     {
         CustomProperties[propertyName] = value;
     }
 }
Beispiel #15
0
 protected override void AddCustomPropertiesToInfoWindow()
 {
     CustomProperties.Add(new ShowableProperty {
         Name = "Geldzeit", PropertyName = "moneytime"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Geldplus", PropertyName = "moneyamount"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Geld/Sekunde", PropertyName = "moneypersecond"
     });
 }
Beispiel #16
0
 protected override void AddCustomPropertiesToInfoWindow()
 {
     CustomProperties.Add(new ShowableProperty {
         Name = "Gesundheitszeit", PropertyName = "healthtime"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Gesundheitsplus", PropertyName = "healthamount"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Gesundheit/Sekunde", PropertyName = "healthpersecond"
     });
 }
Beispiel #17
0
        public static void SetCustomProperty(CustomProperties customProperties, string property, object value)
        {
            foreach (CustomProperty customProperty in customProperties)
            {
                if (customProperty.Name == property)
                {
                    customProperty.set_Value(ref value);
                    return;
                }
            }

            customProperties.Add(property, ref value);
        }
            public override void PostResolve()
            {
                base.PostResolve();

                // retrieve the path of the csproj, could have changed from the default
                // note that we ensure that it is identical between confs
                string projectPath = Configurations.Select(conf => conf.ProjectPath).Distinct().Single();

                // we set this property to fix the nuget restore behavior which was different
                // between visual studio and command line, since this var was not initialized
                // at the same time, leading to the restore being done in different locations
                CustomProperties.Add("MSBuildProjectExtensionsPath", Util.PathGetRelative(projectPath, DefaultProjectPath));
            }
Beispiel #19
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 /// <param name="addToApsDict">If <b>true</b>, property will be added to the <i>aps</i> dictionary, otherwise to the root dictionary. Default: <b>false</b>.</param>
 /// <returns></returns>
 public ApplePush AddCustomProperty(string key, object value, bool addToApsDict = false)
 {
     if (addToApsDict)
     {
         CustomApsProperties ??= new Dictionary <string, object>();
         CustomApsProperties.Add(key, value);
     }
     else
     {
         CustomProperties ??= new Dictionary <string, object>();
         CustomProperties.Add(key, value);
     }
     return(this);
 }
        internal static void SetWorksheetProperty(Worksheet ws, string propertyName, string propertyValue)
        {
            ExcelUIThreadProtecter.CheckIsExcelUIMainThread();
            dynamic cp = GetWorksheetCusotmProperty(ws, propertyName);

            if (cp == null)
            {
                CustomProperties cps = ws.CustomProperties;
                cps.Add(propertyName, propertyValue);
            }
            else
            {
                cp.Value = propertyValue;
            }
        }
Beispiel #21
0
        public CommonProject()
            : base(typeof(DearTarget))
        {
            RootPath = ProjectRootPath;
            CustomProperties.Add("VcpkgEnabled", "false");

            AddTargets(new DearTarget(Platform.win64,
                                      TargetAPI.D3D12 |
                                      TargetAPI.D3D11 |
                                      TargetAPI.Vulkan |
                                      TargetAPI.OpenGL3 |
                                      TargetAPI.WGPU,
                                      Optimization.Debug | Optimization.Release,
                                      BuildType.APIOnly | BuildType.DemoOnly | BuildType.Full));
        }
Beispiel #22
0
 protected override void AddCustomPropertiesToInfoWindow()
 {
     CustomProperties.Add(new ShowableProperty {
         Name = "Vergiftungszeit", PropertyName = "poisontime", Hint = "Diese Zeit bleibt der Gegner vergiftet"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Giftschaden", PropertyName = "poisonamount", Hint = "Dieser Wert ist der Angriffswert des Giftes"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Gift-Intervall", PropertyName = "poisoncountertime", Hint = "Nach dieser Zeit (in Millisekunden)\ngreift das Gift den Gegner an"
     });
     CustomProperties.Add(new ShowableProperty {
         Name = "Gesamtschaden", PropertyName = "damageoverall", Hint = "Das ist der Schaden, der dem\nGegner insgesamt zugeführt wird."
     });
 }
        protected SampleProject()
            : base(excludeSharpmakeFiles: false, generateXmlDoc: false)
        {
            // samples are special, all the classes are here instead of in the subfolders
            SourceRootPath = @"[project.SharpmakeCsPath]\[project.Name]";
            SourceFilesExcludeRegex.Add(
                @"\\codebase\\",
                @"\\projects\\",
                @"\\reference\\"
                );

            DependenciesCopyLocal = DependenciesCopyLocalTypes.None;

            CustomProperties.Add("CopyLocalLockFileAssemblies", "false");
        }
Beispiel #24
0
            public FunctionalTestProject()
                : base(excludeSharpmakeFiles: false, generateXmlDoc: false)
            {
                // same a samples, tests are special, the class is here instead of in the subfolder
                SourceRootPath = @"[project.SharpmakeCsPath]\[project.Name]";
                SourceFilesExcludeRegex.Add(
                    @"\\codebase\\",
                    @"\\projects\\",
                    @"\\reference\\"
                    );

                DependenciesCopyLocal = DependenciesCopyLocalTypes.None;

                CustomProperties.Add("CopyLocalLockFileAssemblies", "false");

                AddTargets(Common.GetDefaultTargets());
            }
 public CustomProperty CreateCustomProperty()
 {
     if (base.CriGenerationPhase != CriGenerationPhases.Definition)
     {
         throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidOperation);
     }
     PrepareCustomProperties();
     Microsoft.ReportingServices.ReportIntermediateFormat.DataValue dataValue = new Microsoft.ReportingServices.ReportIntermediateFormat.DataValue();
     dataValue.Name  = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
     dataValue.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
     if (m_reportItemDef.CustomProperties == null)
     {
         m_reportItemDef.CustomProperties = new Microsoft.ReportingServices.ReportIntermediateFormat.DataValueList();
     }
     m_reportItemDef.CustomProperties.Add(dataValue);
     return(CustomProperties.Add(base.RenderingContext, dataValue.Name, dataValue.Value));
 }
Beispiel #26
0
        /// <inheritdoc/>
        void ISerializationCallbackReceiver.OnBeforeSerialize()
        {
            // Backward compatibility at runtime in case some custom properties have been added in code after first serialization
            ThemeDefinition defaultDefinition = GetDefaultThemeDefinition(ThemeType).Value;

            if (defaultDefinition.CustomProperties.Count > CustomProperties.Count)
            {
                foreach (ThemeProperty prop in defaultDefinition.CustomProperties)
                {
                    if (!CustomProperties.Exists(p => p.Name == prop.Name))
                    {
                        CustomProperties.Add(new ThemeProperty()
                        {
                            Name    = prop.Name,
                            Tooltip = prop.Tooltip,
                            Type    = prop.Type,
                            Value   = prop.Value,
                        });
                    }
                }
            }
        }
Beispiel #27
0
        public void CustomPropertySet(string devId, string key, string value)
        {
            bool found = false;

            for (int i = 0; i <= CustomProperties.Count - 1; i++)
            {
                if (CustomProperties[i].DeveloperId.Trim().ToLower() == devId.Trim().ToLower())
                {
                    if (CustomProperties[i].Key.Trim().ToLower() == key.Trim().ToLower())
                    {
                        CustomProperties[i].Value = value;
                        found = true;
                        break;
                    }
                }
            }

            if (found == false)
            {
                CustomProperties.Add(new CustomProperty(devId, key, value));
            }
        }
Beispiel #28
0
 private bool UpdateCustomProperty(CustomProperties customProperties, object hashKeyValue, string customItemKey)
 {
     if (_control.IgnoreMSDesignerInformation && customItemKey.IndexOf("MS_", StringComparison.OrdinalIgnoreCase) != -1)
     {
         if (string.Compare(customItemKey, "MS_Description", true) != 0)
         {
             return(false);
         }
     }
     if (customProperties.ContainsKey(customItemKey))
     {
         if (customProperties[customItemKey] == hashKeyValue)
         {
             return(false);
         }
         customProperties[customItemKey] = hashKeyValue;
     }
     else
     {
         customProperties.Add(customItemKey, hashKeyValue);
     }
     return(true);
 }
Beispiel #29
0
 void convertCustomProperties( SerializableDictionary old, CustomProperties @new )
 {
     old.ForEach(
         pair =>
             @new.Add(
                 pair.Key, new CustomProperty( pair.Value.name, pair.Value.value, pair.Value.type, pair.Value.description ) ) ) ;
 }
Beispiel #30
0
 //**********************************************************************
 // Sets the value of a custom property
 //**********************************************************************
 public static void SetCustomProperty(CustomProperties properties,
     String name,
     String value)
 {
     object oName = (object)name;
     try
     {
         // Try to retrieve and set the Property
         properties.get_Item(ref oName).Value = value;
     }
     catch
     {
         // An exception is found if the Property is not found
         properties.Add(name, value);
     }
 }
        /// <summary>
        ///     Allows you to populate the current line item object using a LineItemDTO instance
        /// </summary>
        /// <param name="dto">An instance of the line item from the REST API</param>
        public void FromDto(LineItemDTO dto)
        {
            if (dto == null)
            {
                return;
            }

            Id                   = dto.Id;
            StoreId              = dto.StoreId;
            LastUpdatedUtc       = dto.LastUpdatedUtc;
            BasePricePerItem     = dto.BasePricePerItem;
            LineTotal            = dto.LineTotal;
            AdjustedPricePerItem = dto.AdjustedPricePerItem;
            IsUserSuppliedPrice  = dto.IsUserSuppliedPrice;
            IsBundle             = dto.IsBundle;
            IsGiftCard           = dto.IsGiftCard;
            PromotionIds         = dto.PromotionIds;
            FreeQuantity         = dto.FreeQuantity;

            DiscountDetails.Clear();
            if (dto.DiscountDetails != null)
            {
                foreach (var detail in dto.DiscountDetails)
                {
                    var d = new DiscountDetail();
                    d.FromDto(detail);
                    DiscountDetails.Add(d);
                }
            }
            OrderBvin               = dto.OrderBvin ?? string.Empty;
            ProductId               = dto.ProductId ?? string.Empty;
            VariantId               = dto.VariantId ?? string.Empty;
            ProductName             = dto.ProductName ?? string.Empty;
            ProductSku              = dto.ProductSku ?? string.Empty;
            ProductShortDescription = dto.ProductShortDescription ?? string.Empty;
            Quantity         = dto.Quantity;
            QuantityReturned = dto.QuantityReturned;
            QuantityShipped  = dto.QuantityShipped;
            ShippingPortion  = dto.ShippingPortion;
            TaxRate          = dto.TaxRate;
            TaxPortion       = dto.TaxPortion;
            StatusCode       = dto.StatusCode ?? string.Empty;
            StatusName       = dto.StatusName ?? string.Empty;
            SelectionData.Clear();
            if (dto.SelectionData != null)
            {
                foreach (var op in dto.SelectionData)
                {
                    var o = new OptionSelection();
                    o.FromDto(op);
                    SelectionData.OptionSelectionList.Add(o);
                }
            }
            IsNonShipping         = dto.IsNonShipping;
            TaxSchedule           = dto.TaxSchedule;
            ProductShippingHeight = dto.ProductShippingHeight;
            ProductShippingLength = dto.ProductShippingLength;
            ProductShippingWeight = dto.ProductShippingWeight;
            ProductShippingWidth  = dto.ProductShippingWidth;
            CustomProperties.Clear();
            if (dto.CustomProperties != null)
            {
                foreach (var cpd in dto.CustomProperties)
                {
                    var prop = new CustomProperty();
                    prop.FromDto(cpd);
                    CustomProperties.Add(prop);
                }
            }
            ShipFromAddress.FromDto(dto.ShipFromAddress);
            ShipFromMode           = (ShippingMode)(int)dto.ShipFromMode;
            ShipFromNotificationId = dto.ShipFromNotificationId ?? string.Empty;
            ShipSeparately         = dto.ShipSeparately;
            ExtraShipCharge        = dto.ExtraShipCharge;
            ShippingCharge         = (ShippingChargeType)(int)dto.ShippingCharge;
        }
Beispiel #32
0
        void buttonOkClick(object sender, EventArgs e)
        {
            //todo: move to an action
            if (uiFirstItemCustomPropertyNameTextBox.Text == "")
            {
                MessageBox.Show(
                    @"Please specify a name for the Custom Property that is to be added to the first Item!",
                    @"Error",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error);

                return;
            }

            if (uiLinkSecondItemToFirstCheckbox.Checked && uiSecondItemCustomPropertyNameTextBox.Text == string.Empty)
            {
                MessageBox.Show(
                    @"Please specify a name for the Custom Property that is to be added to the second Item!",
                    @"Error",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error);

                return;
            }

            var model = ObjectFactory.GetInstance <IModel>();

            IEnumerable <ITreeItem> selectedEditors = model.Level.SelectedEditors.ToList(  );

            ITreeItem firstSelectedItem = selectedEditors.First();

            CustomProperties customPropertiesForFirstItem = firstSelectedItem.ItemProperties.CustomProperties;

            if (customPropertiesForFirstItem.ContainsKey(uiFirstItemCustomPropertyNameTextBox.Text))
            {
                MessageBox.Show(
                    "The first Item ({0}) already has a Custom Property named \"{1}\". Please use another name.".FormatWith(firstSelectedItem.ItemProperties.Name, uiFirstItemCustomPropertyNameTextBox.Text),
                    @"Error",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error);

                return;
            }

            var customProperty = new CustomProperty
            {
                Name = uiFirstItemCustomPropertyNameTextBox.Text,
                Type = typeof(ItemEditor)
            };

            ITreeItem secondSelectItem = selectedEditors.ElementAt(1);

            customProperty.Value = secondSelectItem;

            customPropertiesForFirstItem.Add(customProperty.Name, customProperty);

            if (uiLinkSecondItemToFirstCheckbox.Checked)
            {
                CustomProperties customPropertiesForSecondItem = secondSelectItem.ItemProperties.CustomProperties;

                if (customPropertiesForSecondItem.ContainsKey(uiSecondItemCustomPropertyNameTextBox.Text))
                {
                    MessageBox.Show(
                        "The second Item ({0}) already has a Custom Property named \"{1}\". Please use another name!".FormatWith(secondSelectItem.ItemProperties.Name, uiSecondItemCustomPropertyNameTextBox.Text),
                        "Error",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Information);

                    customPropertiesForFirstItem.Remove(customProperty.Name);

                    return;
                }

                customProperty = new CustomProperty
                {
                    Name  = uiSecondItemCustomPropertyNameTextBox.Text,
                    Type  = typeof(ItemEditor),
                    Value = firstSelectedItem
                };

                customPropertiesForSecondItem.Add(customProperty.Name, customProperty);
            }

            Hide();
        }