Exemple #1
0
        /// <summary>
        /// handler for the import button click, Shows Import Window to user
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void importBtn_Click(object sender, ExecutedRoutedEventArgs e)
        {
            WindowImportProperties win = new WindowImportProperties(true, true);

            if (true.Equals(win.ShowDialog()))
            {
                //closed with ok so the dlg will have sent the reprt to the
                //db but need to update the pick list and select the new item
                ReportListBoxItem newItem = new ReportListBoxItem(win.ReportName, win.ImportedXml);
                this.listBox1.Items.Add(newItem);
                this.listBox1.SelectedItem = newItem;
            }
        }
Exemple #2
0
        /// <summary>
        /// handler for the property button click. Will show the properties window if
        /// the listbox has a selected item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void propBtn_Click(object sender, ExecutedRoutedEventArgs e)
        {
            //get the selected item
            ReportListBoxItem item = this.listBox1.SelectedItem as ReportListBoxItem;

            if (item == null)
            {
                return;                 //no selected item so return
            }
            string reportName = null;
            string reportDesc = null;
            string filePath   = null;

            FluidTrade.Reporting.Interfaces.IStaticReportTranslation translator = null;
            //get the values from the item
            this.GetItemValues(item, false, ref reportName, ref reportDesc, ref filePath, ref translator);

            //show the properties window
            WindowImportProperties win = new WindowImportProperties(reportName, reportDesc);

            win.ShowDialog();
        }