    

 ## On this page

  

 

 # Class Work

 Last update: 16.07.2025 

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

This class is to represent the work.

```csharp
public class Work : FileGroup<Work.WorkGroup, GroupItem>, IFileGroup, IWorkGroup

```

#### Inheritance

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

#### Implements

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

#### Inherited Members

[FileGroup&lt;Work.WorkGroup, GroupItem&gt;.Path](VM.Managed.DAFUL.Pre.FileGroup-2.md#VM_Managed_DAFUL_Pre_FileGroup_2_Path), [Group&lt;Work.WorkGroup, GroupItem&gt;.Initialize()](VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_Initialize), [Group&lt;Work.WorkGroup, GroupItem&gt;.Name](VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_Name), [Group&lt;Work.WorkGroup, GroupItem&gt;.SubGroups](VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_SubGroups), [Group&lt;Work.WorkGroup, 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

### Work()

Initializes a new instance of the  class.

```csharp
public Work()

```

### Work(string)

Initializes a new instance of the  class.

```csharp
public Work(string strFileName)

```

#### Parameters

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

Name of the file.

### Work(string, bool)

Initializes a new instance of the  class.

```csharp
public Work(string strFileName, bool IsSettingCurrent)

```

#### Parameters

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

Name of the file.

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

if set to `true` \[is setting current\].

## Properties

### CurrentWork

Gets or sets the current work.

```csharp
public static Work CurrentWork { get; }

```

#### Property Value

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

### CurrentWorkPath

Gets or sets the current work path.

```csharp
public static string CurrentWorkPath { get; set; }

```

#### Property Value

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

### SubModels

Gets or sets the sub models.

```csharp
public List<Model> SubModels { get; set; }

```

#### Property Value

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

## Methods

### AddModel(Model)

Adds the model in work.

```csharp
public bool AddModel(Model model)

```

#### Parameters

`model` [Model](VM.Managed.DAFUL.Pre.Model.md)

The new model.

#### Returns

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

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

### ClearCurrentWork()

Clear the current work.

```csharp
public static void ClearCurrentWork()

```

### GetActiveModel(string)

Gets the active model. If model has active item, it is active.

```csharp
public Model GetActiveModel(string strItemPath)

```

#### Parameters

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

The item path.

#### Returns

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

The active model.

### GetActiveModelFromDirectory(string)

Gets the active model from directory.

```csharp
public Model GetActiveModelFromDirectory(string strItemDirectory)

```

#### Parameters

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

The STR item directory.

#### Returns

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

### GetAllModels()

Gets all models.

```csharp
public List<Model> GetAllModels()

```

#### Returns

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

The Models

### GetModel(string)

Gets the model.

```csharp
public Model GetModel(string strModelName)

```

#### Parameters

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

Name of the model.

#### Returns

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

### GetModelNameList()

Gets the model name list.

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

```

#### 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 name of models.

### Initialize()

Initializes this instance.

```csharp
public override void Initialize()

```