Esempio n. 1
0
 public static ManualControl Instance()
 {
     if (m_instance == null)
     {
         m_instance = new ManualControl();
     }
     return(m_instance);
 }
        public frmMain2()
        {
            m_logSB = new StringBuilder();
            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;
                AddtoLog(lg);
            }
            //RearrangeGui
            AddButtons();
            AddControls();
            ctl3DView1.RearrangeGui();
            ctl3DView1.Enable3dView(true);
            #if (DEBUG) // DBG_GUICONF
            // 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");
            #else
            UVDLPApp.Instance().m_gui_config.LoadConfiguration(global::UV_DLP_3D_Printer.Properties.Resources.GuiConfig);
            #endif

            //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 static ManualControl Instance()
        {
            if (m_instance == null)
            {
                m_instance = new ManualControl();
            }
            return m_instance;

        }
Esempio n. 4
0
 public CwMainForm()
 {
     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.
     UVDLPApp.Instance().Engine3D.UpdateGrid();
     ctl3DView1.UpdateView(); // initial update
     ctl3DView1.RearrangeGui();
     ctl3DView1.Enable3dView(true);
     UVDLPApp.Instance().AppEvent += new AppEventDelegate(AppEventDel);
 }
Esempio n. 5
0
        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();
            //try to load the GUI
            gconfdb.LoadConfiguration(global::UV_DLP_3D_Printer.Properties.Resources.GuiConfig);
            UVDLPApp.Instance().m_gui_config.ApplyConfiguration(gconfdb);

            //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;
                checkForUpdatesToolStripMenuItem.Visible = false;
                //miiManualControlToolStripMenuItem.Visible = false;
                //miiManualControlToolStripMenuItem.Visible = false;
            #endif
                SetTitle();
            UVDLPApp.Instance().PerformPluginCommand("MainFormLoadedCommand", true);
            AddGlobalMouseHandler();
        }