Exemplo n.º 1
0
 public Dashboard(MainWindow maw, String name)
 {
     InitializeComponent();
     mw          = maw;
     file_loaded = name;
     ToolStripManager.Renderer = new Office2007Renderer.Office2007Renderer();
     toolStrip2.Renderer       = new Office2007Renderer.Office2007Renderer();
     toolStrip3.Renderer       = new Office2007Renderer.Office2007Renderer();
     findPosition.Clear();
     foreach (FontFamily font in System.Drawing.FontFamily.Families)
     {
         toolStripComboBox1.Items.Add(font.Name.ToString());
     }
     for (int i = 5; i <= 90; i++)
     {
         fontSizeCmb.Items.Add(i);
     }
     toolStripComboBox1.SelectedItem = "Arial";
     fontSizeCmb.SelectedItem        = 12;
     section_name = setDocumentList().Find(item => item.DocumentName == name).ItemName;
     secIns       = new SectionInstructions();
     loadSample(section_name);
     this.setContentInitial(file_loaded);
     this.richTextBox1.SelectionFont  = new Font("Arial", 12, this.richTextBox1.SelectionFont.Style);
     this.richTextBox1.ZoomFactor     = 1.0f;
     toolStripComboBox2.SelectedIndex = 2;
     dgp = new DocumentProgressor();
     if (WorkProgress.workItems.Exists(x => x.filename == file_loaded))
     {
         label2.Text = "Unsaved";
     }
 }
Exemplo n.º 2
0
 public ForecastWindow(MainWindow maw)
 {
     InitializeComponent();
     mw  = maw;
     dgp = new DocumentProgressor();
     if (File.Exists(ProjectConfig.projectPath + "\\data.xls"))
     {
         ExcelReader excelReader = new ExcelReader();
         excelReader.readExcelToDataGridView(dataGridView1, "Sales Forecast");
         excelReader.readExcelToDataGridView(dataGridView2, "Cost Of Sales");
     }
 }
Exemplo n.º 3
0
        public ReviewWindow()
        {
            InitializeComponent();
            listView1.View      = View.Details;
            listView2.View      = View.Details;
            listView1.ForeColor = Color.Red;
            listView2.ForeColor = Color.DarkGreen;
            DocumentProgressor dcp = new DocumentProgressor();
            var allSteps           = dcp.fetchAllSteps();

            populateIncomplete(allSteps.Where(x => x.Value == 0));
            populateComplete(allSteps.Where(x => x.Value == 1));
        }
Exemplo n.º 4
0
 public AnalysisWindow(MainWindow maw)
 {
     InitializeComponent();
     mw     = maw;
     dgp    = new DocumentProgressor();
     secIns = new SectionInstructions();
     instruction_box.Text = secIns.instructionItems.FirstOrDefault(x => x.section == "Analysis Table").instruction;
     if (File.Exists(ProjectConfig.projectPath + "\\data.xls"))
     {
         ExcelReader excelReader = new ExcelReader();
         excelReader.readExcelToDataGridView(dataGridView1, "Market Analysis");
     }
 }
Exemplo n.º 5
0
 public FinancialWindow(MainWindow maw)
 {
     InitializeComponent();
     mw                   = maw;
     dgp                  = new DocumentProgressor();
     saveBt.Left          = (saveBt.Parent.Width - saveBt.Width) / 2;
     secIns               = new SectionInstructions();
     instruction_box.Text = secIns.instructionItems.FirstOrDefault(x => x.section == "Financial Statement").instruction;
     try
     {
         fetchAllData();
         generateStatement();
     }
     catch
     {
         MessageBox.Show("Unable to fetch data !");
     }
 }
Exemplo n.º 6
0
 private void saveOpenSections()
 {
     if (WorkProgress.workItems.Count > 0)
     {
         DocumentProgressor dgp = new DocumentProgressor();
         var confirmResult      = MessageBox.Show("You have unsaved sections in your project.\nDo you want to save them ?", "Unsaved work", MessageBoxButtons.YesNo);
         if (confirmResult == DialogResult.Yes)
         {
             LoadingSpinner ls = new LoadingSpinner(this, "Saving work in progress..");
             try
             {
                 ls.show();
                 foreach (var w in WorkProgress.workItems)
                 {
                     RichTextBox rtb = new RichTextBox();
                     rtb.Rtf = w.data;
                     rtb.SaveFile(Path.Combine(ProjectConfig.projectPath, w.filename));
                     dgp.updateProgress(w.filename, rtb.TextLength > 0 ? 1 : 0);
                     rtb.Dispose();
                 }
             }
             catch (Exception e)
             {
                 MessageBox.Show("Exception: " + e.Message);
             }
             finally
             {
                 ls.hide();
             }
         }
         else
         {
             return;
         }
     }
     else
     {
         return;
     }
 }
Exemplo n.º 7
0
        public MainWindow()
        {
            InitializeComponent();
            ToolStripManager.Renderer = new Office2007Renderer.Office2007Renderer();
            toolBar.Renderer          = new Office2007Renderer.Office2007Renderer();
            this.home.TopLevel        = false;
            panel1.Controls.Clear();
            panel1.Controls.Add(this.home);
            this.home.parentForm = this;
            this.home.Show();
            AppUtilities.mainForm = this;
            project_name          = ProjectConfig.projectSettings["Title"].ToString().ToUpper();
            label1.Text           = project_name.ToUpper();
            currency.Text         = ProjectConfig.projectSettings.ContainsKey("Currency") ? ProjectConfig.projectSettings["Currency"].ToString() : "N.A.";
            setTreeNodes();
            DocumentProgressor dpg = new DocumentProgressor();

            label4.Text          = dpg.completedSteps().ToString() + " /";
            label5.Text          = dpg.totalSteps().ToString() + " tasks completed";
            progressBar1.Maximum = dpg.totalSteps();
            progressBar1.Value   = dpg.completedSteps();
            currencyHandler();
            if (dashboard == null)
            {
                activateEditMenus(0);
            }
            meeting_count = DatabaseReader.getMeetingCount();
            button1.Text  = meeting_count == 1 ? meeting_count + " Meeting Today" : meeting_count + " Meetings Today";
            if (meeting_count > 0)
            {
                button1.ImageIndex = 1;
                button1.Enabled    = true;
            }
            else
            {
                button1.ImageIndex = 0;
                button1.Enabled    = false;
            }
        }