Catrobat.IDE.WindowsPhone.Controls.MultiModeEditorCommandBar.MultiModeEditorCommandBar C# (CSharp) Метод

MultiModeEditorCommandBar() публичный Метод

public MultiModeEditorCommandBar ( ) : System
Результат System
        public MultiModeEditorCommandBar()
        {
            this.RequestedTheme = ElementTheme.Dark;
            SolidColorBrush appBarBackgroundBrush = new SolidColorBrush();
            appBarBackgroundBrush.Color = Color.FromArgb(255, 25, 165, 184);
            this.Background = appBarBackgroundBrush;

            _playButton = new AppBarButton
            {
                Label = AppResourcesHelper.Get("Editor_ButtonPlayProgram"),
                Icon = new SymbolIcon(Symbol.Play)
            };

            _newButton = new AppBarButton
            {
                // Label will be chosen in UpdateAddText(...)
                Icon = new SymbolIcon(Symbol.Add)
            };

            _selectButton = new AppBarButton
            {
                Label = AppResourcesHelper.Get("Editor_ButtonSelect"),
                Icon = new SymbolIcon(Symbol.SelectAll)
            };

            _reorderButton = new AppBarButton
            {
                Label = AppResourcesHelper.Get("Editor_ButtonStartReordering"),
                //Icon = new SymbolIcon(Symbol.Bullets)
                //Icon = new SymbolIcon(Symbol.ShowResults)
                Icon = new SymbolIcon(Symbol.Sort)
            };

            _selectButton.Click += (sender, args) => 
                SetMode(MultiModeEditorCommandBarMode.Select);
            _reorderButton.Click += (sender, args) => 
                SetMode(MultiModeEditorCommandBarMode.Reorder);


            _finishedReorderingButton = new AppBarButton
            {
                Label = AppResourcesHelper.Get("Editor_ButtonFinishedReordering"),
                Icon = new SymbolIcon(Symbol.Accept)
            };

            _finishedReorderingButton.Click += (sender, args) =>
                SetMode(MultiModeEditorCommandBarMode.Normal);

            _deleteButton = new AppBarButton
            {
                Label = AppResourcesHelper.Get("Editor_ButtonDelete"),
                Icon = new SymbolIcon(Symbol.Delete)
            };
            //_deleteButton.Command = new RelayCommand(() =>
            //{
            //    SetMode(MultiModeEditorCommandBarMode.Normal);

            //    if (_deleteCommand != null)
            //        _deleteCommand.Execute(null);
            //});

            _copyButton = new AppBarButton
            {
                Label = AppResourcesHelper.Get("Editor_ButtonCopy"),
                Icon = new SymbolIcon(Symbol.Copy)
            };
            //_copyButton.Command = new RelayCommand(() =>
            //{
            //    SetMode(MultiModeEditorCommandBarMode.Normal);

            //    if (_copyCommand != null)
            //        _copyCommand.Execute(null);
            //});

            _cancelSelectionButton = new AppBarButton
            {
                Label = AppResourcesHelper.Get("Editor_ButtonClearSelection"),
                Icon = new SymbolIcon(Symbol.ClearSelection)
            };

            _cancelSelectionButton.Click += (sender, args) =>
                SetMode(MultiModeEditorCommandBarMode.Normal);


            SetMode(MultiModeEditorCommandBarMode.Normal);
        }