Пример #1
0
        public VMPanelRZA(double width, double height, double x, double y, string name, BitmapImage btmp, TypePanelRZA typePanelRZA, IViewModelInterface myWind, string view)
        {
            view_         = view;
            width_        = width;
            height_       = height;
            viewModel_    = myWind;
            x_            = x;
            y_            = y;
            typePanelRZA_ = typePanelRZA;
            name_         = name;
            _btmp         = btmp;
            ParentEl      = new DeafultElement()
            {
                DataContext = this
            };
            this.Name = name;

            ParentEl.MouseDown += ParentEl_MouseDown;
            GetSchemeForView(AppDomain.CurrentDomain.BaseDirectory + @"\SVG\" + btmp);
            X     = x;
            Y     = y;
            New_x = x;
            New_y = y;
            Panel.SetZIndex(ParentEl, 1);
            Canvas.SetLeft(ParentEl, X);
            Canvas.SetTop(ParentEl, Y);
            ParentEl.Height = height;
            ParentEl.Width  = width;
            MyImage         = BitMapDisel = btmp;
            UpdateCoord();
        }
Пример #2
0
        public static List <PanelRZA> GetPanelRZAByType(TypePanelRZA type)
        {
            ContextDB db = new ContextDB();

            db.PanelRZA.Load();
            return(db.PanelRZA.Local.ToList().FindAll(x => x.TypePanel == (int)type));
        }