Exemplo n.º 1
0
        public SdStatusBar(IStatusBarService manager)
        {
            Spacing = 3;
            BorderWidth = 1;

            progress = new ProgressBar ();
            this.PackStart (progress, false, false, 0);

            this.PackStart (txtStatusBarPanel, true, true, 0);
            statusBox = new HBox ();
            statusLabel = new Label ();
            statusLabel.SetAlignment (0, 0.5f);
            statusLabel.Wrap = false;
            statusBox.PackEnd (statusLabel, true, true, 0);
            txtStatusBarPanel.Add (statusBox);

            this.PackStart (cursorStatusBarPanel, false, false, 0);
            cursorLabel = new Label ("  ");
            cursorStatusBarPanel.Add (cursorLabel);

            this.PackStart (modeStatusBarPanel, false, false, 0);
            modeLabel = new Label ("  ");
            modeStatusBarPanel.Add (modeLabel);

            this.PackStart (iconsStatusBarPanel, false, false, 0);
            txtStatusBarPanel.ShowAll ();

            Progress.Hide ();
            Progress.PulseStep = 0.3;
        }
Exemplo n.º 2
0
		public SdStatusBar(IStatusBarService manager)
		{
			txtStatusBarPanel.Width = 500;
			txtStatusBarPanel.AutoSize = StatusBarPanelAutoSize.Spring;
			this.Panels.Add(txtStatusBarPanel);//在状态栏中添加显示内容的一个面板.
			
			statusProgressBar.Width  = 200;
			statusProgressBar.Height = 14;
			statusProgressBar.Location = new Point(160, 4);
			statusProgressBar.Minimum = 0;
			statusProgressBar.Visible = false;
			Controls.Add(statusProgressBar);//在状态栏中添加显示进度的一个面板.
			
			cursorStatusBarPanel.Width = 150;
			cursorStatusBarPanel.AutoSize = StatusBarPanelAutoSize.None;
			cursorStatusBarPanel.Alignment = HorizontalAlignment.Left;
			Panels.Add(cursorStatusBarPanel);//在状态栏中添加显示光标位置的一个面板.
				
			modeStatusBarPanel.Width = 35;
			modeStatusBarPanel.AutoSize = StatusBarPanelAutoSize.None;
			modeStatusBarPanel.Alignment = HorizontalAlignment.Right;
			Panels.Add(modeStatusBarPanel);//在状态栏中添加显示模式的一个面板.
			
			this.ShowPanels = true;
		}
        public UIBuildFeedbackSink(IOutputCategory messageView, IStatusBarService statusBarService)
        {
            Debug.Assert(messageView != null);
            Debug.Assert(statusBarService != null);

            this.messageView = messageView;
            this.statusBarService = statusBarService;
        }
Exemplo n.º 4
0
        public LoadedPageInteractor(IServiceProvider services) : base(services)
        {
            decompilerSvc = services.RequireService<IDecompilerService>();
            sbSvc = services.RequireService<IStatusBarService>();
            memSvc = services.RequireService<ILowLevelViewService>();

            mpCmdidToCommand = new Dictionary<int, MenuCommand>();
            AddCommand(new CommandID(CmdSets.GuidReko, CmdIds.ViewShowAllFragments));
            AddCommand(new CommandID(CmdSets.GuidReko, CmdIds.ViewShowUnscanned));
        }
Exemplo n.º 5
0
 public ExportPrediction(ControllerMgr predictionGroupsManager, IApplicationContext appContext, TreeNode rootnode, string basicStudyName)
 {
     this.m_ControllerMgr = predictionGroupsManager;
     this.m_appContext = appContext;
     this.m_IProjectManager = ServiceHelper.Lookup<IProjectManager>(appContext);
     this.m_geoProvider = ServiceHelper.Lookup<IGeoProvider>(appContext);
     this.m_Tranceiverlist = ServiceHelper.Lookup<IPrediction>(appContext).TranceiverList;
     this.m_StatusBarService = ServiceHelper.Lookup<IStatusBarService>(appContext);
     this.m_rootnode = rootnode;
     this.m_BasicStudyName = basicStudyName;
 }
		public TestExecutionManager()
		{
			this.buildService = SD.BuildService;
			this.taskService = new UnitTestTaskService();
			this.saveAllFilesCommand = new UnitTestSaveAllFilesCommand();
			this.testService = SD.GetRequiredService<ITestService>();
			this.workbench = SD.Workbench;
			this.statusBarService = SD.StatusBar;
			this.mainThread = SD.MainThread;
			this.buildOptions = new UnitTestBuildOptions();
		}
        protected GitStatusBarManager(Guid commandSetGuid, int branchMenuCmId, int branchCommandMenuCmId, int repositoryCommandMenuCmId,  IServiceContainer serviceProvider, IStatusBarService statusBarService)
        {
            BranchMenuCmId = branchMenuCmId;
            BranchCommandMenuCmId = branchCommandMenuCmId;
            RepositoryCommandMenuCmId = repositoryCommandMenuCmId;
            StatusBarService = statusBarService;
            CommandSetGuid = commandSetGuid;
            _menuCommandService = serviceProvider.GetService(typeof(IMenuCommandService)) as MsVsShell.OleMenuCommandService;
            _serviceProvider = serviceProvider;
            _branchCommandMenuCommands = new List<Tuple<string, MenuCommand>>();

        }
