Esempio n. 1
0
        public DrawingSheetView()
        {
            InitializeComponent();
            initializeGLControl();

            DrawingSheetStreamViewModel.Get(this);
            DrawingSheetAvatarViewModel.Get(this);
            sheet            = DrawingSheetAvatarViewModel.Get(this);
            this.DataContext = sheet;
            MyImage.Source   = sheet.getImage();
            this.mode        = SheetMode.AvatarMode;
            ChangeMode(SheetMode.StreamMode);
            ChangeMode(SheetMode.AvatarMode);
            instance = this;
        }
Esempio n. 2
0
        /// <summary>
        /// Change the view according to the selected mode
        /// </summary>
        /// <param name="mode"></param>
        public void ChangeMode(SheetMode mode)
        {
            switch (mode)
            {
            case SheetMode.AvatarMode:
                this.Show3DSheet();
                sheet          = DrawingSheetAvatarViewModel.Get(this);
                MyImage.Source = sheet.getImage();
                this.mode      = SheetMode.AvatarMode;
                break;

            case SheetMode.StreamMode:
                this.Show2DSheet();
                sheet          = DrawingSheetStreamViewModel.Get(this);
                MyImage.Source = sheet.getImage();
                this.mode      = SheetMode.StreamMode;
                break;

            default:
                //TODO
                break;
            }
            this.DataContext = sheet;
        }