-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Conditions] Universal conditions editor
- Loading branch information
Showing
67 changed files
with
1,622 additions
and
130 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
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
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,23 @@ | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Input; | ||
|
||
namespace WDE.Common.WPF.Components | ||
{ | ||
public class ParameterValueHolderView : Control | ||
{ | ||
public ICommand PickCommand | ||
{ | ||
get => (ICommand)GetValue(PickCommandProperty); | ||
set => SetValue(PickCommandProperty, value); | ||
} | ||
|
||
public static readonly DependencyProperty PickCommandProperty = | ||
DependencyProperty.Register("PickCommand", typeof(ICommand), typeof(ParameterValueHolderView)); | ||
|
||
static ParameterValueHolderView() | ||
{ | ||
DefaultStyleKeyProperty.OverrideMetadata(typeof(ParameterValueHolderView), new FrameworkPropertyMetadata(typeof(ParameterValueHolderView))); | ||
} | ||
} | ||
} |
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
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,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using WDE.Parameters; | ||
using WDE.Parameters.Models; | ||
|
||
namespace WDE.Common.WPF.Themes | ||
{ | ||
internal class ParameterDataTemplateSelector : DataTemplateSelector | ||
{ | ||
public DataTemplate? Generic { get; set; } | ||
public DataTemplate? BoolParameter { get; set; } | ||
|
||
public override DataTemplate SelectTemplate(object item, DependencyObject container) | ||
{ | ||
if (item is ParameterValueHolder<long> intParam && intParam.Parameter is BoolParameter boolParameter && BoolParameter != null) | ||
return BoolParameter; | ||
return Generic!; | ||
} | ||
} | ||
|
||
} |
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
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,9 @@ | ||
using WDE.Module; | ||
|
||
namespace WDE.Conditions.Avalonia | ||
{ | ||
public class ConditionsAvaloniaModule : ModuleBase | ||
{ | ||
|
||
} | ||
} |
Oops, something went wrong.