public TrafficMonitor(MainWindowForm form, StableSortableBindingList <ProcessData> processDataSource, CancellationTokenSource _cancelTasks, int listRefreshRate) { MainWindowCallback = form; ProcessDataSource = processDataSource; CancellationTokenTask = _cancelTasks; DeadPIDLookupTimer = 2 * listRefreshRate; }
public JoueurHumain(bool estBlanc, MainWindowForm echequierUI) : base(estBlanc) { foreach (var cellule in echequierUI.CasesDames) { cellule.CaseCliqueeEvent += OnCaseSelectionnee; } }
public static LayersForm GetInstance(MapLayersHandler mapLayers, MainWindowForm parent) { if (_instance == null) { _instance = new LayersForm(mapLayers, parent); } return(_instance); }
public static ShapefileAttributesForm GetInstance(MainWindowForm parentForm, MapInterActionHandler mapInterActionHandler) { if (_instance == null) { _instance = new ShapefileAttributesForm(parentForm, mapInterActionHandler); } return(_instance); }
/// <summary> /// Constructor /// </summary> /// <param name="parent"></param> /// <param name="mapInterActionHandler"></param> public ShapefileAttributesForm(MainWindowForm parent, MapInterActionHandler mapInterActionHandler) { InitializeComponent(); MapInterActionHandler = mapInterActionHandler; MapInterActionHandler.Selection += OnLayerSelection; MapInterActionHandler.MapLayersHandler.CurrentLayer += OnCurrentLayer; _parentForm = parent; _currentMapLayer = MapInterActionHandler.MapLayersHandler.CurrentMapLayer; }
public LayersForm(MapLayersHandler mapLayers, MainWindowForm parent) { InitializeComponent(); _parent = parent; _mapLayersHandler = mapLayers; _mapLayersHandler.LayerRead += OnLayerRead; _mapLayersHandler.LayerRemoved += OnLayerDeleted; _mapLayersHandler.OnLayerNameUpdate += OnLayerNameUpdated; _mapLayersHandler.LayerRefreshNeeded += OnLayerRefreshRequest; layerGrid.CellClick += OnCellClick; layerGrid.CellMouseDown += OnCellMouseDown; layerGrid.CellDoubleClick += OnCellDoubleClick; layerGrid.DragDrop += OnLayerGrid_DragDrop; layerGrid.DragOver += OnLayerGrid_DragOver; layerGrid.MouseDown += OnLayerGrid_MouseDown; layerGrid.MouseMove += OnLayerGrid_MouseMove; }
public MainProcessMonitor(MainWindowForm form, StableSortableBindingList <ProcessData> processDataSource, CancellationTokenSource _cancelTasks) { MainWindowFormCallback = form; ProcessDataSource = processDataSource; CancellationTokenTask = _cancelTasks; try { ListRefreshRate = Int32.Parse(ConfigurationManager.AppSettings[Consts.CONFIG_LIST_REFRESH_RATE]); } catch (Exception e) { System.Windows.MessageBox.Show( $"Failed to load '{Consts.CONFIG_LIST_REFRESH_RATE}' from config file because of exception during reading: {e.Message}\n" + Consts.NETWORKPROCESSMONITOR_CONFIG_REMEDIUM + "\nSetting refresh rate to default value: 1000 ms", "Failed to load default settings", MessageBoxButton.OK, MessageBoxImage.Error ); ListRefreshRate = 1000; } }