Exemplo n.º 8
0
        public PacksDetailViewPageViewModel(INavigationService navigationService,
                                            IBarcodeReaderService barcodeReaderService,
                                            IStatusBarService statusBarService,
                                            INotificationService notificationService,
                                            IPopupNavigation popupNavigation,
                                            IBillOfLadingService billOfLadingService,
                                            IWifiService wifiService)
            : base(navigationService, barcodeReaderService, statusBarService)
        {
            _notificationService = notificationService;
            _popupNavigation     = popupNavigation;
            _billOfLadingService = billOfLadingService;
            _wifiService         = wifiService;

            Model = new PacksDetailViewModel();
        }
        public ViewLackByProcessPageViewModel(INavigationService navigationService,
                                              IBarcodeReaderService barcodeReaderService,
                                              IStatusBarService statusBarService,
                                              IPopupNavigation popupNavigation,
                                              IUserService userService,
                                              IBoardingService boardingService,
                                              ILandingService landingService
                                              )
            : base(navigationService, barcodeReaderService, statusBarService)
        {
            _popupNavigation = popupNavigation;
            _userService     = userService;
            _boardingService = boardingService;
            _landingService  = landingService;

            Model = new ViewLackByProcessModel();
        }
Exemplo n.º 10
0
        public MainPage(MainPageViewModel vm, IStatusBarService statusBarService)
        {
            InitializeComponent();
            BindingContext = vm;

            vm.PropertyChanged += async(o, args) =>
            {
                if (args.PropertyName == nameof(vm.SessionState))
                {
                    await statusBarService.SetStatusBarColorFromArgb(
                        (int)(BackgroundColor.A * 255),
                        (int)(BackgroundColor.R * 255),
                        (int)(BackgroundColor.G * 255),
                        (int)(BackgroundColor.B * 255));
                }
            };
        }
Exemplo n.º 11
0
        public SendLabelInputPageViewModel(INavigationService navigationService,
                                           IBarcodeReaderService barcodeReaderService,
                                           IStatusBarService statusBarService,
                                           INotificationService notificationService,
                                           IBillOfLadingService billOfLadingService,
                                           IWifiService wifiService,
                                           IPopupNavigation popupNavigation)
            : base(navigationService, barcodeReaderService, statusBarService)
        {
            _notificationService = notificationService;
            _billOfLadingService = billOfLadingService;
            _wifiService         = wifiService;
            _popupNavigation     = popupNavigation;

            Model = new SendLabelInputModel();
            MenuAdtionalButtons = new Dictionary <string, DelegateCommand>();
        }
Exemplo n.º 12
0
        public override void Execute()
        {
            base.Execute();
            if (!(this.Hook is IDFApplication))
            {
                return;
            }
            else
            {
                m_App = (IDFApplication)this.Hook;
            }

            m_MapView = m_App.Workbench.GetView(typeof(MapView)) as IMapView;
            if (m_MapView == null)
            {
                return;
            }

            m_MapView.CurrentTool = this;

            m_MapControl        = m_App.CurrentMapControl;
            m_FocusMap          = m_MapControl.ActiveView.FocusMap;
            m_pActiveView       = (IActiveView)this.m_FocusMap;
            m_CurrentLayer      = m_App.CurrentEditLayer;
            m_pStatusBarService = m_App.StatusBarService;            //获得状态服务

            CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.drawRectRelative2P;

            CommonFunction.MapRefresh(m_pActiveView);

            m_dblTolerance = CommonFunction.ConvertPixelsToMapUnits(m_MapControl.ActiveView, 4);

            m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;

            m_pStatusBarService.SetStateMessage("依次指定:1.对角线上两点;2.宽度。(U:回退/F:长度+方向/D:长度/O:方位角/B:边长/A:绝对XY/R:相对XY/Enter:结束/ESC:取消)");

            //记录用户操作
            clsUserLog useLog = new clsUserLog();

            useLog.UserName  = DFApplication.LoginUser;
            useLog.UserRoll  = DFApplication.LoginSubSys;
            useLog.Operation = "绘制矩形";
            useLog.LogTime   = System.DateTime.Now;
            useLog.TableLog  = (m_App.CurrentWorkspace as IFeatureWorkspace).OpenTable("WSGRI_LOG");
            useLog.setUserLog();
        }
Exemplo n.º 13
0
        public override void Execute()
        {
            base.Execute();
            if (!(this.Hook is IDFApplication))
            {
                return;
            }
            else
            {
                m_App = (IDFApplication)this.Hook;
            }

            m_MapView = m_App.Workbench.GetView(typeof(MapView)) as IMapView;
            if (m_MapView == null)
            {
                return;
            }

            m_MapView.CurrentTool = this;

            m_MapControl        = m_App.CurrentMapControl;
            m_FocusMap          = m_MapControl.ActiveView.FocusMap;
            m_pActiveView       = (IActiveView)this.m_FocusMap;
            m_CurrentLayer      = m_App.CurrentEditLayer;
            m_pStatusBarService = m_App.StatusBarService;            //获得状态服务

            CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.drawCircle3P;

            CommonFunction.MapRefresh(m_pActiveView);

            m_dblTolerance = CommonFunction.ConvertPixelsToMapUnits(m_MapControl.ActiveView, 4);

            m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;

            m_pStatusBarService.SetStateMessage("提示:依次指定圆周上三点。(A:绝对XY/R:相对XY/P:平行尺/ESC:取消/ENTER:结束/+shift:修改坐标)");            //向状态栏传送提示信息

            //记录用户操作
            clsUserLog useLog = new clsUserLog();

            useLog.UserName  = DFApplication.LoginUser;
            useLog.UserRoll  = DFApplication.LoginSubSys;
            useLog.Operation = "绘制圆形";
            useLog.LogTime   = System.DateTime.Now;
            useLog.TableLog  = (m_App.CurrentWorkspace as IFeatureWorkspace).OpenTable("WSGRI_LOG");
            useLog.setUserLog();
        }
