Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            ApplyLanguage();
            Loaded  += MainWindow_Loaded;
            Closing += MainWindow_Closing;
            Closed  += MainWindow_Closed;
            //==============TreeView=============
            //===================================
            //canvasMatrixTransform = new MatrixTransform(1, 0, 0, -1, 0, 0);

            //ImageBrush img = LoadImage("Map_aTan___Copy4___Copy");
            ImageBrush img = LoadImage("mapPCLDuy");

            map.Width      = img.ImageSource.Width;
            map.Height     = img.ImageSource.Height;
            map.Background = img;

            canvasControlService = new CanvasControlService(this);


            //===============DataGridView========

            DataContext  = canvasControlService;
            stationTimer = new System.Timers.Timer();
            SetTimerInterval(stationTimer);
            stationTimer.Elapsed  += OnTimedRedrawStationEvent;
            stationTimer.AutoReset = true;
        }
Exemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            ApplyLanguage();
            Loaded += MainWindow_Loaded;
            Closed += MainWindow_Closed;
            canvasMatrixTransform = new MatrixTransform(1, 0, 0, -1, 0, 0);

            //  ImageBrush img = LoadImage("Map_aTan___Copy2");
            ImageBrush img = LoadImage("PCL_MAP");

            map.Width            = img.ImageSource.Width;
            map.Height           = img.ImageSource.Height;
            map.Background       = img;
            canvasControlService = new CanvasControlService(this);
            DataContext          = canvasControlService;
            pie     = new PieChartPercent(this);
            pieTime = new PieChartPercent(this);
            Global_Object.startTimeProgram = DateTime.Now;
            //DataContext = this;
            //DataContext = new ViewModel();
        }
        public MainWindow()
        {
            InitializeComponent();
            ApplyLanguage();
            Loaded += MainWindow_Loaded;

            canvasMatrixTransform = new MatrixTransform(1, 0, 0, -1, 0, 0);

            ImageBrush img = LoadImage("Map");

            map.Width            = img.ImageSource.Width;
            map.Height           = img.ImageSource.Height;
            map.Background       = img;
            canvasControlService = new CanvasControlService(this);

            stationTimer           = new System.Timers.Timer();
            stationTimer.Interval  = 1000;
            stationTimer.Elapsed  += OnTimedRedrawStationEvent;
            stationTimer.AutoReset = true;
            stationTimer.Enabled   = true;

            canvasControlService.ReloadAllStation();
        }