コード例 #1
0
        public void GetData()
        {
            Excel.Worksheet activeWorksheet = ((Excel.Worksheet)Application.ActiveSheet);
            activeWorksheet.UsedRange.Clear();

            //Bind Dataset to the Active Excel Sheet.
            Microsoft.Office.Interop.Excel.Range rng = AddData(MeasureExport.ReadStream(GlobalVariables.workingDirectory, GlobalVariables.propertiesDirectory, GlobalVariables.propertiesFile), activeWorksheet);

            //Autosize the columns based on the resulting data
            activeWorksheet.Columns.EntireColumn.AutoFit();
        }
コード例 #2
0
 private void changeWorkingDirectory(string newDir)
 {
     if (MeasureExport.CheckExport(newDir))
     {
         txtWorkingDirectory.Text         = newDir;
         GlobalVariables.workingDirectory = newDir;
         Properties.Settings.Default.defaultWorkingDirectory = newDir;
         Properties.Settings.Default.Save();
     }
     else
     {
         if (displayError("The selected directory does not contain the exportMeasure.exe.  Please browse to a valid location containing exportMeasure.exe", "Invalid Directory", MessageBoxIcon.Error) == DialogResult.OK)
         {
             txtWorkingDirectory.Text = GlobalVariables.workingDirectory;
         }
     }
 }
コード例 #3
0
ファイル: Help.cs プロジェクト: grahamkirk/MeasureExportAddin
 private void Help_Load(object sender, EventArgs e)
 {
     txtHelp.Text = MeasureExport.GetHelp(GlobalVariables.workingDirectory);
 }