Exemplo n.º 14
0
        public App(
            IClientConfiguration clientConfiguration,
            IServiceProvider serviceProvider,
            IStatusBarService statusBarService)
        {
            InitializeComponent();

            if (clientConfiguration.IsSaunaMode)
            {
                MainPage = serviceProvider.GetService <SaunaPage>();
                statusBarService.KeepScreenOn(true);
                statusBarService.SetFullscreen(true);
            }
            else
            {
                MainPage = serviceProvider.GetService <MainPage>();
            }
        }
Exemplo n.º 15
0
 private static void InvalidateCachedServices()
 {
     _addInTree              = null;
     _comManager             = null;
     _guiFactoryService      = null;
     _guiTimerService        = null;
     _infoTextMessageService = null;
     _loggingService         = null;
     _outputService          = null;
     _messageService         = null;
     _outputService          = null;
     _projectService         = null;
     _propertyService        = null;
     _resourceService        = null;
     _statusBarService       = null;
     _dispatcher             = null;
     _workbench              = null;
 }
Exemplo n.º 16
0
        public UniversalLandingPageViewModel(INavigationService navigationService,
                                             IBarcodeReaderService barcodeReaderService,
                                             IStatusBarService statusBarService,
                                             INotificationService notificationService,
                                             IPopupNavigation popupNavigation,
                                             IUserService userService,
                                             ISorterService sorterService,
                                             IWifiService wifiService)
            : base(navigationService, barcodeReaderService, statusBarService)
        {
            _notificationService = notificationService;
            _popupNavigation     = popupNavigation;
            _userService         = userService;
            _sorterService       = sorterService;
            _wifiService         = wifiService;

            Model = new UniversalLandingModel();

            DefaultMenuAdtionalBunttons();
        }
Exemplo n.º 17
0
 public SPMAdjustDT(IBaseService iBaseService, DataForAdjust dataForAdjust, IList<FileInfoBase> dtFileList)
 {
     base.m_IBaseService = iBaseService;
     this.m_antennaGain = ServiceHelper.Lookup<ICalcGain>(iBaseService);
     base.m_GeoDataObserver = ServiceHelper.Lookup<IPropaGeoDataObserver>(iBaseService);
     this.m_StatusBarService = ServiceHelper.Lookup<IStatusBarService>(iBaseService);
     this.m_SectionPathLossCalcParam = new SectionPathLossCalcParam();
     base.modelBeforeAdjust = dataForAdjust.PropModel as SpmPropagationModel;
     base.modelAfterAdjust = (SpmPropagationModel) base.modelBeforeAdjust.Clone();
     this.m_SectionPathLossCalcParam.PropagModel = base.modelAfterAdjust;
     this.m_ClutterLossMethod = base.modelAfterAdjust.ClutLossCalcuMethod as ClutterLossBase;
     this.m_EffTxHeightMethod = base.modelAfterAdjust.EffTxHeightCalcuMethod as EffectTxHeightBase;
     base.endCondition = dataForAdjust.EndCondition;
     base.isCoeNeedAdjust = dataForAdjust.IsCoeNeedAdjust;
     this.m_DTFileList = dtFileList;
     this.m_DataForAdjust = dataForAdjust;
     base.m_ClutterTypeNum = base.m_GeoDataObserver.GisInfo.GetAllClutter().Count;
     base.lossesperClutterMatrix = new float[base.m_ClutterTypeNum];
     base.modelCoeValue = new float[] { base.modelBeforeAdjust.K1, base.modelBeforeAdjust.K2, base.modelBeforeAdjust.K3, base.modelBeforeAdjust.K4, base.modelBeforeAdjust.K5, base.modelBeforeAdjust.K6, base.modelBeforeAdjust.K7 };
     base.modelCoeNum = base.isCoeNeedAdjust.Length;
 }
        public PackingListDeliveryReturnInputPageViewModel(INavigationService navigationService,
                                                           IBarcodeReaderService barcodeReaderService,
                                                           IStatusBarService statusBarService,
                                                           IUserService userService,
                                                           INotificationService notificationService,
                                                           IPopupNavigation popupNavigation,
                                                           ICommonService commonService,
                                                           IBoardingDeliveryPackService boardingDeliveryPackService,
                                                           ILandingDeliveryPackService landingDeliveryPackService,
                                                           IWifiService wifiService)
            : base(navigationService, barcodeReaderService, statusBarService)
        {
            _userService                 = userService;
            _notificationService         = notificationService;
            _popupNavigation             = popupNavigation;
            _commonService               = commonService;
            _boardingDeliveryPackService = boardingDeliveryPackService;
            _landingDeliveryPackService  = landingDeliveryPackService;
            _wifiService                 = wifiService;

            Model = new PackingListDeliveryReturnInputModel();
        }
