示例#1
0
        public MainWindow()
        {
            InitializeComponent();
            var fun = new CubicEase()
            {
                EasingMode = EasingMode.EaseInOut
            };

            _expandAnimation = new DoubleAnimation()
            {
                Duration = new Duration(TimeSpan.FromMilliseconds(200)), FillBehavior = FillBehavior.Stop, AccelerationRatio = 0.9
            };
            _collapseAnimation = new DoubleAnimation()
            {
                Duration = new Duration(TimeSpan.FromMilliseconds(200)), To = this.leftPanel.CollapsedWidth, AccelerationRatio = 0.9
            };
            _collapseAnimation.Completed += _collapseAnimation_Completed;
            _expandAnimation.Completed   += _expandAnimation_Completed;

            string file = AppDomain.CurrentDomain.BaseDirectory + @"config\FunctionConfig.xml";

            FunctionMgr.InitFunctionTree(file);
            var ids = new string[] { "01000000", "01010000", "01020000", "02000000", "02010000", "02020000", "02030000", "02030000", "03010000", "03020000", "03030000", "03000000" };

            FunctionMgr.EnableFunctions(ids);
        }
示例#2
0
        private void leftPanel_SelectedNewItem(object sender, RoutedPropertyChangedEventArgs <TreeViewItem> e)
        {
            TreeViewItem tv = e.NewValue;

            if (tv != null)
            {
                Uri uri;
                Uri.TryCreate(FunctionMgr.GetFunctionPageUri(tv), UriKind.Absolute, out uri);
                string name = FunctionMgr.GetFunctionName(tv);
                this.contentContainer.GoToPage(uri, name);
            }
        }