Beispiel #1
0
 public void RequestDice()
 {
     state = WizardOzState.Dice;
     finishButton.Visibility = Visibility.Visible;
     msgTextBlock.Text       = "Locate and label dices. ";
     dices.Clear();
 }
Beispiel #2
0
 public void RequestCard()
 {
     state = WizardOzState.Card;
     cardPanel.Visibility  = Visibility.Visible;
     card1Button.IsEnabled = true;
     card2Button.IsEnabled = true;
     card3Button.IsEnabled = true;
     msgTextBlock.Text     = "Locate and verify cards.";
 }
Beispiel #3
0
        private void cardFinishButton_Click(object sender, RoutedEventArgs e)
        {
            bool isAccepted = sender == cardAcceptButton;

            cardPanel.Visibility = Visibility.Collapsed;
            msgTextBlock.Text    = "";
            state = WizardOzState.Idle;

            if (CardFinished != null)
            {
                CardFinished(this, new CardFinishedEventArgs(isAccepted));
            }
        }
Beispiel #4
0
        public WizardOzWindow()
        {
            InitializeComponent();

            videoSource = new WriteableBitmap(640, 480, 72, 72, PixelFormats.Rgb24, null);
            try
            {
                rectifiedTabletopMmf = MemoryMappedFile.OpenExisting("InteractiveSpaceRectifiedTabletop", MemoryMappedFileRights.Read);
            }
            catch (FileNotFoundException e)
            {
                rectifiedTabletopMmf = null;
            }
            buffer = new byte[imgSize];
            dices  = new List <Dice>();

            state = WizardOzState.Idle;
        }
Beispiel #5
0
        private void finishButton_Click(object sender, RoutedEventArgs e)
        {
            switch (state)
            {
            case WizardOzState.Dice:
                finishButton.Visibility = Visibility.Collapsed;
                msgTextBlock.Text       = "";
                diceTextBox.Visibility  = Visibility.Hidden;
                state = WizardOzState.Idle;
                if (DiceFinished != null)
                {
                    DiceFinished(this, new DiceFinishedEventArgs(dices));
                }
                break;

            default:
                Debug.Assert(false);
                break;
            }
        }
        private void finishButton_Click(object sender, RoutedEventArgs e)
        {
            switch (state)
            {
                case WizardOzState.Dice:
                    finishButton.Visibility = Visibility.Collapsed;
                    msgTextBlock.Text = "";
                    diceTextBox.Visibility = Visibility.Hidden;
                    state = WizardOzState.Idle;
                    if (DiceFinished != null)
                    {
                        DiceFinished(this, new DiceFinishedEventArgs(dices));
                    }
                    break;

                default:
                    Debug.Assert(false);
                    break;
            }
        }
        private void cardFinishButton_Click(object sender, RoutedEventArgs e)
        {
            bool isAccepted = sender == cardAcceptButton;
            cardPanel.Visibility = Visibility.Collapsed;
            msgTextBlock.Text = "";
            state = WizardOzState.Idle;

            if (CardFinished != null)
            {
                CardFinished(this, new CardFinishedEventArgs(isAccepted));
            }
        }
 public void RequestDice()
 {
     state = WizardOzState.Dice;
     finishButton.Visibility = Visibility.Visible;
     msgTextBlock.Text = "Locate and label dices. ";
     dices.Clear();
 }
 public void RequestCard()
 {
     state = WizardOzState.Card;
     cardPanel.Visibility = Visibility.Visible;
     card1Button.IsEnabled = true;
     card2Button.IsEnabled = true;
     card3Button.IsEnabled = true;
     msgTextBlock.Text = "Locate and verify cards.";
 }
 public void CancelCard()
 {
     if (state != WizardOzState.Card)
     {
         return;
     }
     cardPanel.Visibility = Visibility.Collapsed;
     msgTextBlock.Text = "";
     state = WizardOzState.Idle;
 }
        public WizardOzWindow()
        {
            InitializeComponent();

            videoSource = new WriteableBitmap(640, 480, 72, 72, PixelFormats.Rgb24, null);
            try
            {
                rectifiedTabletopMmf = MemoryMappedFile.OpenExisting("InteractiveSpaceRectifiedTabletop", MemoryMappedFileRights.Read);
            }
            catch (FileNotFoundException e)
            {
                rectifiedTabletopMmf = null;
            }
            buffer = new byte[imgSize];
            dices = new List<Dice>();

            state = WizardOzState.Idle;
        }