Exemplo n.º 19
0
        public override void Execute()
        {
            base.Execute();
            if (!(this.Hook is IDFApplication))
            {
                return;
            }
            else
            {
                m_App = (IDFApplication)this.Hook;
            }

            m_MapView = m_App.Workbench.GetView(typeof(MapView)) as IMapView;
            if (m_MapView == null)
            {
                return;
            }

            m_MapView.CurrentTool = this;

            m_MapControl        = m_App.CurrentMapControl;
            m_FocusMap          = m_MapControl.ActiveView.FocusMap;
            m_pActiveView       = (IActiveView)this.m_FocusMap;
            m_pStatusBarService = m_App.StatusBarService;//获得状态服务

            CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.CalculateDistance;

            CommonFunction.MapRefresh(m_pActiveView);

            //记录用户操作
            clsUserLog useLog = new clsUserLog();

            useLog.UserName  = DFApplication.LoginUser;
            useLog.UserRoll  = DFApplication.LoginSubSys;
            useLog.Operation = "测量距离";
            useLog.LogTime   = System.DateTime.Now;
            useLog.TableLog  = (m_App.CurrentWorkspace as IFeatureWorkspace).OpenTable("WSGRI_LOG");
            useLog.setUserLog();
        }
Exemplo n.º 20
0
        public LoginPageViewModel(INavigationService navigationService,
                                  IBarcodeReaderService barcodeReaderService,
                                  IStatusBarService statusBarService,
                                  IEnvironmentConfigurationService environmentConfigurationService,
                                  IUserService userService,
                                  INotificationService notificationService,
                                  IServiceBase tmsApiServiceBase,
                                  ICommonService tmsApiCommonService,
                                  IPopupNavigation popupNavigation,
                                  IWifiService wifiService)
            : base(navigationService, barcodeReaderService, statusBarService)
        {
            _environmentConfigurationService = environmentConfigurationService;
            _userService         = userService;
            _notificationService = notificationService;
            _tmsApiServiceBase   = tmsApiServiceBase;
            _tmsApiCommonService = tmsApiCommonService;
            _popupNavigation     = popupNavigation;
            _wifiService         = wifiService;

            Model = new LoginModel();

            EnableWifi();
        }
Exemplo n.º 21
0
        void SetStandardStatusBar(object sender, EventArgs e)
        {
            IStatusBarService statusBarService = (IStatusBarService)NetFocus.DataStructure.Services.ServiceManager.Services.GetService(typeof(IStatusBarService));

            statusBarService.SetMessage("就绪");
        }
Exemplo n.º 22
0
        public override void Execute()
        {
            base.Execute();
            if (!(this.Hook is IDFApplication))
            {
                return;
            }
            else
            {
                m_App = (IDFApplication)this.Hook;
            }

            m_MapView = m_App.Workbench.GetView(typeof(MapView)) as IMapView;
            if (m_MapView == null)
            {
                return;
            }
            //else
            //{
            //    //Modify by YuanHY20081112
            //    m_ToolbarManager = (m_App.Workbench as DefaultWorkbench).commandBarManager;
            //    ToolBase toolBase = m_ToolbarManager.Tools["2dmap.DFEditorTool.DrawArc3P"];
            //    if (m_MapView.CurrentTool == this)
            //    {
            //        if (((StateButtonTool)toolBase).Checked == false)
            //        {
            //            ((StateButtonTool)toolBase).Checked = true;//按下状态
            //            return;
            //        }
            //    }
            //}

            m_MapView.CurrentTool = this;

            m_MapControl   = m_App.CurrentMapControl;
            m_FocusMap     = m_MapControl.ActiveView.FocusMap;
            m_pActiveView  = (IActiveView)this.m_FocusMap;
            m_CurrentLayer = m_App.CurrentEditLayer;

            //获得状态栏的服务
            m_pStatusBarService = m_App.StatusBarService;

            CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.drawArc3P;

            CommonFunction.MapRefresh(m_pActiveView);

            m_dblTolerance = CommonFunction.ConvertPixelsToMapUnits(m_pActiveView, 4);

            m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;

            m_pStatusBarService.SetStateMessage("提示:依次指定圆弧上的三点(A:绝对XY/R:相对XY/P:平行尺/ESC:取消/ENTER:结束/+shift:修改坐标)");

            //记录用户操作
            clsUserLog useLog = new clsUserLog();

            useLog.UserName  = DFApplication.LoginUser;
            useLog.UserRoll  = DFApplication.LoginSubSys;
            useLog.Operation = "绘制弧/扇形";
            useLog.LogTime   = System.DateTime.Now;
            useLog.TableLog  = (m_App.CurrentWorkspace as IFeatureWorkspace).OpenTable("WSGRI_LOG");
            useLog.setUserLog();
        }
Exemplo n.º 23
0
        public override void Execute()
        {
            IStatusBarService statusBar = IoC.Get <IStatusBarService>();

            statusBar.ShowMessage(DisplayName);
        }
