/// <summary>
 /// Load the personalization (color of the software) from the session file
 /// </summary>
 public void loadPerso()
 {
     foreach (KeyValuePair <string, byte[]> pair in personalization)
     {
         App.Current.Resources[pair.Key] = (Color.FromArgb(pair.Value[3], pair.Value[0], pair.Value[1], pair.Value[2]));
         if (pair.Key == "FeedbackStreamColor")
         {
             DrawingSheetStreamViewModel.Get().changeColorFeedbacks();
         }
     }
     IconViewModel.get().setFFT((Color)App.Current.Resources["GeneralTextColor"], (Color)App.Current.Resources["UnselectedTabColor"]);
 }
Exemple #2
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;
        }
Exemple #3
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;
        }