當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。