Exemplo n.º 24
0
        private void Given_MainFormInteractor()
        {
            program       = CreateFakeProgram();
            svcFactory    = mr.StrictMock <IServiceFactory>();
            archSvc       = mr.StrictMock <IArchiveBrowserService>();
            dlgFactory    = mr.StrictMock <IDialogFactory>();
            memSvc        = mr.StrictMock <ILowLevelViewService>();
            disasmSvc     = mr.StrictMock <IDisassemblyViewService>();
            typeLibSvc    = mr.StrictMock <ITypeLibraryLoaderService>();
            brSvc         = mr.Stub <IProjectBrowserService>();
            uiPrefs       = mr.StrictMock <IUiPreferencesService>();
            fsSvc         = mr.StrictMock <IFileSystemService>();
            tcHostSvc     = mr.StrictMock <ITabControlHostService>();
            dcSvc         = mr.StrictMock <IDecompilerService>();
            srSvc         = MockRepository.GenerateMock <ISearchResultService, IWindowPane>();
            diagnosticSvc = MockRepository.GenerateMock <IDiagnosticsService, IWindowPane>();
            resEditSvc    = mr.StrictMock <IResourceEditorService>();
            cgvSvc        = mr.StrictMock <ICallGraphViewService>();
            loader        = mr.StrictMock <ILoader>();
            sbSvc         = mr.Stub <IStatusBarService>();
            vimpSvc       = mr.StrictMock <IViewImportsService>();
            cvSvc         = mr.StrictMock <ICodeViewerService>();
            imgSegSvc     = mr.StrictMock <ImageSegmentService>();
            symLoadSvc    = mr.StrictMock <ISymbolLoadingService>();

            svcFactory.Stub(s => s.CreateArchiveBrowserService()).Return(archSvc);
            svcFactory.Stub(s => s.CreateCodeViewerService()).Return(cvSvc);
            svcFactory.Stub(s => s.CreateDecompilerConfiguration()).Return(new FakeDecompilerConfiguration());
            svcFactory.Stub(s => s.CreateDiagnosticsService()).Return(diagnosticSvc);
            svcFactory.Stub(s => s.CreateDecompilerService()).Return(dcSvc);
            svcFactory.Stub(s => s.CreateDisassemblyViewService()).Return(disasmSvc);
            svcFactory.Stub(s => s.CreateMemoryViewService()).Return(memSvc);
            svcFactory.Stub(s => s.CreateDecompilerEventListener()).Return(new FakeDecompilerEventListener());
            svcFactory.Stub(s => s.CreateImageSegmentService()).Return(imgSegSvc);
            svcFactory.Stub(s => s.CreateInitialPageInteractor()).Return(new FakeInitialPageInteractor());
            svcFactory.Stub(s => s.CreateScannedPageInteractor()).Return(new FakeScannedPageInteractor());
            svcFactory.Stub(s => s.CreateTypeLibraryLoaderService()).Return(typeLibSvc);
            svcFactory.Stub(s => s.CreateProjectBrowserService()).Return(brSvc);
            svcFactory.Stub(s => s.CreateUiPreferencesService()).Return(uiPrefs);
            svcFactory.Stub(s => s.CreateFileSystemService()).Return(fsSvc);
            svcFactory.Stub(s => s.CreateStatusBarService()).Return(sbSvc);
            svcFactory.Stub(s => s.CreateTabControlHost()).Return(tcHostSvc);
            svcFactory.Stub(s => s.CreateLoader()).Return(loader);
            svcFactory.Stub(s => s.CreateSearchResultService()).Return(srSvc);
            svcFactory.Stub(s => s.CreateResourceEditorService()).Return(resEditSvc);
            svcFactory.Stub(s => s.CreateCallGraphViewService()).Return(cgvSvc);
            svcFactory.Stub(s => s.CreateViewImportService()).Return(vimpSvc);
            svcFactory.Stub(s => s.CreateSymbolLoadingService()).Return(symLoadSvc);
            services.AddService(typeof(IDialogFactory), dlgFactory);
            services.AddService(typeof(IServiceFactory), svcFactory);
            brSvc.Stub(b => b.Clear());

            form = mr.StrictMock <IMainForm>();
            form.Stub(f => f.Dispose());
            form.Stub(f => f.UpdateToolbarState());
            form.Closed += null;
            LastCall.IgnoreArguments();
            tcHostSvc.Stub(t => t.QueryStatus(
                               Arg <CommandID> .Is.Anything,
                               Arg <CommandStatus> .Is.Anything,
                               Arg <CommandText> .Is.Anything)).Return(false);
            tcHostSvc.Stub(t => t.Execute(Arg <CommandID> .Is.Anything)).Return(false);

            uiSvc.Stub(u => u.DocumentWindows).Return(new List <IWindowFrame>());
            brSvc.Stub(u => u.ContainsFocus).Return(false);
            tcHostSvc.Stub(u => u.ContainsFocus).Return(false);

            // We currently don't care about testing the appearance of the Main window text.
            // Should this be required, you will need to remove the line below and add an
            // appropriate stub/expectation in all the tests below. Good luck with that.
            form.Stub(f => f.TitleText = "").IgnoreArguments();
        }
 protected GitStatusBarManager(Guid commandSetGuid, int branchMenuCmId, int branchCommandMenuCmId, int repositoryCommandMenuCmId, IServiceContainer serviceProvider, IStatusBarService statusBarService)
 {
     BranchMenuCmId             = branchMenuCmId;
     BranchCommandMenuCmId      = branchCommandMenuCmId;
     RepositoryCommandMenuCmId  = repositoryCommandMenuCmId;
     StatusBarService           = statusBarService;
     CommandSetGuid             = commandSetGuid;
     _menuCommandService        = serviceProvider.GetService(typeof(IMenuCommandService)) as MsVsShell.OleMenuCommandService;
     _serviceProvider           = serviceProvider;
     _branchCommandMenuCommands = new List <Tuple <string, MenuCommand> >();
 }
Exemplo n.º 26
0
 public ThemeService(IPreferences preferences, IStatusBarService statusBar)
 {
     this.preferences = preferences;
     this.statusBar   = statusBar;
 }
