    

 ## On this page

  

 

 # Class Model

 Last update: 16.07.2025 

Namespace: [VM.Managed.DAFUL.Pre](VM.Managed.DAFUL.Pre.md)  
Assembly: dfpredat.dll

This class is to represent model.

```csharp
public class Model : FileGroup<Model.ModelItemGroup, GroupItem>, IFileGroup

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [Group&lt;Model.ModelItemGroup, GroupItem&gt;](VM.Managed.DAFUL.Pre.Group-2.md) ← [FileGroup&lt;Model.ModelItemGroup, GroupItem&gt;](VM.Managed.DAFUL.Pre.FileGroup-2.md) ← [Model](VM.Managed.DAFUL.Pre.Model.md)

#### Implements

[IFileGroup](VM.Managed.DAFUL.Pre.IFileGroup.md)

#### Inherited Members

[FileGroup&lt;Model.ModelItemGroup, GroupItem&gt;.Path](VM.Managed.DAFUL.Pre.FileGroup-2.md#VM_Managed_DAFUL_Pre_FileGroup_2_Path), [Group&lt;Model.ModelItemGroup, GroupItem&gt;.Initialize()](VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_Initialize), [Group&lt;Model.ModelItemGroup, GroupItem&gt;.Name](VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_Name), [Group&lt;Model.ModelItemGroup, GroupItem&gt;.SubGroups](VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_SubGroups), [Group&lt;Model.ModelItemGroup, GroupItem&gt;.SubItems](VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_SubItems)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkedObjects&lt;T&gt;(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### Model()

Initializes a new instance of the  class.

```csharp
public Model()

```

## Properties

### DefaultDirectory

Gets the default directory.

```csharp
public static string DefaultDirectory { get; }

```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Toolkit

Gets or sets the toolkit.

```csharp
public string Toolkit { get; set; }

```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

### AddGroupItem(GroupItem)

Adds the group item.

```csharp
public bool AddGroupItem(GroupItem item)

```

#### Parameters

`item` [GroupItem](VM.Managed.DAFUL.Pre.GroupItem.md)

The item.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if success; otherwise, `false`.

### AddInsertedFile(string)

Adds the inserted file.

```csharp
public static void AddInsertedFile(string strFileName)

```

#### Parameters

`strFileName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of the STR file.

### ClearInsertedFiles()

Clears the inserted files.

```csharp
public static void ClearInsertedFiles()

```

### FindGroup(GroupItem, List&lt;ModelItemGroup&gt;)

Finds the group.

```csharp
public Model.ModelItemGroup FindGroup(GroupItem item, List<Model.ModelItemGroup> groups)

```

#### Parameters

`item` [GroupItem](VM.Managed.DAFUL.Pre.GroupItem.md)

The item.

`groups` [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)&lt;[Model](VM.Managed.DAFUL.Pre.Model.md).[ModelItemGroup](VM.Managed.DAFUL.Pre.Model.ModelItemGroup.md)&gt;

The groups.

#### Returns

[Model](VM.Managed.DAFUL.Pre.Model.md).[ModelItemGroup](VM.Managed.DAFUL.Pre.Model.ModelItemGroup.md)

### GetALLFilterList()

Gets the all the filter list.

```csharp
public List<string> GetALLFilterList()

```

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)&lt;[string](https://learn.microsoft.com/dotnet/api/system.string)&gt;

The filters.

### GetDefaultLocation(bool, bool)

Gets the recent directory.

```csharp
public static string GetDefaultLocation(bool bModel, bool bNew)

```

#### Parameters

`bModel` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

if set to `true` \[model\].

`bNew` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

if set to `true` \[new\].

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

`The name of recent directory` if success; otherwise, `null`.

### GetFilterName(string)

Gets the name of the filter.

```csharp
public string GetFilterName(string filter)

```

#### Parameters

`filter` [string](https://learn.microsoft.com/dotnet/api/system.string)

The filter.

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

The filter name.

### GetFullPath(string)

Gets the full path through relative path.

```csharp
public string GetFullPath(string strRefDir)

```

#### Parameters

`strRefDir` [string](https://learn.microsoft.com/dotnet/api/system.string)

The reference directory.

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

The full path.

### GetGroupItemList()

Gets the group item list.

```csharp
public List<GroupItem> GetGroupItemList()

```

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)&lt;[GroupItem](VM.Managed.DAFUL.Pre.GroupItem.md)&gt;

The group items.

### GetGroupItemList(string)

Gets the group item list.

```csharp
public List<GroupItem> GetGroupItemList(string filter)

```

#### Parameters

`filter` [string](https://learn.microsoft.com/dotnet/api/system.string)

The filter.

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)&lt;[GroupItem](VM.Managed.DAFUL.Pre.GroupItem.md)&gt;

The group items.

### GetInsertedFile()

Gets the inserted file.

```csharp
public static List<string> GetInsertedFile()

```

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)&lt;[string](https://learn.microsoft.com/dotnet/api/system.string)&gt;

### IsExistingItem(GroupItem)

Determines whether is existing item.

```csharp
public bool IsExistingItem(GroupItem groupItem)

```

#### Parameters

`groupItem` [GroupItem](VM.Managed.DAFUL.Pre.GroupItem.md)

The group item.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if is existing item; otherwise, `false`.

### IsExistingItem(string, string)

Determines whether is existing item.

```csharp
public bool IsExistingItem(string strRefDir, string strAbsolutePath)

```

#### Parameters

`strRefDir` [string](https://learn.microsoft.com/dotnet/api/system.string)

The reference directory.

`strAbsolutePath` [string](https://learn.microsoft.com/dotnet/api/system.string)

The absolute path.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if is existing item; otherwise, `false`.

### IsExistingItemFromDirectory(string, string)

Determines whether \[is existing item from directory\] \[the specified STR ref dir\].

```csharp
public bool IsExistingItemFromDirectory(string strRefDir, string strAbsoluteDirectory)

```

#### Parameters

`strRefDir` [string](https://learn.microsoft.com/dotnet/api/system.string)

The STR ref dir.

`strAbsoluteDirectory` [string](https://learn.microsoft.com/dotnet/api/system.string)

The STR absolute directory.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if \[is existing item from directory\] \[the specified STR ref dir\]; otherwise, `false`.

### IsExistingName(string)

Determines whether is existing name.

```csharp
public bool IsExistingName(string ItemName)

```

#### Parameters

`ItemName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of the item.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if is existing name; otherwise, `false`.

### SetDefaultLocation(string, bool, bool)

Sets the recent directory in registry.

```csharp
public static bool SetDefaultLocation(string strPath, bool bModel, bool bNew)

```

#### Parameters

`strPath` [string](https://learn.microsoft.com/dotnet/api/system.string)

The path of current work.

`bModel` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

if set to `true` \[model\].

`bNew` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

if set to `true` \[new\].

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if success; otherwise, `false`.