public frmMain2() { SceneFileExt = "cws";// default to creation workshop CWS files m_lsttabs = new List <tabview>(); m_logSB = new StringBuilder(); InitializeComponent(); UVDLPApp.Instance().m_mainform = this; m_manctl = ManualControl.Instance(); // late intialization happens here after the UVDLP app Singleton is initiated. RegisterCallbacks(); RegisterGUI(); SetButtonStatuses(); UVDLPApp.Instance().AppEvent += new AppEventDelegate(AppEventDel); DebugLogger.Instance().LoggerStatusEvent += new LoggerStatusHandler(LoggerStatusEvent); UVDLPApp.Instance().m_slicer.Slice_Event += new Slicer.SliceEvent(SliceEv); UVDLPApp.Instance().m_buildmgr.BuildStatus += new delBuildStatus(BuildStatus); UVDLPApp.Instance().m_deviceinterface.StatusEvent += new DeviceInterface.DeviceInterfaceStatus(DeviceStatusEvent); UVDLPApp.Instance().m_buildmgr.PrintLayer += new delPrinterLayer(PrintLayer); UVDLPApp.Instance().Engine3D.UpdateGrid(); ctl3DView1.UpdateView(); // initial update // set up initial log data in form foreach (string lg in DebugLogger.Instance().GetLog()) { //txtLog.Text = lg + "\r\n" + txtLog.Text; AddtoLog(lg); } //RearrangeGui AddButtons(); AddControls(); SetupTabs(); //set the default tab m_viewtype = -1; // start with the first tab added ShowView(0); // 3d tab ctl3DView1.RearrangeGui(); ctl3DView1.Enable3dView(true); // test new gui config system GuiConfigDB gconfdb = new GuiConfigDB(); gconfdb.LoadConfiguration(global::UV_DLP_3D_Printer.Properties.Resources.GuiConfig); UVDLPApp.Instance().m_gui_config.ApplyConfiguration(gconfdb); gconfdb.SaveConfiguration("GuiConfigTest"); //ctlSliceGCodePanel1.ctlSliceViewctl.DlpForm = m_frmdlp; // set the dlp form for direct control SetMainMessage(""); SetTimeMessage(""); #if (DEBUG) ShowLogPanel(true); #else ShowLogPanel(false); pluginTesterToolStripMenuItem.Visible = false; testToolStripMenuItem.Visible = false; testMachineControlToolStripMenuItem.Visible = false; loadGUIConfigToolStripMenuItem.Visible = false; #endif SetTitle(); UVDLPApp.Instance().PerformPluginCommand("MainFormLoadedCommand", true); }
public frmMain2() { InitializeComponent(); m_viewtype = eViewTypes.eNone; UVDLPApp.Instance().m_mainform = this; m_manctl = ManualControl.Instance(); // late intialization happens here after the UVDLP app Singleton is initiated. ctlTitle3dView.Checked = true; // set it as checked ctlTitle3dView_Click(null, null); // and click the button RegisterCallbacks(); RegisterGUI(); SetButtonStatuses(); UVDLPApp.Instance().AppEvent += new AppEventDelegate(AppEventDel); DebugLogger.Instance().LoggerStatusEvent += new LoggerStatusHandler(LoggerStatusEvent); UVDLPApp.Instance().m_slicer.Slice_Event += new Slicer.SliceEvent(SliceEv); UVDLPApp.Instance().m_buildmgr.BuildStatus += new delBuildStatus(BuildStatus); UVDLPApp.Instance().m_deviceinterface.StatusEvent += new DeviceInterface.DeviceInterfaceStatus(DeviceStatusEvent); UVDLPApp.Instance().m_buildmgr.PrintLayer += new delPrinterLayer(PrintLayer); UVDLPApp.Instance().Engine3D.UpdateGrid(); ctl3DView1.UpdateView(); // initial update // set up initial log data in form foreach (string lg in DebugLogger.Instance().GetLog()) { txtLog.Text = lg + "\r\n" + txtLog.Text; } //RearrangeGui AddButtons(); AddControls(); ctl3DView1.RearrangeGui(); ctl3DView1.Enable3dView(true); UVDLPApp.Instance().m_gui_config.LoadConfiguration(global::UV_DLP_3D_Printer.Properties.Resources.GuiConfig); //ctlSliceGCodePanel1.ctlSliceViewctl.DlpForm = m_frmdlp; // set the dlp form for direct control SetMainMessage(""); SetTimeMessage(""); #if (DEBUG) ShowLogPanel(true); #else ShowLogPanel(false); pluginTesterToolStripMenuItem.Visible = false; testToolStripMenuItem.Visible = false; testMachineControlToolStripMenuItem.Visible = false; #endif SetTitle(); UVDLPApp.Instance().PerformPluginCommand("MainFormLoadedCommand", true); }