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."; }
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 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; }
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; } }
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; }