/// <summary> /// Saves the state of <see cref="CurrentMonitor"/> /// </summary> protected override void Save() { if (null != CurrentMonitor) { CurrentMonitor.Save(); } }
/// <summary> /// Implementation for <see cref="AbstractMonitoringService.StartMonitoring"/> /// </summary> protected override void StartMonitoringImpl() { if (null != CurrentMonitor) { CurrentMonitor.StartMonitoring(); } }
/// <summary> /// The ButtonRefresh_Click method. /// </summary> /// <param name="sender">The <paramref name="sender"/> parameter.</param> /// <param name="args">The <paramref name="args"/> parameter.</param> private void ButtonRefresh_Click(object sender, EventArgs args) { CurrentMonitor.Refresh(); IsInitialized = false; ResetTableValues(); cbxLayouts.SelectedIndex = (int)CurrentMonitor.Layout; }
/// <summary> /// Constructor. /// </summary> /// <param name="sp"></param> /// <param name="extensionDirectory"></param> public SrcMLGlobalService(IServiceProvider sp, string extensionDirectory) { SrcMLFileLogger.DefaultLogger.InfoFormat("Constructing a new instance of SrcMLGlobalService in {0}", extensionDirectory); serviceProvider = sp; SrcMLServiceDirectory = extensionDirectory; statusBar = (IVsStatusbar)Package.GetGlobalService(typeof(SVsStatusbar)); _taskManager = (ITaskManagerService)Package.GetGlobalService(typeof(STaskManagerService)); SaveTimer = new ReentrantTimer(() => CurrentMonitor.Save(), _taskManager.GlobalScheduler); SaveInterval = DEFAULT_SAVE_INTERVAL; }
public void AddDirectoryToMonitor(string pathToDirectory) { if (null == CurrentMonitor) { throw new InvalidOperationException("Only valid once a solution has been opened."); } if (null == pathToDirectory) { throw new ArgumentNullException("pathToDirectory"); } CurrentMonitor.AddDirectory(pathToDirectory); }
/// <summary> /// Removes <paramref name="pathToDirectory"/> from <see cref="MonitoredDirectories"/> /// </summary> /// <param name="pathToDirectory">The path to the directory to be added</param> public void RemoveDirectoryFromMonitor(string pathToDirectory) { if (null == CurrentMonitor) { throw new InvalidOperationException("Only valid once a solution has been opened."); } if (String.IsNullOrWhiteSpace(pathToDirectory)) { throw new ArgumentNullException("pathToDirectory"); } CurrentMonitor.RemoveDirectory(pathToDirectory); }
public Window(GameWindowSettings settings1, NativeWindowSettings settings2) : base(settings1, settings2) { current = this; CursorVisible = false; // Initialize values unsafe { var mode = GLFW.GetVideoMode(CurrentMonitor.ToUnsafePtr <Monitor>()); ScreenInfo.ScreenWidth = mode->Width; ScreenInfo.ScreenHeight = mode->Height; ScreenInfo.ScreenRefreshRate = mode->RefreshRate; } setScreen(); setVSync(); timer = Timer.Start(); timer.Stop(); }
/// <summary> /// Initialize the graph window. This calls a base constructor in OpenTK which handles window creation for us. /// </summary> public GraphWindow(GameWindowSettings gameSettings, NativeWindowSettings nativeSettings) : base(gameSettings, nativeSettings) { watch = new Stopwatch(); // Initialize values int maxWidth, maxHeight; unsafe { var mode = GLFW.GetVideoMode(CurrentMonitor.ToUnsafePtr <Monitor>()); maxWidth = mode->Width; maxHeight = mode->Height; } if (Settings.GraphWidth > maxWidth) { Settings.GraphWidth = maxWidth; } if (Settings.GraphHeight > maxHeight) { Settings.GraphHeight = maxHeight; } }
void SaveTimer_Elapsed(object sender, ElapsedEventArgs e) { CurrentMonitor.Save(); }
/// <summary> /// Implementation method for <see cref="AbstractMonitoringService.Update"/> /// </summary> protected override void UpdateImpl() { CurrentMonitor.UpdateArchivesAsync().Wait(); }