Example #1
0
 public TrafficMonitor(MainWindowForm form, StableSortableBindingList <ProcessData> processDataSource, CancellationTokenSource _cancelTasks, int listRefreshRate)
 {
     MainWindowCallback    = form;
     ProcessDataSource     = processDataSource;
     CancellationTokenTask = _cancelTasks;
     DeadPIDLookupTimer    = 2 * listRefreshRate;
 }
Example #2
0
 public JoueurHumain(bool estBlanc, MainWindowForm echequierUI) : base(estBlanc)
 {
     foreach (var cellule in echequierUI.CasesDames)
     {
         cellule.CaseCliqueeEvent += OnCaseSelectionnee;
     }
 }
Example #3
0
 public static LayersForm GetInstance(MapLayersHandler mapLayers, MainWindowForm parent)
 {
     if (_instance == null)
     {
         _instance = new LayersForm(mapLayers, parent);
     }
     return(_instance);
 }
Example #4
0
 public static ShapefileAttributesForm GetInstance(MainWindowForm parentForm, MapInterActionHandler mapInterActionHandler)
 {
     if (_instance == null)
     {
         _instance = new ShapefileAttributesForm(parentForm, mapInterActionHandler);
     }
     return(_instance);
 }
Example #5
0
 /// <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;
 }
Example #6
0
 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;
 }
Example #7
0
 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;
     }
 }