Exemplo n.º 27
0
#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member

        /// <summary>
        /// This handles all the prelimimary stuff unique to Activated before calling OnStartAsync()
        /// This is private because it is a specialized prelude to OnStartAsync().
        /// OnStartAsync will not be called if state restore is determined.
        /// </summary>
        /// <param name="e">The event args.</param>
        private async Task InternalActivatedAsync(IActivatedEventArgs e)
        {
            if (e.Kind == ActivationKind.ShareTarget)
            {
                var shareArgs = e as ShareTargetActivatedEventArgs;

                if (e.PreviousExecutionState == ApplicationExecutionState.Running ||
                    e.PreviousExecutionState == ApplicationExecutionState.Suspended)
                {
                    var frame = new Frame();
                    frame.Tag = FRAME_IN_SHARE_CONTEXT;
                    Window.Current.Content = frame;

                    var view = WindowWrapper.Current(Window.Current);
                    var navigationService = new NavigationService(frame);
                    view.NavigationServices.Add(navigationService);

                    if (frame.Content == null)
                    {
                        navigationService.Navigate(ShareTargetPage, shareArgs.ShareOperation);
                    }
                }
                else
                {
                    InitRootFrameAndNavigation();
                    Window.Current.Content = RootFrame;

                    await WindowWrapper.Current(NavigationService).Dispatcher.DispatchAsync(() =>
                    {
                        NavigationService.Navigate(ShareTargetPage, shareArgs.ShareOperation);
                    });
                }

                Window.Current.Activate();
                return;
            }

            // sometimes activate requires a frame to be built, such as after a launch using a toast notification
            if (Window.Current.Content == null)
            {
                InitRootFrameAndNavigation();

                await OnInitializeAsync(e);

                _statusBarService = Injector.Get <IStatusBarService>();

                if (UseAppShell &&
                    e.PreviousExecutionState != ApplicationExecutionState.Running &&
                    e.PreviousExecutionState != ApplicationExecutionState.Suspended &&
                    e.Kind != ActivationKind.ShareTarget)
                {
                    Window.Current.Content = new AppShell(
                        RootFrame,
                        CreateNavigationMenuItems(),
                        CreateBottomDockedNavigationMenuItems());
                }
            }

            // onstart is shared with activate and launch
            await OnStartAsync(StartKind.Activate, e);

            // if the user didn't already set custom content use rootframe
            if (Window.Current.Content == null)
            {
                Window.Current.Content = RootFrame;
            }

            UpdateTheme();

            // ensure active (this will hide any custom splashscreen)
            Window.Current.Activate();
        }
Exemplo n.º 28
0
 private void ShowMemoryControlRange(IStatusBarService sbSvc, AddressRange range)
 {
     if (range.Begin == null || range.End == null)
         return;
     if (range.Begin.ToLinear() == range.End.ToLinear())       //$REFACTOR: make bytespan a method of addressrange.
     {
         sbSvc.SetText(string.Format("[{0}]", range.Begin));
     }
     else
     {
         sbSvc.SetText(string.Format("[{0}-{1}]", range.Begin, range.End));
     }
 }
Exemplo n.º 29
0
        void CaretModeChanged(object sender, EventArgs e)
        {
            IStatusBarService statusBarService = (IStatusBarService)NetFocus.DataStructure.Services.ServiceManager.Services.GetService(typeof(IStatusBarService));

            statusBarService.SetInsertMode(((TextEditorControl)this.Control).ActiveTextAreaControl.Caret.CaretMode == CaretMode.InsertMode);
        }
