Esempio n. 1
0
 //displays the next question
 private void DisplayQuestion()
 {
     QuestionCounter++;
     QuestionNumber.Text    = "Question " + QuestionCounter + " of " + Questions.Count;
     QuestionCategory.Text  = "Category: " + Questions[QuestionCounter].Category;
     QuestionTitle.Text     = "Title: " + Questions[QuestionCounter].Title;
     QuestionText.Text      = Questions[QuestionCounter].Text;
     AnswerExplanation.Text = "";
     TimeLeft.Minimum       = 0;
     TimeLeft.Maximum       = Questions[QuestionCounter].TimeToAnswer;
     PictureViewer.Image    = WoTExam.Properties.Resources.LoadingImage;
     if (Questions[QuestionCounter].Picture.Equals("none"))
     {
         PictureViewer.Visible = false;
         PictureViewer.Image   = null;
     }
     else
     {
         PictureViewer.Visible = true;
         PictureViewer.LoadAsync(Questions[QuestionCounter].Picture);
     }
     Utils.Shuffle(Questions[QuestionCounter].Answers);
     foreach (Answer ans in Questions[QuestionCounter].Answers)
     {
         RadioButton rb = new RadioButton()
         {
             Text     = ans.Text,
             Location = new System.Drawing.Point(6, GetYLocation(AnswersPanel.Controls))
         };
         ans.AnswerButton = rb;
         AnswersPanel.Controls.Add(rb);
     }
     Timer.Start();
 }
Esempio n. 2
0
 void Start()
 {
     displayManager = DisplayManager.displayManager;
     displayManager.currentManager = gameObject;
     //TextureList.AddRange(displayManager.displayInfo.PictureList);
     picViewerContainer = displayManager.currentScene.PictureViewerData;
     DisplayVertical();
     DisplayFlipped();
     StartCoroutine(StartSlideShow());
     /// <summary>
     /// As long as there is a texture in the texture list, run the slide show.
     /// </summary>
     /// <returns></returns>
 }
Esempio n. 3
0
        public void mediaClick4()
        {
            ImageSource rawImage = this.mediaSource4;

            var titleHeight         = SystemParameters.WindowCaptionHeight + SystemParameters.ResizeFrameHorizontalBorderHeight;
            var verticalBorderWidth = SystemParameters.ResizeFrameVerticalBorderWidth;

            PictureViewer viewer = new PictureViewer();

            viewer.image.Source = rawImage;
            viewer.Width        = rawImage.Width + (verticalBorderWidth * 2);
            viewer.Height       = rawImage.Height + titleHeight + SystemParameters.ResizeFrameHorizontalBorderHeight;
            viewer.Show();
        }
        private void pbPicture_Click(object sender, EventArgs e)
        {
            PictureViewer pv = new PictureViewer(pbPicture.Image);

            pv.Show();
            //PictureViewer pv = new PictureViewer();
            //if (pictureServiceFilePath != null && pictureServiceFilePath.Length != 0)
            //{

            //    pv.imgPathStr = logoServiceFilePath;
            //    pv.Show();
            //}
            //else if (pictureFilePath != null && pictureFilePath.Length != 0)
            //{
            //    pv.imgPathStr = logoFilePath;
            //    pv.Show();
            //}
        }
Esempio n. 5
0
        public void mediaClick()
        {
            if (mediaIsNotImage)
            {
                Process.Start(rawMediaUri.OriginalString);
            }
            else
            {
                ImageSource rawImage = this.mediaSource;

                var titleHeight         = SystemParameters.WindowCaptionHeight + SystemParameters.ResizeFrameHorizontalBorderHeight;
                var verticalBorderWidth = SystemParameters.ResizeFrameVerticalBorderWidth;

                PictureViewer viewer = new PictureViewer();
                viewer.image.Source = rawImage;
                viewer.Width        = rawImage.Width + (verticalBorderWidth * 2);
                viewer.Height       = rawImage.Height + titleHeight + SystemParameters.ResizeFrameHorizontalBorderHeight;
                viewer.Show();
            }
        }
    private void DeserializeSlideShowData(string www)
    {
        try
        {
            pictureViewer = JsonConvert.DeserializeObject <PictureViewer>(www);
            foreach (PictureData pics in pictureViewer.PictureList)
            {
                DisplayManager.displayManager.GetTextureManager().LoadTexture(pics.FileName, DisplayManager.displayManager.currentManager);
                Debug.Log("CHK:" + pics.FileName + ": " + pics.Duration);
            }

            gameObject.GetComponent <PictureManager>().StartTheSlideShow(pictureViewer);
        }
        catch (JsonReaderException e)
        {
            Debug.Log("Error: " + e.Message);
            //addtodebug(e.Message);
            //addtodebug(www);
        }
    }
Esempio n. 7
0
        void linkLabel1_Click(object sender, System.EventArgs e)
        {
            PictureViewer newform = new PictureViewer(variables.xmodel);

            newform.Show();
        }
Esempio n. 8
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = viewer ?? (viewer = new PictureViewer());
 }
        private void pbPicture_Click(object sender, EventArgs e)
        {
            PictureViewer pv = new PictureViewer(pbPicture.Image);

            pv.Show();
        }
Esempio n. 10
0
 public void StartTheSlideShow(PictureViewer internaPictureViewer)
 {
     picViewerContainer = internaPictureViewer;
     Debug.Log("Picture Count: " + picViewerContainer.PictureList.Count);
     StartCoroutine(StartSlideShow());
 }
Esempio n. 11
0
        private void button8_Click(object sender, EventArgs e)
        {
            PictureViewer NewPictureViewer = new PictureViewer();

            NewPictureViewer.Show();
        }