-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.5 Added support for multiple settings profiles
- Loading branch information
Showing
5 changed files
with
375 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Avalonia.Controls; | ||
|
||
namespace AntStats.Avalonia.Profile | ||
{ | ||
|
||
public class ProfileAvalonObj | ||
{ | ||
public Button minus = new Button(); | ||
|
||
public Button prof = new Button(); | ||
|
||
public DockPanel dockPanel = new DockPanel(); | ||
} | ||
|
||
public static class ProfilesAvaloniaObjList | ||
{ | ||
public static List<ProfileAvalonObj> ListProfilesuAvalonObjStats = new List<ProfileAvalonObj>(); | ||
|
||
public static List<ProfileAvalonObj> ListProfilesuAvalonObjSettings = new List<ProfileAvalonObj>(); | ||
} | ||
|
||
|
||
|
||
|
||
public static class ProfileManagement | ||
{ | ||
|
||
public static string GlobalSelectedProfile = default; | ||
|
||
public static void SelectProfile(List<ProfileAvalonObj>profileList,string profileName ) | ||
{ | ||
|
||
for (int i = 0; i < profileList.Count; i++) | ||
if ((string) profileList[i].prof.Content==profileName) | ||
{ | ||
for (int j = 0; j < profileList.Count; j++) | ||
{ | ||
profileList[j].prof.IsEnabled = true; | ||
} | ||
|
||
profileList[i].prof.IsEnabled = false; | ||
} | ||
|
||
GlobalSelectedProfile = profileName; | ||
|
||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.