Esempio n. 1
0
        /// <summary>
        /// Löscht den ausgewählten Serienbrief
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void buttonPrint_Click(object sender, RoutedEventArgs e)
        {
            if (!LibreOffice.isLibreOfficeInstalled())
            {
                string warning = IniParser.GetSetting("ERRORMSG", "libre");
                MessageBoxEnhanced.Error(warning);
            }

            try
            {
                var item  = (sender as FrameworkElement).DataContext;
                int index = listView.Items.IndexOf(item);

                List <FormletterPatternItem> formletterPatternItems = (List <FormletterPatternItem>)DataContext;
                FormletterPatternItem        toPrint = formletterPatternItems[index];
                int pID = toPrint.formletterPatternId;

                KPage      pagePrint  = new pFormletterPrintDetail(pID);
                SinglePage singlePage = new SinglePage(IniParser.GetSetting("FORMLETTER", "formletterPatternPrint"), pagePrint);
            }
            catch
            {
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Löscht den ausgewählten Serienbrief
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void buttonPrint_Click(object sender, RoutedEventArgs e)
        {
            if (!LibreOffice.isLibreOfficeInstalled())
            {
                string warning = IniParser.GetSetting("ERRORMSG", "libre");
                MessageBoxEnhanced.Error(warning);
            }

            try
            {
                var item = (sender as FrameworkElement).DataContext;
                int index = listView.Items.IndexOf(item);

                List<FormletterPatternItem> formletterPatternItems = (List<FormletterPatternItem>)DataContext;
                FormletterPatternItem toPrint = formletterPatternItems[index];
                int pID = toPrint.formletterPatternId;

                KPage pagePrint = new pFormletterPrintDetail(pID);
                SinglePage singlePage = new SinglePage(IniParser.GetSetting("FORMLETTER", "formletterPatternPrint"), pagePrint);
            }
            catch
            {
            }
        }