Exemple #1
0
        private void ico_MouseDown(object sender, MouseButtonEventArgs e)
        {
            switch ((sender as Image).Name)
            {
            case "undoImage":
                Settings.PlotGeomParams   = Settings.PlotGeomParamsConstant.Clone();
                Settings.PlotVisualParams = Settings.PlotVisualParamsConstant.Clone();
                SynchronizeSlidersValuesWithSettings();
                break;

            case "discardImage":
                Settings.PlotGeomParams   = tmpGeom.Clone();
                Settings.PlotVisualParams = tmpVisual.Clone();
                SynchronizeSlidersValuesWithSettings();
                break;

            case "okImage": Close(); return;
            }
        }
        static Settings()
        {
            exitIcoSource         = new BitmapImage(new Uri(@"Resources/exitIco.bmp", UriKind.Relative));
            exitIcoSelectedSource = new BitmapImage(new Uri(@"Resources/exitSelected.bmp", UriKind.Relative));
            saveIcoSource         = new BitmapImage(new Uri(@"Resources/saveIco3.png", UriKind.Relative));
            saveIcoSelectedSource = new BitmapImage(new Uri(@"Resources/saveIco3Selected.png", UriKind.Relative));
            OKIcoSource           = new BitmapImage(new Uri(@"Resources/okayIcon.png", UriKind.Relative));

            StartIcoSource = new BitmapImage(new Uri(@"Resources/StartButtonIco.ico", UriKind.Relative));
            ClockIcoSource = new BitmapImage(new Uri(@"Resources/clockIco.gif", UriKind.Relative));

            HalfPlaneImageSource = new BitmapImage(new Uri(@"Resources/HalfPlaneImage.png", UriKind.Relative));
            ZoneImageSource      = new BitmapImage(new Uri(@"Resources/ZoneImage.png", UriKind.Relative));
            CircleImageSource    = new BitmapImage(new Uri(@"Resources/CircleImage.png", UriKind.Relative));
            HeatMapImageSource   = new BitmapImage(new Uri(@"Resources/heatMapImage.png", UriKind.Relative));
            EmptyImageSource     = new BitmapImage(new Uri(@"Resources/Empty.png", UriKind.Relative));

            MMFImageSource = new BitmapImage(new Uri(@"Resources/mmfImage.png", UriKind.Relative));

            PlotGeomParams = new StreamLinesPlotGeomParams()
            {
                hVertical = 0.5, MRKh = 0.3, XMax = 20, XMin = -20, YMax = 20, YMin = -20
            };
            PlotVisualParams = new StreamLinesPlotVisualParams()
            {
                LineColor             = OxyColors.Blue,
                ArrowColor            = OxyColors.Black,
                BorderFillColor       = OxyColors.Gray,
                BorderStrokeColor     = OxyColors.Black,
                BorderStrokeThickness = 1,
                LineStrokeThickness   = 3,
                ArrowStokeThickness   = 3
            };
            PlotGeomParamsConstant   = PlotGeomParams.Clone();
            PlotVisualParamsConstant = PlotVisualParams.Clone();
        }