public void Dispose() { if (this.client != null) { this.client.Dispose(); this.client = null; } GC.SuppressFinalize(this); }
public void Dispose() { if (this.client != null) { this.client.Dispose(); this.client = null; } GC.SuppressFinalize(this); }
public SelectConfigWindow(FanControlClient client) : this() { this.client = client; if ((!string.IsNullOrWhiteSpace(client.ViewModel.SelectedConfig) && configManager.SelectConfig(client.ViewModel.SelectedConfig)) || (configManager.SelectConfig(GetNotebookModel()))) { this.configSelector.SelectedValue = configManager.SelectedConfigName; } }
public SelectConfigWindow(FanControlClient client) : this() { this.client = client; if ((!string.IsNullOrWhiteSpace(client.ViewModel.SelectedConfig) && configManager.SelectConfig(client.ViewModel.SelectedConfig)) || (configManager.SelectConfig(GetNotebookModel()))) { this.configSelector.SelectedValue = configManager.SelectedConfigName; } }
public MainWindow() { ProcessCommandLineArgs(); InitializeComponent(); Application.Current.SessionEnding += Current_SessionEnding; this.renderer = new TrayIconRenderer(); this.renderer.Color = Settings.Default.TrayIconForegroundColor; this.saveSizeTimer = new DispatcherTimer(); this.saveSizeTimer.Interval = TimeSpan.FromSeconds(SaveWindowSizeDelay); this.saveSizeTimer.Tick += saveSizeTimer_Tick; this.viewModel = new MainWindowViewModel(); viewModel.PropertyChanged += viewModel_PropertyChanged; this.client = new FanControlClient(viewModel, UpdateInterval); this.DataContext = viewModel; client.UpdateViewModel(); this.Height = Settings.Default.WindowHeight; this.Width = Settings.Default.WindowWidth; this.SizeChanged += MainWindow_SizeChanged; var wbcd = new DateTime(DateTime.Now.Year, 5, 28); if ((DateTime.Today > wbcd.Subtract(new TimeSpan(14, 0, 0, 0))) && (DateTime.Today <= wbcd)) { this.wbcd.Visibility = System.Windows.Visibility.Visible; } else { this.wbcd.Visibility = System.Windows.Visibility.Collapsed; } }
public MainWindow() { ProcessCommandLineArgs(); InitializeComponent(); Application.Current.SessionEnding += Current_SessionEnding; this.renderer = new TrayIconRenderer(); this.renderer.Color = Settings.Default.TrayIconForegroundColor; this.saveSizeTimer = new DispatcherTimer(); this.saveSizeTimer.Interval = TimeSpan.FromSeconds(SaveWindowSizeDelay); this.saveSizeTimer.Tick += saveSizeTimer_Tick; this.viewModel = new MainWindowViewModel(); viewModel.PropertyChanged += viewModel_PropertyChanged; this.client = new FanControlClient(viewModel, UpdateInterval); this.DataContext = viewModel; client.UpdateViewModel(); this.Height = Settings.Default.WindowHeight; this.Width = Settings.Default.WindowWidth; this.SizeChanged += MainWindow_SizeChanged; var wbcd = new DateTime(DateTime.Now.Year, 5, 28); if ((DateTime.Today > wbcd.Subtract(new TimeSpan(14, 0, 0, 0))) && (DateTime.Today <= wbcd)) { this.wbcd.Visibility = System.Windows.Visibility.Visible; } else { this.wbcd.Visibility = System.Windows.Visibility.Collapsed; } }
public FanControllerViewModel(FanControlClient client, int fanIndex) : this() { this.client = client; this.fanIndex = fanIndex; }
public FanControllerViewModel(FanControlClient client, int fanIndex) : this() { this.client = client; this.fanIndex = fanIndex; }