示例#1
0
        public Window_PDFExport(PresentationOutput PRoutput)
        {
            InitializeComponent();

            output       = PRoutput;
            OutputExport = true;
        }
示例#2
0
        public Window_Info(PresentationOutput output)
        {
            InitializeComponent();

            LCreated.Content        = output.CreatedTime.ToShortDateString() + "   " + output.CreatedTime.ToLongTimeString();
            LPages.Content          = output.PresentationPagesCount;
            LBPages.Content         = output.Pages.Count;
            LCX.Content             = "" + output.W;
            LCY.Content             = "" + output.H;
            LScripts.Content        = LocalizationWorker.BoolToYesNo(output.HaveScripts);
            LAllowedScripts.Content = LocalizationWorker.BoolToYesNo(output.ScriptsAllowed);
        }
示例#3
0
        public void OpenFile(string path)
        {
            try
            {
                SaveEditor save = new SaveEditor();
                output = (PresentationOutput)save.LoadWithCompressionO(path);

                pathtofile = path;

                SetWorkingFileLabel(path);

                DesignCanvas.Strokes.Clear();

                CurrentPage = -1;

                LoadFileData();

                BorderWindowSize.Width  = output.W + 2;
                BorderWindowSize.Height = output.H + 2;

                IMG_StackCount = Stack_TestList.Children.Count;
                IMG_Work       = false;
                IMG_Current    = 0;

                IMG_dispatcherTimer          = new DispatcherTimer();
                IMG_dispatcherTimer.Tick    += new EventHandler(IMG_dispatcherTimer_Tick);
                IMG_dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 10);
                IMG_dispatcherTimer.Start();


                //UpdateCanvasIcon();

                ScrollViewer_TestList.ScrollToHome();
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                MessageBox.Show(Good_Teacher.Strings.ResStrings.ErrorLoad, Good_Teacher.Strings.ResStrings.Error, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
示例#4
0
        public Window_Answers(PresentationOutput output)
        {
            InitializeComponent();

            int allgood  = 0;
            int allwrong = 0;
            int allGW    = 0;

            foreach (KeyValuePair <int, OutputPage> pair in output.Pages)
            {
                Label page = new Label();
                page.Content = (pair.Key + 1) + ".";
                page.HorizontalContentAlignment = HorizontalAlignment.Center;
                page.FontSize = 14;

                Label good = new Label();
                good.Content = "" + output.Pages[pair.Key].GoodAnswers;
                good.HorizontalContentAlignment = HorizontalAlignment.Center;
                good.FontSize = 14;

                Label wrong = new Label();
                wrong.Content = "" + output.Pages[pair.Key].WrongAnswers;
                wrong.HorizontalContentAlignment = HorizontalAlignment.Center;
                wrong.FontSize = 14;

                Label all = new Label();
                all.Content = "" + output.Pages[pair.Key].AllAnswers;
                all.HorizontalContentAlignment = HorizontalAlignment.Center;
                all.FontSize = 14;

                allgood  += output.Pages[pair.Key].GoodAnswers;
                allwrong += output.Pages[pair.Key].WrongAnswers;
                allGW    += output.Pages[pair.Key].AllAnswers;

                PageP.Children.Add(page);
                GoodP.Children.Add(good);
                WrongP.Children.Add(wrong);
                AllP.Children.Add(all);
            }

            {
                Label page = new Label();
                page.Content = Good_Teacher.Strings.ResStrings.All;
                page.HorizontalContentAlignment = HorizontalAlignment.Center;
                page.FontSize   = 14;
                page.FontWeight = FontWeights.Bold;

                Label good = new Label();
                good.Content = allgood;
                good.HorizontalContentAlignment = HorizontalAlignment.Center;
                good.FontSize   = 14;
                good.FontWeight = FontWeights.Bold;

                Label wrong = new Label();
                wrong.Content = allwrong;
                wrong.HorizontalContentAlignment = HorizontalAlignment.Center;
                wrong.FontSize   = 14;
                wrong.FontWeight = FontWeights.Bold;

                Label all = new Label();
                all.Content = allGW;
                all.HorizontalContentAlignment = HorizontalAlignment.Center;
                all.FontSize   = 14;
                all.FontWeight = FontWeights.Bold;

                PageP.Children.Add(page);
                GoodP.Children.Add(good);
                WrongP.Children.Add(wrong);
                AllP.Children.Add(all);
            }
        }