Ejemplo n.º 1
0
        public MainWindow()
        {
            try
            {
                this.dropNetClient = new DropNetClient(API_KEY, APP_SECRET);
                this.dropNetClient.UseSandbox = true;
                this.employees = HierarchyGenerator.GenerateEmployees();

                InitializeComponent();

                this.importDataBtn.Click += (sender, eventArgs) =>
                {
                    var reportsPage = new ReportsPage(employees);
                    this.pagesFrame.Navigate(reportsPage);
                    this.currentPage = reportsPage;
                };
                this.exportToDropBoxBtn.Click += ExportToDropBoxAccount;
                this.exportToWordBtn.Click += (sender, e) =>
                {
                    try
                    {
                        ExportToWordFile(sender, e);
                    }
                    catch (Exception ex)
                    {
                        ShowError(ex);
                    }
                };
                this.aboutBtn.Click += ShowAboutBox;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            try
            {
                this.dropNetClient            = new DropNetClient(API_KEY, APP_SECRET);
                this.dropNetClient.UseSandbox = true;
                this.employees = HierarchyGenerator.GenerateEmployees();

                InitializeComponent();

                this.importDataBtn.Click += (sender, eventArgs) =>
                {
                    var reportsPage = new ReportsPage(employees);
                    this.pagesFrame.Navigate(reportsPage);
                    this.currentPage = reportsPage;
                };
                this.exportToDropBoxBtn.Click += ExportToDropBoxAccount;
                this.exportToWordBtn.Click    += (sender, e) =>
                {
                    try
                    {
                        ExportToWordFile(sender, e);
                    }
                    catch (Exception ex)
                    {
                        ShowError(ex);
                    }
                };
                this.aboutBtn.Click += ShowAboutBox;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }