当前位置: 首页>>代码示例>>C#>>正文


C# Primitives.StatusBar类代码示例

本文整理汇总了C#中System.Windows.Controls.Primitives.StatusBar的典型用法代码示例。如果您正苦于以下问题:C# StatusBar类的具体用法?C# StatusBar怎么用?C# StatusBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


StatusBar类属于System.Windows.Controls.Primitives命名空间,在下文中一共展示了StatusBar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: VSInteractiveWindowControl

        /// <summary>
        /// Initializes a new instance of the <see cref="VSInteractiveWindowControl"/> class.
        /// </summary>
        public VSInteractiveWindowControl()
        {
            this.InitializeComponent();

            // Set window look
            Background = ExecutingBackground;

            // Add dock panel and status bar
            DockPanel dockPanel = new DockPanel();
            StatusBar statusBar = new StatusBar();
            statusBarStatusText = new StatusBarItem();
            statusBarStatusText.Content = InitializingStatusText;
            statusBar.Items.Add(statusBarStatusText);
            DockPanel.SetDock(statusBar, Dock.Bottom);
            dockPanel.Children.Add(statusBar);
            Content = dockPanel;

            // Add results panel
            ScrollViewer scrollViewer = new ScrollViewer();
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            scrollViewer.Margin = new Thickness(5);
            dockPanel.Children.Add(scrollViewer);
            resultsPanel = new StackPanel();
            resultsPanel.Orientation = Orientation.Vertical;
            resultsPanel.CanVerticallyScroll = true;
            resultsPanel.CanHorizontallyScroll = true;
            scrollViewer.Content = resultsPanel;

            // Add prompt for text editor
            var panel = new DockPanel();
            resultsPanel.Children.Add(panel);

            promptBlock = new TextBlock();
            promptBlock.FontFamily = new FontFamily("Consolas");
            promptBlock.FontSize = 14;
            promptBlock.Text = ExecutingPrompt;
            DockPanel.SetDock(promptBlock, Dock.Left);
            panel.Children.Add(promptBlock);

            // Add text editor
            textEditor = new InteractiveCodeEditor();
            textEditor.Background = Brushes.Transparent;
            textEditor.CommandExecuted += TextEditor_CommandExecuted;
            textEditor.CommandFailed += TextEditor_CommandFailed;
            textEditor.Executing += TextEditor_Executing;
            textEditor.CloseRequested += TextEditor_CloseRequested;
            textEditor.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
            textEditor.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
            textEditor.TextArea.PreviewKeyDown += TextEditor_PreviewKeyDown;
            panel.Children.Add(textEditor);

            MakeEnabled(VSContext.CurrentDebugMode == EnvDTE.dbgDebugMode.dbgBreakMode);
            VSContext.DebuggerEnteredBreakMode += () => MakeEnabled(true);
            VSContext.DebuggerEnteredDesignMode += () => MakeEnabled(false);
            VSContext.DebuggerEnteredRunMode += () => MakeEnabled(false);
        }
开发者ID:southpolenator,项目名称:WinDbgCs,代码行数:60,代码来源:VSInteractiveWindowControl.xaml.cs

示例2: InteractiveWindow

        /// <summary>
        /// Initializes a new instance of the <see cref="InteractiveWindow"/> class.
        /// </summary>
        public InteractiveWindow()
        {
            // Set window look
            Background = ExecutingBackground;
            ShowInTaskbar = false;
            Title = "C# Interactive Window";

            // Add dock panel and status bar
            DockPanel dockPanel = new DockPanel();
            StatusBar statusBar = new StatusBar();
            statusBarStatusText = new StatusBarItem();
            statusBarStatusText.Content = InitializingStatusText;
            statusBar.Items.Add(statusBarStatusText);
            DockPanel.SetDock(statusBar, Dock.Bottom);
            dockPanel.Children.Add(statusBar);
            Content = dockPanel;

            // Add results panel
            ScrollViewer scrollViewer = new ScrollViewer();
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            scrollViewer.Margin = new Thickness(5);
            dockPanel.Children.Add(scrollViewer);
            resultsPanel = new StackPanel();
            resultsPanel.Orientation = Orientation.Vertical;
            resultsPanel.CanVerticallyScroll = true;
            resultsPanel.CanHorizontallyScroll = true;
            scrollViewer.Content = resultsPanel;

            // Add prompt for text editor
            var panel = new DockPanel();
            resultsPanel.Children.Add(panel);

            promptBlock = new TextBlock();
            promptBlock.FontFamily = new FontFamily("Consolas");
            promptBlock.FontSize = 14;
            promptBlock.Text = ExecutingPrompt;
            DockPanel.SetDock(promptBlock, Dock.Left);
            panel.Children.Add(promptBlock);

            // Add text editor
            textEditor = new InteractiveCodeEditor();
            textEditor.Background = Brushes.Transparent;
            textEditor.CommandExecuted += TextEditor_CommandExecuted;
            textEditor.CommandFailed += TextEditor_CommandFailed;
            textEditor.Executing += TextEditor_Executing;
            textEditor.CloseRequested += TextEditor_CloseRequested;
            textEditor.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
            textEditor.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
            textEditor.TextArea.PreviewKeyDown += TextEditor_PreviewKeyDown;
            panel.Children.Add(textEditor);
        }
开发者ID:southpolenator,项目名称:WinDbgCs,代码行数:55,代码来源:InteractiveWindow.cs

示例3: MeetTheDockers

        public MeetTheDockers()
        {
            Title = "Meet the Dockers";

            DockPanel dock = new DockPanel();
            Content = dock;

            // Create menu.
            Menu menu = new Menu();
            MenuItem item = new MenuItem();
            item.Header = "Menu";
            menu.Items.Add(item);

            // Dock menu at top of panel.
            DockPanel.SetDock(menu, Dock.Top);
            dock.Children.Add(menu);

            // Create tool bar.
            ToolBar tool = new ToolBar();
            tool.Header = "Toolbar";

            // Dock tool bar at top of panel.
            DockPanel.SetDock(tool, Dock.Top);
            dock.Children.Add(tool);

            // Create status bar.
            StatusBar status = new StatusBar();
            StatusBarItem statitem = new StatusBarItem();
            statitem.Content = "Status";
            status.Items.Add(statitem);

            // Dock status bar at bottom of panel.
            DockPanel.SetDock(status, Dock.Bottom);
            dock.Children.Add(status);

            // Create list box.
            ListBox lstbox = new ListBox();
            lstbox.Items.Add("List Box Item");

            // Dock list box at left of panel.
            DockPanel.SetDock(lstbox, Dock.Left);
            dock.Children.Add(lstbox);

            // Create text box.
            TextBox txtbox = new TextBox();
            txtbox.AcceptsReturn = true;

            // Add text box to panel & give it input focus.
            dock.Children.Add(txtbox);
            txtbox.Focus();
        }
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:51,代码来源:MeetTheDockers.cs

示例4: SetRichTextBox

        public static void SetRichTextBox(RichTextBox rtb, StatusBar block = null)
        {
            rtb.IsReadOnly = true;

            foreach (IAppender appender in
                GetAppenders())
            {
                var richTextBoxAppender = appender as RichTextBoxAppender;
                if (richTextBoxAppender != null)
                {
                    richTextBoxAppender.RichTextBox = rtb;
                    richTextBoxAppender.statusBar = block;
                }
            }
        }
开发者ID:CHERRISHGRY,项目名称:Hawk,代码行数:15,代码来源:RichTextboxAppender.cs

示例5: AddStatusBar

        void AddStatusBar(DockPanel dock)
        {
            StatusBar status = new StatusBar();
            dock.Children.Add(status);
            DockPanel.SetDock(status, Dock.Bottom);

            itemDateTime = new StatusBarItem();
            itemDateTime.HorizontalAlignment = HorizontalAlignment.Right;
            status.Items.Add(itemDateTime);

            DispatcherTimer tmr = new DispatcherTimer();
            tmr.Interval = TimeSpan.FromSeconds(1);
            tmr.Tick += TimerOnTick;
            tmr.Start();
        }
开发者ID:JianchengZh,项目名称:kasicass,代码行数:15,代码来源:FormatRichText.Status.cs

示例6: WindowManager

        public WindowManager( RibbonBarPanel rib, StatusBar stat, DockPanel dock, DockingManager dockingManager )
        {
            RibbonBar = rib;
            StatusBar = stat;
            DockWindow = dock;
            DockingManager = dockingManager;
            //TabControl = tab;

            // TODO
            //var ribbonTab = new RibbonTabItem();
            //ribbonTab.Header = "ahoj";

            //var ribGroup = new RibbonGroup();
            //ribGroup.Caption = "Preprocessing";
            //ribbonTab.RibbonGroups.Add(ribGroup);

            //FIXME RibbonBar.Tabs.Add(ribbonTab);

            //var temp = new TabItem();
            //temp.Header = "Pokus";
            //var tabItems = TabControl.Items;

            // TODO: refactor -> RenderWindow
            //var wfh = new WindowsFormsHost();

            //RayCaster rc = new RayCaster();

            //OpenGLWindow glWindow = new OpenGLWindow();
            //glWindow.setRenderingMethod( rc );
            //lstGlWindows.Add( glWindow );

            //wfh.Child = lstGlWindows[ 0 ];

            //temp.Content = wfh;

            //TabControl.Items.Add( temp );
        }
开发者ID:msup,项目名称:RayEngine,代码行数:37,代码来源:WindowManager.cs

示例7: switch


//.........这里部分代码省略.........
     
     #line 276 "..\..\..\MainWindow.xaml"
     this.artistDown.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.artistDown_TouchUp);
     
     #line default
     #line hidden
     
     #line 276 "..\..\..\MainWindow.xaml"
     this.artistDown.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.artistDown_TouchDown);
     
     #line default
     #line hidden
     return;
     case 8:
     this.trackUp = ((System.Windows.Shapes.Polygon)(target));
     
     #line 293 "..\..\..\MainWindow.xaml"
     this.trackUp.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.trackUp_TouchDown);
     
     #line default
     #line hidden
     
     #line 293 "..\..\..\MainWindow.xaml"
     this.trackUp.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.trackUp_TouchUp);
     
     #line default
     #line hidden
     return;
     case 9:
     this.listBoxTrack = ((System.Windows.Controls.ListBox)(target));
     
     #line 309 "..\..\..\MainWindow.xaml"
     this.listBoxTrack.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.listBoxTrack_TouchDown);
     
     #line default
     #line hidden
     return;
     case 10:
     this.trackDown = ((System.Windows.Shapes.Polygon)(target));
     
     #line 313 "..\..\..\MainWindow.xaml"
     this.trackDown.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.trackDown_TouchDown);
     
     #line default
     #line hidden
     
     #line 313 "..\..\..\MainWindow.xaml"
     this.trackDown.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.trackDown_TouchUp);
     
     #line default
     #line hidden
     return;
     case 11:
     this.gridOptions = ((System.Windows.Controls.Grid)(target));
     return;
     case 12:
     this.imageArtist = ((System.Windows.Controls.Image)(target));
     return;
     case 13:
     this.listBoxReproduction = ((System.Windows.Controls.ListView)(target));
     return;
     case 14:
     this.mediaElement = ((System.Windows.Controls.MediaElement)(target));
     
     #line 350 "..\..\..\MainWindow.xaml"
     this.mediaElement.MediaFailed += new System.EventHandler<System.Windows.ExceptionRoutedEventArgs>(this.mediaElement_MediaFailed);
     
     #line default
     #line hidden
     return;
     case 15:
     this.labelMoney = ((System.Windows.Controls.Label)(target));
     return;
     case 16:
     this.textBlockMoney = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 17:
     this.textBlockReference = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 18:
     this.canMain = ((System.Windows.Controls.Canvas)(target));
     return;
     case 19:
     this.tbmarquee = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 20:
     this.sbar = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     case 21:
     this.progressBar1 = ((System.Windows.Controls.ProgressBar)(target));
     return;
     case 22:
     this.storyBoard = ((System.Windows.Media.Animation.Storyboard)(target));
     return;
     case 23:
     this.dAmElementBs = ((System.Windows.Media.Animation.DoubleAnimation)(target));
     return;
     }
     this._contentLoaded = true;
 }
开发者ID:oisbel,项目名称:Vitrola,代码行数:101,代码来源:MainWindow.g.cs

示例8: AppStatusBar

		public AppStatusBar() {
			statusBar = new StatusBar { Visibility = Visibility.Collapsed };
			textBlock = new TextBlock();
			statusBar.Items.Add(new StatusBarItem { Content = textBlock });
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:5,代码来源:AppStatusBar.cs

示例9: switch

 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Button_turnon = ((ArduinoCommunication.MainWindow)(target));
     return;
     case 2:
     this.Grid_parent = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.Button_Close = ((System.Windows.Controls.Button)(target));
     return;
     case 4:
     this.StatusBar_mystatus = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     case 5:
     this.TextBlock_StatusCaption = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 6:
     this.Menu_MyMenu = ((System.Windows.Controls.Menu)(target));
     return;
     case 7:
     this.MenuItem1 = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 8:
     
     #line 29 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Close_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.MenuItem2 = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 10:
     this.Slider_Deg1 = ((System.Windows.Controls.Slider)(target));
     
     #line 40 "..\..\MainWindow.xaml"
     this.Slider_Deg1.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.Slider_Deg1_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 11:
     this.Textbox_test = ((System.Windows.Controls.TextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
开发者ID:mahoo168,项目名称:CIPCSystem,代码行数:50,代码来源:MainWindow.g.i.cs

示例10: switch

 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Mouse = ((KControls.KMouse)(target));
     return;
     case 2:
     this.Controles = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     case 3:
     this.VP_HB_Pincel = ((KControls.KHoverButton)(target));
     
     #line 9 "..\..\..\Paint.xaml"
     this.VP_HB_Pincel.Click += new KControls.KHoverButton.ClickHandler(this.Pincel_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.Dibujo = ((System.Windows.Controls.InkCanvas)(target));
     return;
     }
     this._contentLoaded = true;
 }
开发者ID:delebrindel,项目名称:Kino,代码行数:24,代码来源:Paint.g.i.cs

示例11: switch

 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 6 "..\..\MainWindow.xaml"
     ((Microsoft.Samples.Kinect.SkeletonBasics.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded);
     
     #line default
     #line hidden
     
     #line 6 "..\..\MainWindow.xaml"
     ((Microsoft.Samples.Kinect.SkeletonBasics.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.layoutGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.Image = ((System.Windows.Controls.Image)(target));
     return;
     case 4:
     this.button = ((System.Windows.Controls.Button)(target));
     
     #line 53 "..\..\MainWindow.xaml"
     this.button.Click += new System.Windows.RoutedEventHandler(this.button_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.dogebutton = ((System.Windows.Controls.Button)(target));
     
     #line 54 "..\..\MainWindow.xaml"
     this.dogebutton.Click += new System.Windows.RoutedEventHandler(this.dogebutton_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.centerbutton = ((System.Windows.Controls.Button)(target));
     
     #line 55 "..\..\MainWindow.xaml"
     this.centerbutton.Click += new System.Windows.RoutedEventHandler(this.centerbutton_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.statusBar = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     case 8:
     this.infoImage = ((System.Windows.Controls.Image)(target));
     return;
     case 9:
     
     #line 60 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.setMountain);
     
     #line default
     #line hidden
     return;
     case 10:
     
     #line 61 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.setTree);
     
     #line default
     #line hidden
     return;
     case 11:
     
     #line 62 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.setSalute);
     
     #line default
     #line hidden
     return;
     case 12:
     
     #line 63 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.setWarrior);
     
     #line default
     #line hidden
     return;
     case 13:
     
     #line 64 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.setReverse);
     
     #line default
     #line hidden
     return;
     case 14:
     
     #line 65 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.setFlower);
//.........这里部分代码省略.........
开发者ID:qingswu,项目名称:Kinect-With-Yoga,代码行数:101,代码来源:MainWindow.g.i.cs

示例12: TotalCount

 // Set the total counts in the total coutns portion of the status bar
 public static void TotalCount(StatusBar statusBar, int totalCount)
 {
     StatusBarItem item = (StatusBarItem)statusBar.Items[3];
     item.Content = totalCount.ToString();
 }
开发者ID:saulgreenberg,项目名称:Timelapse,代码行数:6,代码来源:StatusBarUpdates.cs

示例13: switch

 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 12 "..\..\ModelTransform.xaml"
     ((Battlehack.ModelTransform)(target)).Loaded += new System.Windows.RoutedEventHandler(this.ModelTransformLoaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.layoutGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.sensorChooserUi = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
     return;
     case 4:
     this.EntireGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 5:
     this.SmsText = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 6:
     this.Backdrop = ((System.Windows.Controls.Image)(target));
     return;
     case 7:
     this.Macklemore = ((System.Windows.Controls.Image)(target));
     return;
     case 8:
     this.SpaceNeedle = ((System.Windows.Controls.Image)(target));
     return;
     case 9:
     this.MaskedColor = ((System.Windows.Controls.Image)(target));
     return;
     case 10:
     this.MaskedColor2 = ((System.Windows.Controls.Image)(target));
     return;
     case 11:
     this.MaskedColor3 = ((System.Windows.Controls.Image)(target));
     return;
     case 12:
     this.view1 = ((HelixToolkit.Wpf.HelixViewport3D)(target));
     return;
     case 13:
     this.Dress = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 14:
     this.buttonScreenshot = ((System.Windows.Controls.Button)(target));
     
     #line 148 "..\..\ModelTransform.xaml"
     this.buttonScreenshot.Click += new System.Windows.RoutedEventHandler(this.ButtonScreenshotClick);
     
     #line default
     #line hidden
     return;
     case 15:
     this.statusBar = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     }
     this._contentLoaded = true;
 }
开发者ID:justinzw,项目名称:seattle,代码行数:62,代码来源:ModelTransform.g.cs

示例14: CurrentImageNumber

 // Set the total counts in the total coutns portion of the status bar
 public static void CurrentImageNumber(StatusBar statusBar, int imageNumber)
 {
     StatusBarItem item = (StatusBarItem)statusBar.Items[1];
     item.Content = imageNumber.ToString();
 }
开发者ID:saulgreenberg,项目名称:Timelapse,代码行数:6,代码来源:StatusBarUpdates.cs

示例15: Message

 //Display a message in the message portion of the status bar
 public static void Message(StatusBar statusBar, string message)
 {
     StatusBarItem item = (StatusBarItem) statusBar.Items[5];
     item.Content = message;
 }
开发者ID:saulgreenberg,项目名称:Timelapse,代码行数:6,代码来源:StatusBarUpdates.cs


注:本文中的System.Windows.Controls.Primitives.StatusBar类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。