예제 #1
0
        public FormMain()
        {
            // set static instance
            _instance = this;
            // set analysis solver
            CasePalletAnalysis.Solver = new treeDiM.StackBuilder.Engine.CasePalletSolver();
            PackPalletAnalysis.Solver = new treeDiM.StackBuilder.Engine.PackPalletSolver();
            CylinderPalletAnalysis.Solver = new treeDiM.StackBuilder.Engine.CylinderSolver();
            HCylinderPalletAnalysis.Solver = new treeDiM.StackBuilder.Engine.HCylinderSolver();
            BoxCasePalletAnalysis.Solver = new treeDiM.StackBuilder.Engine.BoxCasePalletSolver();
            BoxCaseAnalysis.Solver = new treeDiM.StackBuilder.Engine.BoxCaseSolver();
            // load content
            _deserializeDockContent = new DeserializeDockContent(ReloadContent);

            InitializeComponent();

            // plugins
            if (Properties.Settings.Default.HasPluginINTEX)
                this.toolStripSplitButtonNew.DropDownItems.Add(this.ToolStripMenuNewFileINTEX); // add new menu item in "New" ToolStripSplitButton

            // load file passed as argument
            string[] args = Environment.GetCommandLineArgs();
            if (args.Length >= 2)
            {
                string joinedString = string.Empty;
                for (int i = 1; i < args.Length; ++i)
                    joinedString += (i > 1 ? " " : "") + args[i];
                if (File.Exists(args[1]))
                    OpenDocument(args[1]);
                else if (File.Exists(joinedString))
                    OpenDocument(joinedString);
            }
            // or show splash sceen 
            else
            {
                bool multithreaded = false;
                if (multithreaded)
                {
                    // --- instantiate and start splach screen thread
                    Thread th = new Thread(new ThreadStart(DoSplash));
                    th.Start();
                    // ---
                }
                else
                    DoSplash();
            }
        }
예제 #2
0
 private void OnGenerateReport(object sender, EventArgs e)
 {
     FormMain.GetInstance().GenerateReport(_analysis);
 }
예제 #3
0
 private void onGenerateReportMSWord(object sender, EventArgs e)
 {
     FormMain.GenerateReport(_solution);
 }
 private void OnGenerateReport(object sender, EventArgs e)
 {
     FormMain.GenerateReport(Analysis);
 }