Example #1
0
 private void tab_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     switch (e.Property)
     {
         case "IsSelected":
             if ((bool)e.NewValue)
                 ProcessSelectedTab((Tab)sender);
             break;
     }
 }
        private void RadioButton_CheckedChanged(object sender, PropertyChangedEventArgs e)
        {
            if (ignore)
                return;

            RadioButton rb = (RadioButton)sender;
            for (int i = 0; i < Children.Count; i++)
                if (Children[i] == rb)
                {
                    SelectedIndex = i;
                    break;
                }
        }
Example #3
0
        private void OnIsEnabledOrVisibleChanged(object sender, PropertyChangedEventArgs e)
        {
            // The element with focus just became disabled or non-visible
            //
            // We can't leave focus on a disabled element, so move it.
            //
            // Will need to change this for watch, but this solution is for aux now.

            Focus(_focus.Parent);
        }
Example #4
0
 private void OnPropertyChanged(PropertyChangedEventArgs e)
 {
     if (PropertyChanged != null)
         PropertyChanged(this, e);
 }
Example #5
0
 protected void OnPropertyChanged(PropertyChangedEventArgs e)
 {
     if (PropertyChanged != null)
         PropertyChanged(this, e);
 }
Example #6
0
 private void Item_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (Modified != null)
         Modified(this, ModifiedAction.ItemChanged, sender as LayoutItem);
 }
Example #7
0
 //private void SDCard_Inserted_Removed(object sender, MediaEventArgs e)
 //{
 //    UpdateFileBrowser();
 //}
 private void Model_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     switch (e.Property)
     {
         case "IsPowerOn":
             btnPower.Foreground = new ImageBrush((bool)e.NewValue ? Program.ImagePowerOn : Program.ImagePowerOff);
             break;
         default: break;
     }
 }
Example #8
0
        private void Booster_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            MultiImage iconBoosterState = null;
            Label lblBoosterCurrent = null;
            Level lvlBoosterCurrent = null;
            if (sender == Model.MainBooster)
            {
                iconBoosterState = iconMainBooster1State;
                lblBoosterCurrent = lblMainBooster1Current;
                lvlBoosterCurrent = lvlMainBooster1Current;
            }
            else if (sender == Model.ProgBooster)
            {
                iconBoosterState = iconProgBoosterState;
                lblBoosterCurrent = lblProgBoosterCurrent;
                lvlBoosterCurrent = lvlProgBoosterCurrent;
            }

            switch (e.Property)
            {
                case "IsActive":
                    iconBoosterState.ActiveBrushID = (bool)e.NewValue ? "LedGreen" : "LedGray";
                    break;
                case "IsOverloaded":
                    if ((bool)e.NewValue)
                        iconBoosterState.ActiveBrushID = "LedRed";
                    break;
                case "Current":
                    int current = (int)e.NewValue;
                    //int percent = current * 100 / Model.Options.MainBridgeCurrentThreshould;

                    //lblBoosterCurrent.Text = current.ToString() + " mA";
                    //lvlBoosterCurrent.Value = percent;
                    break;
                default: break;
            }
        }