Exemplo n.º 30
0
        public MainMenuStrip()
        {
            Items.AddRange(new ToolStripItem[]
            {
                _fileMenuItem,
                _editMenuItem,
                _viewMenuItem,
                _refactorMenuItem,
                _projectMenuItem,
                _buildMenuItem,
                _debugMenuItem,
                _macrosMenuItem,
                _windowMenuItem,
                _helpMenuItem
            });

            LayoutStyle = ToolStripLayoutStyle.Flow;

            _debuggerService  = DependencyFactory.Resolve <IDebuggerService>();
            _dockingService   = DependencyFactory.Resolve <IDockingService>();
            _projectService   = DependencyFactory.Resolve <IProjectService>();
            _statusBarService = DependencyFactory.Resolve <IStatusBarService>();
            _toolBarService   = DependencyFactory.Resolve <IToolBarService>();
            EnableDocumentMenus();

            _debuggerService.OnDebuggingStarted        += DebuggerService_OnDebuggingStarted;
            _debuggerService.OnDebuggingEnded          += DebuggerService_OnDebuggingEnded;
            _dockingService.ActiveDocumentChanged      += DockingServiceActiveDocumentChanged;
            _projectService.ProjectOpened              += ProjectService_OnProjectOpened;
            _projectService.ProjectClosed              += ProjectService_OnProjectClosed;
            _toolBarService.OnToolBarVisibilityChanged += ToolBarService_OnToolBarVisibilityChanged;
            _toolBarService.OnToolbarRegistered        += ToolBarService_OnToolbarRegistered;
            ToolWindow.OnDockStateChanged              += ToolWindow_OnDockStateChanged;

            UndoMenuItem.Click                += undoMenuItem_Click;
            RedoMenuItem.Click                += redoMenuItem_Click;
            CutMenuItem.Click                 += cutMenuItem_Click;
            CopyMenuItem.Click                += copyMenuItem_Click;
            PasteMenuItem.Click               += pasteMenuItem_Click;
            SelectAllMenuItem.Click           += selectAllMenuItem_Click;
            FindMenuItem.Click                += findMenuItem_Click;
            ReplaceMenuItem.Click             += replaceMenuItem_Click;
            FindInFilesMenuItem.Click         += findInFilesMenuItem_Click;
            ReplaceInFilesMenuItem.Click      += replaceInFilesMenuItem_Click;
            FindAllRefsMenuItem.Click         += findAllRefsMenuItem_Click;
            MakeUpperMenuItem.Click           += makeUpperMenuItem_Click;
            MakeLowerMenuItem.Click           += makeLowerMenuItem_Click;
            InvertCaseMenuItem.Click          += invertCaseMenuItem_Click;
            SentenceCaseMenuItem.Click        += sentenceCaseMenuItem_Click;
            FormatDocMenuItem.Click           += formatDocMenuItem_Click;
            ToggleBookmarkMenuItem.Click      += toggleBookmarkMenuItem_Click;
            NextBookmarkMenuItem.Click        += nextBookmarkMenuItem_Click;
            PrevBookmarkMenuItem.Click        += prevBookmarkMenuItem_Click;
            ConvertSpacesToTabsMenuItem.Click += convertSpacesToTabsMenuItem_Click;
            GLineMenuItem.Click               += gLineMenuItem_Click;
            GSymbolMenuItem.Click             += gLabelMenuItem_Click;
            PrefsMenuItem.Click               += prefsMenuItem_Click;

            LabelListMenuItem.Click    += panelMenuItem_Click;
            ProjViewMenuItem.Click     += panelMenuItem_Click;
            MacroManagerMenuItem.Click += panelMenuItem_Click;
            OutputWindowMenuItem.Click += panelMenuItem_Click;
            ErrorListMenuItem.Click    += panelMenuItem_Click;
            FindResultsMenuItem.Click  += panelMenuItem_Click;

            DebugPanelMenuItem.Click   += panelMenuItem_Click;
            CallStackMenuItem.Click    += panelMenuItem_Click;
            StackViewerMenuItem.Click  += panelMenuItem_Click;
            VarTrackMenuItem.Click     += panelMenuItem_Click;
            BreakManagerMenuItem.Click += panelMenuItem_Click;

            StatusBarMenuItem.Click += statusBarMenuItem_Click;

            RenameMenuItem.Click        += renameMenuItem_Click;
            ExtractMethodMenuItem.Click += extractMethodMenuItem_Click;

            AddNewFileMenuItem.Click     += addNewFileMenuItem_Click;
            ExistingFileMenuItem.Click   += existingFileMenuItem_Click;
            BuildOrderButton.Click       += buildOrderButton_Click;
            IncludeDirProjMenuItem.Click += includeDirButton_Click;
            CloseProjMenuItem.Click      += closeProjMenuItem_Click;

            BuildProjectMenuItem.Click += buildMenuItem_Click;

            StartDebugMenuItem.Click        += startDebugMenuItem_Click;
            StartWithoutDebugMenuItem.Click += startWithoutDebugMenuItem_Click;
            StopDebugMenuItem.Click         += stopDebugMenuItem_Click;
            RunMenuItem.Click      += runMenuItem_Click;
            StepMenuItem.Click     += stepMenuItem_Click;
            StepOverMenuItem.Click += stepOverMenuItem_Click;
            StepOutMenuItem.Click  += stepOutMenuItem_Click;

            NewBreakpointMenuItem.Click    += newBreakpointMenuItem_Click;
            ToggleBreakpointMenuItem.Click += toggleBreakpointMenuItem_Click;


            UpdateMenuItem.Click += updateMenuItem_Click;
            AboutMenuItem.Click  += aboutMenuItem_Click;

            foreach (string file in GetRecentFiles())
            {
                string fileCopy = file;
                AddRecentItem(fileCopy);
            }
        }
Exemplo n.º 31
0
        void newItem_MouseEnter(object sender, EventArgs e)
        {
            IStatusBarService statusBarService = (IStatusBarService)ServiceManager.Services.GetService(typeof(IStatusBarService));

            statusBarService.SetMessage(((SdMenuCommand)sender).Description);
        }
Exemplo n.º 32
0
        void newItem_MouseLeave(object sender, EventArgs e)
        {
            IStatusBarService statusBarService = (IStatusBarService)ServiceManager.Services.GetService(typeof(IStatusBarService));

            statusBarService.SetMessage("就绪");
        }
 public StandardGitStatusBarManager(Guid commandSetGuid, int branchMenuCmId, int branchCommandMenuCmId, int repositoryCommandMenuCmId, IServiceContainer serviceProvider, IStatusBarService statusBarService)
     : base(commandSetGuid, branchMenuCmId, branchCommandMenuCmId, repositoryCommandMenuCmId, serviceProvider, statusBarService)
 {
 }
Exemplo n.º 34
0
 public RequestPackingListAccessoryViewPopupPageViewModel(INavigationService navigationService,
                                                          IBarcodeReaderService barcodeReaderService,
                                                          IStatusBarService statusBarService)
     : base(navigationService, barcodeReaderService, statusBarService)
 {
 }
 public StandardGitStatusBarManager(Guid commandSetGuid, int branchMenuCmId, int branchCommandMenuCmId, int repositoryCommandMenuCmId, IServiceContainer serviceProvider, IStatusBarService statusBarService) 
     : base(commandSetGuid, branchMenuCmId, branchCommandMenuCmId, repositoryCommandMenuCmId, serviceProvider, statusBarService)
 {
 }
Exemplo n.º 36
0
 public CalculateCurveParameter()
 {
     //获得状态栏的服务
     m_pStatusBarService = (IStatusBarService)ServiceManager.Services.GetService(typeof(WSGRI.DigitalFactory.Services.UltraStatusBarService));
 }
