예제 #1
0
        private void _OnSaveSnapshot()
        {
            string file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CConfig.ProfileFolders[0]), "snapshot.png");

            _Snapshot.Save(file, ImageFormat.Png);

            _Snapshot = null;
            CDraw.RemoveTexture(ref _WebcamTexture);

            _Buttons[_ButtonSaveSnapshot].Visible    = false;
            _Buttons[_ButtonDiscardSnapshot].Visible = false;
            _Buttons[_ButtonTakeSnapshot].Visible    = false;
            _Buttons[_ButtonWebcam].Visible          = CWebcam.IsDeviceAvailable();

            int id = CProfiles.NewAvatar(file);

            CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].SelectedTag, id);
            _LoadAvatars(false);

            _SelectElement(_Buttons[_ButtonSave]);
        }