Skip to content

Commit

Permalink
Grouping done
Browse files Browse the repository at this point in the history
  • Loading branch information
NizamLZ committed May 9, 2017
1 parent 7930756 commit a69d09a
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 85 deletions.
1 change: 1 addition & 0 deletions ANAConversationStudio/Models/Chat/BaseEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class BaseIdEntity : INotifyPropertyChanged
protected void OnPropertyChanged([CallerMemberName]string propertyName = null) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));

private string __id;
[ReadOnly(true)]
public string _id
{
get { return __id; }
Expand Down
134 changes: 77 additions & 57 deletions ANAConversationStudio/Models/Chat/Button.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;

namespace ANAConversationStudio.Models.Chat
{
[CategoryOrder("Important", 1)]
[CategoryOrder("For ButtonType Get[X]", 2)]
[CategoryOrder("Misc", 3)]
public class Button : BaseEntity
{
public Button() { }

#region Important
private ButtonTypeEnum _ButtonType = ButtonTypeEnum.NextNode;
[Category("Important")]
public ButtonTypeEnum ButtonType
Expand All @@ -21,160 +26,175 @@ public ButtonTypeEnum ButtonType
}
}

private string _DeepLinkUrl;
public string DeepLinkUrl
private string _NextNodeId;
[Category("Important")]
public string NextNodeId
{
get { return _DeepLinkUrl; }
get { return _NextNodeId; }
set
{
if (_DeepLinkUrl != value)
if (_NextNodeId != value)
{
_DeepLinkUrl = value;
_NextNodeId = value;
OnPropertyChanged();
}
}
}
#endregion

private string _Url;
public string Url
#region For ButtonType Get[X]
private string _PlaceholderText;
[Category("For ButtonType Get[X]")]
public string PlaceholderText
{
get { return _Url; }
get { return _PlaceholderText; }
set
{
if (_Url != value)
if (_PlaceholderText != value)
{
_Url = value;
_PlaceholderText = value;
OnPropertyChanged();
}
}
}

private int? _BounceTimeout;
public int? BounceTimeout
private string _VariableValue;
[Category("For ButtonType Get[X]")]
public string VariableValue
{
get { return _BounceTimeout; }
get { return _VariableValue; }
set
{
if (_BounceTimeout != value)
if (_VariableValue != value)
{
_BounceTimeout = value;
_VariableValue = value;
OnPropertyChanged();
}
}
}

private string _NextNodeId;
public string NextNodeId
private string _PrefixText;
[Category("For ButtonType Get[X]")]
public string PrefixText
{
get { return _NextNodeId; }
get { return _PrefixText; }
set
{
if (_NextNodeId != value)
if (_PrefixText != value)
{
_NextNodeId = value;
_PrefixText = value;
OnPropertyChanged();
}
}
}

private bool _DefaultButton;
public bool DefaultButton
private string _PostfixText;
[Category("For ButtonType Get[X]")]
public string PostfixText
{
get { return _DefaultButton; }
get { return _PostfixText; }
set
{
if (_DefaultButton != value)
if (_PostfixText != value)
{
_DefaultButton = value;
_PostfixText = value;
OnPropertyChanged();
}
}
}

private bool _Hidden;
public bool Hidden
private bool _ConfirmInput;
[Category("For ButtonType Get[X]")]
public bool ConfirmInput
{
get { return _Hidden; }
get { return _ConfirmInput; }
set
{
if (_Hidden != value)
if (_ConfirmInput != value)
{
_Hidden = value;
_ConfirmInput = value;
OnPropertyChanged();
}
}
}
#endregion

private string _VariableValue;
public string VariableValue
#region Misc
private string _DeepLinkUrl;
[Category("Misc")]
public string DeepLinkUrl
{
get { return _VariableValue; }
get { return _DeepLinkUrl; }
set
{
if (_VariableValue != value)
if (_DeepLinkUrl != value)
{
_VariableValue = value;
_DeepLinkUrl = value;
OnPropertyChanged();
}
}
}

private string _PrefixText;
public string PrefixText
private string _Url;
[Category("Misc")]
public string Url
{
get { return _PrefixText; }
get { return _Url; }
set
{
if (_PrefixText != value)
if (_Url != value)
{
_PrefixText = value;
_Url = value;
OnPropertyChanged();
}
}
}

private string _PostfixText;
public string PostfixText
private int? _BounceTimeout;
[Category("Misc")]
public int? BounceTimeout
{
get { return _PostfixText; }
get { return _BounceTimeout; }
set
{
if (_PostfixText != value)
if (_BounceTimeout != value)
{
_PostfixText = value;
_BounceTimeout = value;
OnPropertyChanged();
}
}
}

private string _PlaceholderText;
[Category("Important")]
public string PlaceholderText
private bool _DefaultButton;
[Category("Misc")]
public bool DefaultButton
{
get { return _PlaceholderText; }
get { return _DefaultButton; }
set
{
if (_PlaceholderText != value)
if (_DefaultButton != value)
{
_PlaceholderText = value;
_DefaultButton = value;
OnPropertyChanged();
}
}
}

private bool _ConfirmInput;
public bool ConfirmInput
private bool _Hidden;
[Category("Misc")]
public bool Hidden
{
get { return _ConfirmInput; }
get { return _Hidden; }
set
{
if (_ConfirmInput != value)
if (_Hidden != value)
{
_ConfirmInput = value;
_Hidden = value;
OnPropertyChanged();
}
}
}
}
#endregion

public override string ToString()
{
Expand Down
Loading

0 comments on commit a69d09a

Please sign in to comment.