Exemplo n.º 37
0
#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member

        /// <summary>
        /// The internal launch handler that is called when when the app has been launched.
        /// </summary>
        /// <param name="e">The launch activated event args.</param>
        private async void InternalLaunchAsync(ILaunchActivatedEventArgs e)
        {
            // now handle normal activation
            UIElement splashScreen = default(UIElement);

            if (SplashFactory != null)
            {
                splashScreen           = SplashFactory(e.SplashScreen);
                Window.Current.Content = splashScreen;
            }

            InitRootFrameAndNavigation();

            // expire state (based on expiry)
            DateTime cacheDate;
            var      otherwise = DateTime.MinValue.ToString();

            if (DateTime.TryParse(NavigationService.FrameFacade.GetFrameState(CACHE_DATE_KEY, otherwise), out cacheDate))
            {
                var cacheAge = DateTime.Now.Subtract(cacheDate);
                if (cacheAge >= CacheMaxDuration)
                {
                    // clear state in every nav service in every view
                    foreach (var service in WindowWrapper.ActiveWrappers.SelectMany(x => x.NavigationServices))
                    {
                        service.FrameFacade.ClearFrameState();
                    }
                }
            }
            else
            {
                // no date, also fine...
            }

            // the user may override to set custom content
            await OnInitializeAsync(e);

            _statusBarService = Injector.Get <IStatusBarService>();

            if (UseAppShell &&
                e.PreviousExecutionState != ApplicationExecutionState.Running &&
                e.PreviousExecutionState != ApplicationExecutionState.Suspended)
            {
                Window.Current.Content = new AppShell(
                    RootFrame,
                    CreateNavigationMenuItems(),
                    CreateBottomDockedNavigationMenuItems());
            }

            switch (e.PreviousExecutionState)
            {
            case ApplicationExecutionState.NotRunning:
            case ApplicationExecutionState.Running:
            case ApplicationExecutionState.Suspended:
            case ApplicationExecutionState.ClosedByUser:
            {
                // launch if not restored
                await OnStartAsync(StartKind.Launch, e);

                break;
            }

            case ApplicationExecutionState.Terminated:
            {
                /*
                 *  Restore state if you need to/can do.
                 *  Remember that only the primary tile should restore.
                 *  (this includes toast with no data payload)
                 *  The rest are already providing a nav path.
                 *  In the event that the cache has expired, attempting to restore
                 *  from state will fail because of missing values.
                 *  This is okay & by design.
                 */
                if (DetermineStartCause(e) == AdditionalKinds.Primary || DetermineStartCause(e) == AdditionalKinds.Toast)
                {
                    var restored = NavigationService.RestoreSavedNavigation();
                    if (!restored)
                    {
                        await OnStartAsync(StartKind.Launch, e);
                    }
                    else
                    {
                        UpdateShellBackButton();
                    }
                }
                else
                {
                    await OnStartAsync(StartKind.Launch, e);
                }
                break;
            }
            }

            // if the user didn't already set custom content use rootframe
            if (Window.Current.Content == null || Window.Current.Content == splashScreen)
            {
                Window.Current.Content = RootFrame;
            }

            // Update the app theme
            UpdateTheme();

            // ensure active
            Window.Current.Activate();
        }
Exemplo n.º 38
0
            public MessageViewSink(MessageViewCategory messageView, IProgressMonitor progressMonitor, IStatusBarService statusBarService)
            {
                Debug.Assert(messageView != null);
                Debug.Assert(progressMonitor != null);
                Debug.Assert(statusBarService != null);

                this.messageView      = messageView;
                this.progressMonitor  = progressMonitor;
                this.statusBarService = statusBarService;
            }
Exemplo n.º 39
0
        public override void Execute()
        {
            IStatusBarService statusBar = IoC.Get <IStatusBarService>();

            statusBar.ShowMessage("Copy");
        }
Exemplo n.º 40
0
			public MessageViewSink(MessageViewCategory messageView, IProgressMonitor progressMonitor, IStatusBarService statusBarService)
			{
				Debug.Assert(messageView != null);
				Debug.Assert(progressMonitor != null);
				Debug.Assert(statusBarService != null);
				
				this.messageView = messageView;
				this.progressMonitor = progressMonitor;
				this.statusBarService = statusBarService;
			}
Exemplo n.º 41
0
        void SetStandardStatusBar(object sender, EventArgs e)
        {
            IStatusBarService statusBarService = (IStatusBarService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IStatusBarService));

            statusBarService.SetMessage("${res:MainWindow.StatusBar.ReadyMessage}");
        }
Exemplo n.º 42
0
 private void Init(IApplicationContext appContext, ControllerMgr controllerMgr)
 {
     this.m_appContext = appContext;
     this.m_ControllerMgr = controllerMgr;
     this.m_IGeoProvider = ServiceHelper.Lookup<IGeoProvider>(appContext);
     this.m_Tranceiverlist = ServiceHelper.Lookup<IPrediction>(appContext).TranceiverList;
     this.m_StatusBarService = ServiceHelper.Lookup<IStatusBarService>(appContext);
     this.m_polygonRegionlist = this.m_IGeoProvider.PolygonRegionList;
     this.m_IProjectManager = ServiceHelper.Lookup<IProjectManager>(appContext);
     this.lsbPolygonList.Items.Add("Full Map");
     this.lsbPolygonList.SelectedIndex = 0;
     foreach (GeoPolygonRegion region in this.m_polygonRegionlist)
     {
         this.lsbPolygonList.Items.Add(region.Name);
     }
 }