public void ShowLayoutOverlay(WiiKeyMapper keyMapper)
        {
            if (this.hidden)
            {
                this.keyMapper = keyMapper;
                this.keyMapper.SwitchToDefault();
                Dispatcher.BeginInvoke(new Action(delegate()
                {
                    this.baseGrid.Opacity                = 0.0;
                    this.baseGrid.Visibility             = Visibility.Visible;
                    this.layoutChooserOverlay.Visibility = Visibility.Visible;
                    this.Activate();

                    Color bordercolor            = CursorColor.getColor(keyMapper.WiimoteID);
                    bordercolor.ScA              = 0.5f;
                    this.titleBorder.BorderBrush = new SolidColorBrush(bordercolor);

                    this.title.Text = "Choose a layout for Wiimote " + keyMapper.WiimoteID;

                    this.layoutList.Children.Clear();
                    foreach (JObject config in this.keyMapper.GetLayoutList())
                    {
                        string name            = config.GetValue("Title").ToString();
                        string filename        = config.GetValue("Keymap").ToString();
                        LayoutSelectionRow row = new LayoutSelectionRow(name, filename, bordercolor);
                        row.OnClick           += Select_Layout;
                        this.layoutList.Children.Add(row);
                    }

                    DoubleAnimation animation = UIHelpers.createDoubleAnimation(1.0, 200, false);
                    animation.FillBehavior    = FillBehavior.HoldEnd;
                    animation.Completed      += delegate(object sender, EventArgs pEvent)
                    {
                    };
                    this.baseGrid.BeginAnimation(FrameworkElement.OpacityProperty, animation, HandoffBehavior.SnapshotAndReplace);

                    this.hidden = false;
                }), null);
            }
        }
Beispiel #2
0
 private void animateCollapse(FrameworkElement elem, bool remove)
 {
     UIHelpers.animateCollapse(elem, remove);
 }
Beispiel #3
0
 private void animateExpand(FrameworkElement elem)
 {
     UIHelpers.animateExpand(elem);
 }