Пример #1
0
        public Base(openHAB.Widget aWidget)
        {
            Widget = aWidget;
            Text = new SplitText
            {
                Text = aWidget.Label ?? string.Empty
            };

            Widget.Updated += OnUpdated;
        }
Пример #2
0
        public Base(openHAB.Widget aWidget)
        {
            Widget = aWidget;
            Text   = new SplitText
            {
                Text = aWidget.Label ?? string.Empty
            };

            Widget.Updated += OnUpdated;
        }
Пример #3
0
 public Text(openHAB.Widget aWidget)
     : base(aWidget)
 {
     if (aWidget.Item != null)
     {
         if (aWidget.Item.Type == openHAB.Item.ItemType.ContactItem)
         {
             Text = new SplitText(Colors.White, aWidget.Item.State == "OPEN" ? Colors.White : Color.FromArgb(255, 32, 32, 32))
             {
                 Text = aWidget.Label
             };
         }
     }
     ClickCommand = new Framework.DelegateCommand(OnClick);
 }
Пример #4
0
 public Text(openHAB.Widget aWidget)
     : base(aWidget)
 {
     if (aWidget.Item != null)
     {
         if (aWidget.Item.Type == openHAB.Item.ItemType.ContactItem)
         {
             Text = new SplitText(Colors.White, aWidget.Item.State == "OPEN" ? Colors.White : Color.FromArgb(255,32,32,32))
             {
                 Text = aWidget.Label
             };
         }
     }
     ClickCommand = new Framework.DelegateCommand(OnClick);
 }
Пример #5
0
        public override void OnItemChanged()
        {
            base.OnItemChanged();
            RaisePropertyChanged("ButtonVisibility");

            if (Widget.Item != null)
            {
                if (Widget.Item.Type == openHAB.Item.ItemType.ContactItem)
                {
                    Text = new SplitText(Colors.White, Widget.Item.State == "OPEN" ? Colors.White : Colors.Gray)
                    {
                        Text = Widget.Label
                    };

                    RaisePropertyChanged("Text");
                }
            }
        }
Пример #6
0
        public override void OnItemChanged()
        {
            base.OnItemChanged();
            RaisePropertyChanged("ButtonVisibility");

            if (Widget.Item != null)
            {
                if (Widget.Item.Type == openHAB.Item.ItemType.ContactItem)
                {
                    Text = new SplitText(Colors.White, Widget.Item.State == "OPEN" ? Colors.White : Colors.Gray)
                    {
                        Text = Widget.Label
                    };

                    RaisePropertyChanged("Text");
                }
            }
        }