Jump to content

midora

Members
  • Posts

    1,535
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by midora

  1. The new variant of the project file doesn't contain references to the files contained in the project folder. That's the main reason why the old one is much larger.

     

    My snippet doesn't contain references to all paint.net dlls. So you have to add the ones missing in your project (manually by editing the file or via right click to SolutionExplorer/dependencies).

     

    You should try to resolve all warnings (beside of this WindowsBase version conflict).

     

  2. 1 hour ago, Manc said:

    I don't know why it is effecting me and nobody else.

     

    Your are not the first one who has an additional folder in the Effects folder (i.e. to store unused plugins).

    The support of sub folders in Effects is a new feature in 4.3.  Every upgrade of paint.net will show you the duplicates. This will not change so you should try to solve it now.

    I would do the following.

     

    1) Open the Effects folder

    2) Select the 'View' tab at the top

    3) Click 'Options'->'Change folder and search options'

    4) Select the 'View' Tab in this dialog.

    5) Select 'Show hidden files and folder'

    6) Close the dialog with 'OK'

     

    Hidden folders are now visible in the Effects folder.

    Delete these folders. Probably the name is 'Effects'

     

    or if nothing works

     

    1) Rename the folder Effects to EffectsOld.

    2) Create a new folder Effects.

    3) Move all plugins from EffectsOld to Effects.

     

     

     

    • Like 1
  3. Never detected a possibility in VS2019 to switch forth and back from 4.7.2 (and lower) to 5 (and upper). So to I'm just replacing the content of the 4.7.2 project file with a 5 variant. 

     

    <Project Sdk="Microsoft.NET.Sdk">

      <PropertyGroup>
        <TargetFramework>net5.0-windows</TargetFramework>
        <UseWindowsForms>true</UseWindowsForms>
      </PropertyGroup>

      <ItemGroup>
        <Reference Include="PaintDotNet.Base">
          <HintPath>..\..\..\paint.net.portable\PaintDotNet.Base.dll</HintPath>
        </Reference>
        <Reference Include="PaintDotNet.Core">
          <HintPath>..\..\..\paint.net.portable\PaintDotNet.Core.dll</HintPath>
        </Reference>
        <Reference Include="PaintDotNet.Data">
          <HintPath>..\..\..\paint.net.portable\PaintDotNet.Data.dll</HintPath>
        </Reference>
      </ItemGroup>

    </Project>

     

    You have to adapt the paths to your paint.net 4.3 installation (absolute paths are ok) or remove them from the project file and add them again in the SolutionExplorer/dependencies/assemblies

    In the properties of the project you may select Resources and add a new one if you like to add an icon.

    • Like 1
  4. You just have to do it step by step.

     

    So first you should think about the readonly conditions:

     

                 Mode.Readonly = Gray

                 CustomColor.Readonly = Gray || (Mode != CustomColor)

     

    We can not handle '!=' as far as I know so just rewrite the condition

     

                 CustomColor.Readonly = Gray || (Mode == None) || (Mode == Primary) || (Mode == Secondary)

     

    Now create the rules

     

                List<PropertyCollectionRule> propRules = new List<PropertyCollectionRule>()
                {
                    new ReadOnlyBoundToBooleanRule(PropertyNames.Mode, PropertyNames.Gray, false),
                    new ReadOnlyBoundToNameValuesRule(PropertyNames.CustomColor, false, new TupleStruct<object, object>[] {
                            new TupleStruct<object, object>(PropertyNames.Gray, true),
                            new TupleStruct<object, object>(PropertyNames.Mode, ModeOptions.None),
                            new TupleStruct<object, object>(PropertyNames.Mode, ModeOptions.Primary),
                            new TupleStruct<object, object>(PropertyNames.Mode, ModeOptions.Secondary),
                    }),
                };

     

    or use the new syntax variant provided in 4.3.2

     

                List<PropertyCollectionRule> propRules = new List<PropertyCollectionRule>()
                {
                    new ReadOnlyBoundToBooleanRule(PropertyNames.Mode, PropertyNames.Gray, false),
                    new ReadOnlyBoundToNameValuesRule(PropertyNames.CustomColor, false,
                            (PropertyNames.Gray, true),
                            (PropertyNames.Mode, ModeOptions.None),
                            (PropertyNames.Mode, ModeOptions.Primary),
                            (PropertyNames.Mode, ModeOptions.Secondary)
                    ),
                };

     

    • Upvote 1
×
×
  • Create New...