private void OpenButton_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            FolderBrowserDialog folderBrowser = new FolderBrowserDialog();

            folderBrowser.ShowDialog();

            if (string.IsNullOrEmpty(folderBrowser.SelectedPath) == false)
            {
                IPresentation presentation = Factory.CreatePresentationReader().ReadAt(folderBrowser.SelectedPath);

                if (presentation != null)
                {
                    Resource.FileName     = Path.GetFileName(folderBrowser.SelectedPath);
                    Resource.SaveLocation = folderBrowser.SelectedPath.Replace(Resource.FileName, "");

                    Resource.Presentation = presentation;

                    var window = new PresentationEditor(presentation);
                    window.Show();

                    Close();
                }
                else
                {
                    System.Windows.MessageBox.Show("Failed to read presentation");
                }
            }
        }
Exemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var presentationEditor = new PresentationEditor(presentation);

            presentationEditor.Show();

            Close();
        }
        private void SlideContent_GotFocus(object sender, RoutedEventArgs e)
        {
            var labelInspector = Factory.GetLabelInspectorContol(SlideContent, "Question Text");

            labelInspector.OnChanged += LabelInspector_SlideContent_OnChanged;

            PresentationEditor.OnSelectedItem(labelInspector, SlideContent);

            if (SlideContent.Text == Resource.DEFAULT_INPUTFIELD_TEXT)
            {
                SlideContent.Clear();
            }
        }
Exemplo n.º 4
0
        private void ChoiceTextBox_GotFocus(object sender, RoutedEventArgs e)
        {
            var labelInspector = Factory.GetLabelInspectorContol(ChoiceTextBox, $"Choice {Choice.ChoiceLetter}");

            labelInspector.OnChanged += LabelInspector_ChoiceText_OnChanged;

            PresentationEditor.OnSelectedItem(labelInspector, ChoiceTextBox);

            if (ChoiceTextBox.Text == Resource.DEFAULT_INPUTFIELD_TEXT)
            {
                ChoiceTextBox.Clear();
            }
        }
        private void SlideContent_GotFocus(object sender, System.Windows.RoutedEventArgs e)
        {
            var labelInspector = Factory.GetLabelInspectorContol(SlideContent, "Title");

            labelInspector.OnChanged += LabelInspector_SlideContent_OnChanged;

            PresentationEditor.OnSelectedItem(labelInspector, SlideContent);

            if (SlideContent.Text == presentation.Name)
            {
                SlideContent.Clear();
            }
        }
        private void SubTitle_GotFocus(object sender, System.Windows.RoutedEventArgs e)
        {
            var labelInspector = Factory.GetLabelInspectorContol(SubTitle, "Sub-Title");

            labelInspector.OnChanged += LabelInspector_SubTitle_OnChanged;

            PresentationEditor.OnSelectedItem(labelInspector, SlideContent);

            if (SubTitle.Text == Resource.DEFAULT_INPUTFIELD_TEXT)
            {
                SubTitle.Clear();
            }
        }