コード例 #1
0
 public Manage3DInkMainWindow(int ID, GUIHost host, SettingsManager main_controller, PopupMessageBox messagebox, MessagePopUp infobox, SpoolerConnection spooler_connection)
     : base(ID, null)
 {
     this.spooler_connection              = spooler_connection;
     spooler_connection.OnPrinterMessage += new SpoolerConnection.PrinterMessageCallback(PrinterMessageCallback);
     Init(host, main_controller, messagebox, infobox);
 }
コード例 #2
0
 public CalibrationSettingsFrame(int ID, SettingsManager main_controller, PopupMessageBox messagebox, SpoolerConnection spooler_connection)
     : base(ID)
 {
     this.main_controller    = main_controller;
     this.spooler_connection = spooler_connection;
     this.messagebox         = messagebox;
 }
コード例 #3
0
ファイル: CatScreenTab.cs プロジェクト: ye-man/M3D
 public CatScreenTab(int ID, SettingsManager main_controller, SpoolerConnection spooler_connection, PopupMessageBox messagebox)
     : base(ID)
 {
     this.messagebox         = messagebox;
     this.main_controller    = main_controller;
     this.spooler_connection = spooler_connection;
 }
コード例 #4
0
        public ManualControlsFrame(GUIHost host, SpoolerConnection spooler_connection, PopupMessageBox messagebox, SettingsManager settingsManager)
        {
            this.host = host;
            this.spooler_connection = spooler_connection;
            this.messagebox         = messagebox;
            var manualcontrolsframeTabbuttons = Resources.manualcontrolsframe_tabbuttons;

            Init(host, manualcontrolsframeTabbuttons, new ButtonCallback(tabsFrameButtonCallback));
            gCodeButton             = (ButtonWidget)FindChildElement(3);
            advancedHeatedBedButton = (ButtonWidget)FindChildElement(4);
            basicButton             = (ButtonWidget)FindChildElement(1);
            sdCardButton            = (ButtonWidget)FindChildElement(5);
            TabFrame           = (HorizontalLayout)FindChildElement(1004);
            Visible            = false;
            Enabled            = false;
            RelativeWidth      = 1f;
            RelativeHeight     = 1f;
            basicControlsFrame = new BasicControlsFrame(1001, host, messagebox, spooler_connection);
            AddChildElement(basicControlsFrame);
            basicControlsFrame.Refresh();
            diagnosticsFrame = new DiagnosticsFrame(1002, host, spooler_connection);
            AddChildElement(diagnosticsFrame);
            diagnosticsFrame.Refresh();
            advancedHeatedBedFrame = new AdvancedFrame(1004, host, messagebox, spooler_connection);
            AddChildElement(advancedHeatedBedFrame);
            advancedHeatedBedFrame.Refresh();
            sdCardFrame = new SDCardFrame(1004, host, messagebox, spooler_connection, settingsManager);
            AddChildElement(sdCardFrame);
            sdCardFrame.Refresh();
            gCodesFrame = new GCodeFrame(1003, host, messagebox, spooler_connection);
            AddChildElement(gCodesFrame);
            gCodesFrame.Refresh();
            active_frame = basicControlsFrame;
        }
コード例 #5
0
ファイル: AdvancedCalibrationTab.cs プロジェクト: ye-man/M3D
 public AdvancedCalibrationTab(int ID, SettingsManager main_controller, PopupMessageBox messagebox, SpoolerConnection spooler_connection)
     : base(ID)
 {
     m_oSettingsManager         = main_controller;
     m_oSpoolerConnection       = spooler_connection;
     m_oMessagebox              = messagebox;
     m_oswWaitToVerifyBusyTimer = new Stopwatch();
 }
コード例 #6
0
 public MultiPrinterDialogWidget(int ID, GUIHost host, SettingsManager main_controller, PopupMessageBox messagebox, SpoolerConnection spooler_connection)
     : base(ID, null)
 {
     this.main_controller    = main_controller;
     this.messagebox         = messagebox;
     this.spooler_connection = spooler_connection;
     printer_list            = new List <PrinterInfo>();
     spooler_connection.OnPrintProcessChanged += new SpoolerClient.OnPrintProcessDel(OnPrintProcessChanged);
     Init(host);
 }
コード例 #7
0
 public FeaturePanel(int ID, GUIHost host, SpoolerConnection spooler_connection, PrinterObject exclusive)
     : base(ID)
 {
     this.spooler_connection = spooler_connection;
     mExclusivePrinter       = exclusive;
     Init(host);
     mProFeaturesFrame            = (Frame)FindChildElement(2000);
     mProUnavailableFrame         = (Frame)FindChildElement(3000);
     mProUnavailableFrame.Visible = true;
     mProFeaturesFrame.Visible    = false;
     Visible = false;
     Enabled = false;
 }
コード例 #8
0
ファイル: SettingsDialogWidget.cs プロジェクト: ye-man/M3D
 private void CreateCalibrationFrame(GUIHost host, SpoolerConnection spooler_connection)
 {
     calibrationsettings_page = new CalibrationSettingsFrame(5, settingsManager, messagebox, spooler_connection)
     {
         X              = 0,
         Y              = 0,
         RelativeWidth  = 1f,
         RelativeHeight = 1f,
         Visible        = false,
         Enabled        = false
     };
     calibrationsettings_page.Init(host);
     tab_frame.AddChildElement(calibrationsettings_page);
 }
コード例 #9
0
ファイル: DiagnosticsFrame.cs プロジェクト: ye-man/M3D
        public DiagnosticsFrame(int ID, GUIHost host, SpoolerConnection spooler_connection)
            : base(ID)
        {
            this.spooler_connection = spooler_connection;
            var manualcontrolsframeDiagnostics = Resources.manualcontrolsframe_diagnostics;

            Init(host, manualcontrolsframeDiagnostics, new ButtonCallback(diagnosticsFrameButtonCallback));
            CenterHorizontallyInParent = true;
            RelativeY      = 0.1f;
            RelativeWidth  = 0.95f;
            RelativeHeight = 0.9f;
            BGColor        = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
            Visible        = false;
            Enabled        = false;
        }
コード例 #10
0
        public BasicControlsFrame(int ID, GUIHost host, PopupMessageBox messagebox, SpoolerConnection spooler_connection)
            : base(ID)
        {
            this.messagebox         = messagebox;
            this.spooler_connection = spooler_connection;
            var manualcontrolsframeBasiccontrols = Resources.manualcontrolsframe_basiccontrols;

            Init(host, manualcontrolsframeBasiccontrols, new ButtonCallback(basicControlsFrameButtonCallback));
            CenterHorizontallyInParent = true;
            RelativeY      = 0.1f;
            RelativeWidth  = 0.95f;
            RelativeHeight = 0.9f;
            BGColor        = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
            Visible        = true;
            Enabled        = true;
            heater_text    = (TextWidget)FindChildElement(1020);
        }
コード例 #11
0
        public NozzlePage(int ID, GUIHost host, SpoolerConnection spooler_connection, PopupMessageBox messagebox)
            : base(ID)
        {
            m_oSpoolerConnection = spooler_connection;
            m_oMessagebox        = messagebox;
            m_oSpoolerConnection.OnSelectedPrinterChanged += new SpoolerConnection.SelectedPrinterChangedCallback(OnSelectedPrinterChanged);
            var accessoriesNozzle = Resources.accessories_nozzle;

            Init(host, accessoriesNozzle, new ButtonCallback(ButtonCallback));
            m_oframeNozzleSelect        = (Frame)FindChildElement(10101);
            m_oframeIncompatiblePrinter = (Frame)FindChildElement(10102);
            m_oframePrinterNotConnected = (Frame)FindChildElement(10103);
            m_oframeUpdating            = (Frame)FindChildElement(10104);
            Visible        = false;
            Enabled        = false;
            RelativeWidth  = 1f;
            RelativeHeight = 1f;
        }
コード例 #12
0
        public FilamentProfilePage(int ID, SettingsManager settingsManager, GUIHost host, SpoolerConnection spooler_connection, PopupMessageBox messagebox)
            : base(ID)
        {
            this.host               = host;
            this.settingsManager    = settingsManager;
            this.spooler_connection = spooler_connection;
            this.messagebox         = messagebox;
            var filamentsettingsTabbuttons = Resources.filamentsettings_tabbuttons;

            Init(host, filamentsettingsTabbuttons, new ButtonCallback(tabsFrameButtonCallback));
            Visible        = false;
            Enabled        = false;
            RelativeWidth  = 1f;
            RelativeHeight = 1f;
            CreateAdvancedFilamentSettingsFrame();
            CreateFilamentProfilesFrame();
            active_frame = filamentSettingsFrame;
        }
コード例 #13
0
ファイル: GCodeFrame.cs プロジェクト: ye-man/M3D
        public GCodeFrame(int ID, GUIHost host, PopupMessageBox messagebox, SpoolerConnection spooler_connection)
            : base(ID)
        {
            this.messagebox         = messagebox;
            this.spooler_connection = spooler_connection;
            var manualcontrolsframeGcodes = Resources.manualcontrolsframe_gcodes;

            Init(host, manualcontrolsframeGcodes, new ButtonCallback(gCodesFrameButtonCallback));
            CenterHorizontallyInParent = true;
            RelativeY      = 0.1f;
            RelativeWidth  = 0.95f;
            RelativeHeight = 0.9f;
            BGColor        = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
            Visible        = false;
            Enabled        = false;
            ((EditBoxWidget)FindChildElement(1030))?.SetCallbackEnterKey(new EditBoxWidget.EditBoxCallback(OnPressSendManualGCode));
            logwaits_checkbox    = (ButtonWidget)FindChildElement(1034);
            logfeedback_checkbox = (ButtonWidget)FindChildElement(1035);
        }
コード例 #14
0
ファイル: SDCardFrame.cs プロジェクト: ye-man/M3D
        public SDCardFrame(int ID, GUIHost host, PopupMessageBox messagebox, SpoolerConnection spooler_connection, SettingsManager settings)
            : base(ID)
        {
            m_oMessagebox        = messagebox;
            m_oSpoolerConnection = spooler_connection;
            m_oSettings          = settings;
            var manualcontrolsframeSdcard = Resources.manualcontrolsframe_sdcard;

            Init(host, manualcontrolsframeSdcard, new ButtonCallback(MyButtonCallback));
            m_oSDFilesListbox = (ListBoxWidget)FindChildElement(1100);
            m_oAllowSavingtoSDOnlyCheckbox = (ButtonWidget)FindChildElement(1106);
            CenterHorizontallyInParent     = true;
            RelativeY      = 0.1f;
            RelativeWidth  = 0.95f;
            RelativeHeight = 0.9f;
            BGColor        = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
            SyncFromSettings();
            Visible = false;
            Enabled = false;
        }
コード例 #15
0
ファイル: PrintDialogMainWindow.cs プロジェクト: ye-man/M3D
 public PrintDialogMainWindow(int ID, GUIHost host, PrinterView printerview, SpoolerConnection spooler_connection, PopupMessageBox message_box, ModelLoadingManager modelloadingmanager, SlicerConnectionBase slicer_connection, RecentPrintsTab recentPrints, SettingsManager controller)
     : base(ID)
 {
     this.host = host;
     this.spooler_connection = spooler_connection;
     this.slicer_connection  = slicer_connection;
     spooler_connection.OnSelectedPrinterChanged += new SpoolerConnection.SelectedPrinterChangedCallback(OnSelectedPrinterChanged);
     SetSize(750, 500);
     CenterHorizontallyInParent = true;
     CenterVerticallyInParent   = true;
     frames.Add(new PrintDialogFrame(1000, host, printerview, spooler_connection, message_box, modelloadingmanager, controller, this));
     frames.Add(new SlicingFrame(1001, host, printerview, message_box, controller, this));
     frames.Add(new PreparingToStartFrame(1002, host, printerview, message_box, recentPrints, this));
     frames.Add(new PreSlicingFrame(1003, host, this));
     frames.Add(new AdvancedPrintSettingsFrame(1004, host, message_box, controller, this));
     frames.Add(new PrintingToFileFrame(1005, host, message_box, this));
     foreach (IPrintDialogFrame frame in frames)
     {
         frame.Visible = false;
         AddChildElement(frame);
     }
 }
コード例 #16
0
 private void CreatePopUpDialogs(GUIHost host, PopupMessageBox messagebox, MessagePopUp infobox, SpoolerConnection spooler_connection, Updater softwareUpdater)
 {
     PopUpDialogList                                    = new List <Frame>();
     m_oManageFilamentDialog                            = new Manage3DInkMainWindow(8, host, m_oSettingsManager, messagebox, infobox, spooler_connection);
     m_oSettingsDialog                                  = new SettingsDialogWidget(1, host, m_oSettingsManager, messagebox, spooler_connection, softwareUpdater);
     m_oMultiPrinterDialog                              = new MultiPrinterDialogWidget(12, host, m_oSettingsManager, messagebox, spooler_connection);
     m_oAccessoriesDialog                               = new MainWindow(13, host, m_oSettingsManager, messagebox, spooler_connection);
     m_oManageFilamentDialog.MinWidth                   = 750;
     m_oManageFilamentDialog.MinHeight                  = 480;
     m_oManageFilamentDialog.RelativeWidth              = 0.5f;
     m_oManageFilamentDialog.RelativeHeight             = 0.5f;
     m_oManageFilamentDialog.AutoCenterYOffset          = 50;
     m_oManageFilamentDialog.CenterHorizontallyInParent = true;
     m_oManageFilamentDialog.CenterVerticallyInParent   = true;
     m_oSettingsDialog.MinWidth                         = 850;
     m_oSettingsDialog.MinHeight                        = 480;
     m_oSettingsDialog.RelativeWidth                    = 0.5f;
     m_oSettingsDialog.RelativeHeight                   = 0.5f;
     m_oSettingsDialog.AutoCenterYOffset                = 50;
     m_oSettingsDialog.CenterHorizontallyInParent       = true;
     m_oSettingsDialog.CenterVerticallyInParent         = true;
     m_oAccessoriesDialog.MinWidth                      = 850;
     m_oAccessoriesDialog.MinHeight                     = 480;
     m_oAccessoriesDialog.RelativeWidth                 = 0.5f;
     m_oAccessoriesDialog.RelativeHeight                = 0.5f;
     m_oAccessoriesDialog.AutoCenterYOffset             = 50;
     m_oAccessoriesDialog.CenterHorizontallyInParent    = true;
     m_oAccessoriesDialog.CenterVerticallyInParent      = true;
     m_oMultiPrinterDialog.MinWidth                     = 750;
     m_oMultiPrinterDialog.MinHeight                    = 440;
     m_oMultiPrinterDialog.RelativeWidth                = 0.45f;
     m_oMultiPrinterDialog.RelativeHeight               = 0.45f;
     m_oMultiPrinterDialog.AutoCenterYOffset            = 50;
     m_oMultiPrinterDialog.CenterHorizontallyInParent   = true;
     m_oMultiPrinterDialog.CenterVerticallyInParent     = true;
     PopUpDialogList.Insert(0, m_oSettingsDialog);
     PopUpDialogList.Insert(1, m_oManageFilamentDialog);
     PopUpDialogList.Insert(2, m_oMultiPrinterDialog);
     PopUpDialogList.Insert(3, m_oAccessoriesDialog);
 }
コード例 #17
0
        public PrintDialogFrame(int ID, GUIHost host, PrinterView printerview, SpoolerConnection spooler_connection, PopupMessageBox message_box, ModelLoadingManager modelloadingmanager, SettingsManager settings, PrintDialogMainWindow printDialogWindow)
            : base(ID, printDialogWindow)
        {
            this.modelloadingmanager = modelloadingmanager;
            this.message_box         = message_box;
            this.spooler_connection  = spooler_connection;
            this.printerview         = printerview;
            settingsManager          = settings;
            this.host = host;
            CenterHorizontallyInParent = true;
            CenterVerticallyInParent   = true;
            SetSize(750, 550);
            var printdialog = Resources.printdialog;
            var xmlFrame    = new XMLFrame(ID)
            {
                RelativeWidth  = 1f,
                RelativeHeight = 1f
            };

            AddChildElement(xmlFrame);
            xmlFrame.Init(host, printdialog, new ButtonCallback(MyButtonCallback));
            mPrintQualityButtons = new Dictionary <PrintQuality, ButtonWidget>
            {
                { PrintQuality.Expert, (ButtonWidget)FindChildElement(111) },
                { PrintQuality.VeryHighQuality, (ButtonWidget)FindChildElement(116) },
                { PrintQuality.HighQuality, (ButtonWidget)FindChildElement(112) },
                { PrintQuality.MediumQuality, (ButtonWidget)FindChildElement(113) },
                { PrintQuality.FastPrint, (ButtonWidget)FindChildElement(114) },
                { PrintQuality.VeryFastPrint, (ButtonWidget)FindChildElement(115) },
                { PrintQuality.Custom, (ButtonWidget)FindChildElement(118) }
            };
            mFillDensityButtons = new Dictionary <FillQuality, ButtonWidget>
            {
                { FillQuality.ExtraHigh, (ButtonWidget)FindChildElement(220) },
                { FillQuality.High, (ButtonWidget)FindChildElement(221) },
                { FillQuality.Medium, (ButtonWidget)FindChildElement(222) },
                { FillQuality.Low, (ButtonWidget)FindChildElement(223) },
                { FillQuality.HollowThickWalls, (ButtonWidget)FindChildElement(224) },
                { FillQuality.HollowThinWalls, (ButtonWidget)FindChildElement(225) },
                { FillQuality.Solid, (ButtonWidget)FindChildElement(227) },
                { FillQuality.Custom, (ButtonWidget)FindChildElement(228) }
            };
            print_button            = (ButtonWidget)FindChildElement(401);
            quality_scroll_list     = (HorizontalLayoutScrollList)FindChildElement(110);
            density_scroll_list     = (HorizontalLayoutScrollList)FindChildElement(219);
            printQualityPrev_button = (ButtonWidget)FindChildElement(109);
            printQualityPrev_button.SetCallback(new ButtonCallback(MyButtonCallback));
            printQualityNext_button = (ButtonWidget)FindChildElement(117);
            printQualityNext_button.SetCallback(new ButtonCallback(MyButtonCallback));
            fillDensityPrev_button = (ButtonWidget)FindChildElement(218);
            fillDensityPrev_button.SetCallback(new ButtonCallback(MyButtonCallback));
            fillDensityNext_button = (ButtonWidget)FindChildElement(226);
            fillDensityNext_button.SetCallback(new ButtonCallback(MyButtonCallback));
            support_checkbutton       = (ButtonWidget)FindChildElement(301);
            support_everywhere        = (ButtonWidget)FindChildElement(303);
            support_printbedonly      = (ButtonWidget)FindChildElement(313);
            UseWaveBonding            = (ButtonWidget)FindChildElement(305);
            raft_checkbutton          = (ButtonWidget)FindChildElement(307);
            verifybed_checkbutton     = (ButtonWidget)FindChildElement(309);
            verifybed_text            = (TextWidget)FindChildElement(310);
            printQuality_editbox      = (EditBoxWidget)FindChildElement(108);
            fillDensity_editbox       = (EditBoxWidget)FindChildElement(217);
            enableskirt_checkbutton   = (ButtonWidget)FindChildElement(311);
            heatedBedButton_checkbox  = (ButtonWidget)FindChildElement(315);
            heatedBedButton_text      = (TextWidget)FindChildElement(316);
            untetheredButton_checkbox = (ButtonWidget)FindChildElement(317);
            sdOnlyButton_checkbox     = (ButtonWidget)FindChildElement(319);
            sdOnlyButton_text         = (TextWidget)FindChildElement(320);
            sdCheckboxesFrame         = (XMLFrame)FindChildElement(321);
            mPrintQualityButtons[PrintQuality.Custom].Visible = false;
            mFillDensityButtons[FillQuality.Custom].Visible   = false;
            LoadSettings();
        }
コード例 #18
0
        private void glControl1_Load(object sender, EventArgs e)
        {
            OpenGLConnection = new OpenGLConnection();
            try
            {
                splashForm.Hide();
                splashForm.Show();
                splashForm.TopMost = true;
                OpenGLConnection.OnLoad(glControl1, Form1.debugLogger);
                InitGUI();
                var slicer_connection = (SlicerConnectionBase) new M3D.Slicer.Cura15_04.SlicerConnectionCura(Paths.WorkingFolder, Paths.ResourceFolder);
                model_loading_manager = new ModelLoadingManager();
                spooler_connection    = new SpoolerConnection(messagebox, informationbox, settingsManager);
                SoftwareUpdater       = new Updater(this, messagebox, spooler_connection, settingsManager);
                controlbar            = new ControlBar(this, m_gui_host, settingsManager, messagebox, informationbox, spooler_connection, model_loading_manager, SoftwareUpdater);
                var frame = new Frame(24680);
                frame.SetPosition(0, 0);
                frame.RelativeWidth  = 1f;
                frame.RelativeHeight = 1f;
                frame.BGColor        = new Color4(0.913725f, 0.905882f, 0.9098f, 1f);
                m_gui_host.AddElement(frame);
                libraryview = new LibraryView(10001, frame, glControl1, m_gui_host, informationbox, model_loading_manager);
                m_gui_host.SetFocus(1001);
                m_gui_host.Refresh();
                Form1.debugLogger.Add("glControl1_Load()", "LibraryView created.", DebugLogger.LogType.Secondary);
                printerView = new PrinterView(this, m_gui_host, OpenGLConnection, spooler_connection, slicer_connection, model_loading_manager, messagebox, informationbox, settingsManager, libraryview);
                printerView.SetViewPointPos(0.0f, 100f, 400f);
                Form1.debugLogger.Add("glControl1_Load()", "GLPrinterView created.", DebugLogger.LogType.Secondary);
                frame.AddChildElement(printerView);
                frame.AddChildElement(libraryview);
                Form1.debugLogger.Add("glControl1_Load()", "Views added to background view.", DebugLogger.LogType.Secondary);
                model_loading_manager.Init(settingsManager, libraryview, printerView, messagebox, informationbox);
                Form1.debugLogger.Add("glControl1_Load()", "Model Loading Manager Initialized.", DebugLogger.LogType.Secondary);
                printer_status_dialog_organizer = new PrinterStatusDialogOrganizer(spooler_connection, model_loading_manager, settingsManager, this, m_gui_host, printerView, messagebox);
                Form1.debugLogger.Add("glControl1_Load()", "PrinterStatusDialogOrganizer Initialized.", DebugLogger.LogType.Secondary);
                spooler_connection.SpoolerStartUp(Form1.debugLogger);
                Form1.debugLogger.Add("glControl1_Load()", "spooler_connection.SpoolerStartUp() completed.", DebugLogger.LogType.Secondary);
                controlbar.UpdateSettings();
                Form1.debugLogger.Add("glControl1_Load()", "controlbar.UpdateSettings() completed.", DebugLogger.LogType.Secondary);
                if (settingsManager.CurrentAppearanceSettings.StartFullScreen)
                {
                    WindowState = FormWindowState.Maximized;
                }
                else
                {
                    WindowState = FormWindowState.Normal;
                }

                splashForm.Close();
                Form1.debugLogger.Add("glControl1_Load()", "splash form closed.", DebugLogger.LogType.Secondary);
                glControl1.MakeCurrent();
                glControl1.VSync = false;
                Form1.debugLogger.Add("glControl1_Load()", "glcontrol sync", DebugLogger.LogType.Secondary);
                if (SplashFormFirstRun.WasRunForTheFirstTime)
                {
                    var welcomeDialog = new WelcomeDialog(1209, messagebox);
                    welcomeDialog.Init(m_gui_host);
                    m_gui_host.GlobalChildDialog += welcomeDialog;
                }
                else
                {
                    messagebox.AllowMessages = true;
                }

                Form1.debugLogger.Add("glControl1_Load()", "Welcome Initialized", DebugLogger.LogType.Secondary);
                CheckFileAssociations();
                Form1.debugLogger.Add("glControl1_Load()", "File Associations Checked", DebugLogger.LogType.Secondary);
                var num = spooler_connection.PrintSpoolerClient.IsPrinting ? 0 : (!Program.runfirst_start ? 1 : 0);
                SoftwareUpdater.CheckForUpdate(false);
                Form1.debugLogger.Add("glControl1_Load()", "Checked for updates", DebugLogger.LogType.Secondary);
            }
            catch (Exception ex)
            {
                ExceptionForm.ShowExceptionForm(ex);
            }
            if (args.Length != 0)
            {
                model_loading_manager.LoadModelIntoPrinter(args[0]);
            }

            FileAssociationSingleInstance.OnNewInstance += new NewInstanceEvent(OnNewInstanceEvent);
        }
コード例 #19
0
 public FeaturePanel(int ID, GUIHost host, SpoolerConnection spooler_connection)
     : this(ID, host, spooler_connection, null)
 {
 }
コード例 #20
0
ファイル: SettingsDialogWidget.cs プロジェクト: ye-man/M3D
 public SettingsDialogWidget(int ID, GUIHost host, SettingsManager main_controller, PopupMessageBox messagebox, SpoolerConnection spooler_connection, Updater softwareUpdater)
     : base(ID, null)
 {
     settingsManager = main_controller;
     this.messagebox = messagebox;
     Init(host, spooler_connection, softwareUpdater);
 }
コード例 #21
0
ファイル: MainWindow.cs プロジェクト: ye-man/M3D
 private void CreateNozzlePage(GUIHost host, SpoolerConnection spooler_connection, PopupMessageBox messagebox)
 {
     m_pageNozzle = new NozzlePage(3, host, spooler_connection, messagebox);
     tab_frame.AddChildElement(m_pageNozzle);
     m_pageNozzle.Refresh();
 }
コード例 #22
0
ファイル: SettingsDialogWidget.cs プロジェクト: ye-man/M3D
 private void CreateManualControlsFrame(GUIHost host, SpoolerConnection spooler_connection, SettingsManager settingsManager)
 {
     manualControlsFrame = new ManualControlsFrame(host, spooler_connection, messagebox, settingsManager);
     tab_frame.AddChildElement(manualControlsFrame);
     manualControlsFrame.Refresh();
 }
コード例 #23
0
ファイル: SettingsDialogWidget.cs プロジェクト: ye-man/M3D
 private void CreateFilamentProfilesFrame(GUIHost host, SpoolerConnection spooler_connection)
 {
     filamentprofiles_page = new FilamentProfilePage(4, settingsManager, host, spooler_connection, messagebox);
     tab_frame.AddChildElement(filamentprofiles_page);
     filamentprofiles_page.Refresh();
 }
コード例 #24
0
 public ProFeaturesDialogData(SpoolerConnection spoolerConnection, PrinterObject printer)
 {
     this.spoolerConnection = spoolerConnection;
     this.printer           = printer;
 }
コード例 #25
0
ファイル: SettingsDialogWidget.cs プロジェクト: ye-man/M3D
        private void Init(GUIHost host, SpoolerConnection spooler_connection, Updater softwareUpdater)
        {
            this.host = host;
            Init(host, "guicontrols", 640f, 320f, 704f, 383f, 41, 8, 64, 37, 8, 64);
            SetSize(792, 356);
            var textWidget = new TextWidget(0);

            textWidget.SetPosition(50, 2);
            textWidget.SetSize(500, 35);
            textWidget.Text      = "Settings";
            textWidget.Alignment = QFontAlignment.Left;
            textWidget.Size      = FontSize.Large;
            textWidget.Color     = new Color4(0.5f, 0.5f, 0.5f, 1f);
            AddChildElement(textWidget);
            var yposition1 = 35;

            Sprite.pixel_perfect = true;
            CreateTabButton(2, "T_SettingsTab_UserInterfaceOptions", yposition1);
            var yposition2 = yposition1 + 64;

            CreateTabButton(5, "T_SettingsTab_Calibration", yposition2);
            var yposition3 = yposition2 + 64;

            CreateTabButton(3, "T_SettingsTab_ExpertControls", yposition3);
            var yposition4 = yposition3 + 64;

            CreateTabButton(4, "T_SettingsTab_FilamentOptions", yposition4);
            var yposition5 = yposition4 + 64;

            CreateTabButton(6, "  Pro/Micro+\n  Features", yposition5);
            CreateTabButton(7, "T_SettingsTab_About", yposition5 + 64);
            var buttonWidget = new ButtonWidget(8)
            {
                X = -40,
                Y = 4
            };

            buttonWidget.SetSize(32, 32);
            buttonWidget.Text          = "";
            buttonWidget.TextColor     = new Color4(0.5f, 0.5f, 0.5f, 1f);
            buttonWidget.TextDownColor = new Color4(1f, 1f, 1f, 1f);
            buttonWidget.TextOverColor = new Color4(0.161f, 0.79f, 0.95f, 1f);
            buttonWidget.Alignment     = QFontAlignment.Left;
            buttonWidget.Init(host, "guicontrols", 704f, 320f, 735f, 351f, 736f, 320f, 767f, 351f, 704f, 352f, 735f, 383f);
            buttonWidget.DontMove = true;
            buttonWidget.SetCallback(new ButtonCallback(MyButtonCallback));
            AddChildElement(buttonWidget);
            tab_frame = new Frame(9)
            {
                X = 191,
                Y = 35
            };
            AddChildElement(tab_frame);
            CreateAppearanceFrame(host, softwareUpdater, messagebox);
            CreateManualControlsFrame(host, spooler_connection, settingsManager);
            CreateFilamentProfilesFrame(host, spooler_connection);
            CreateProFeaturesFrame(host, spooler_connection);
            CreateCalibrationFrame(host, spooler_connection);
            CreateAboutFrame(host);
            about_frame.Visible  = true;
            about_frame.Enabled  = true;
            active_frame         = about_frame;
            Sprite.pixel_perfect = false;
            Visible = false;
        }
コード例 #26
0
        public ControlBar(Form1 form1, GUIHost host, SettingsManager settingsManager, PopupMessageBox messagebox, MessagePopUp infobox, SpoolerConnection spooler_connection, ModelLoadingManager model_loading_manager, Updater softwareUpdater)
            : base(0, null)
        {
            m_oSpoolerConnection   = spooler_connection;
            m_oSettingsManager     = settingsManager;
            m_oModelLoadingManager = model_loading_manager;
            m_GUIHost = host;
            spooler_connection.OnSelectedPrinterChanged += new SpoolerConnection.SelectedPrinterChangedCallback(OnSelectedPrinterChanged);
            Sprite.texture_height_pixels = 1024;
            Sprite.texture_width_pixels  = 1024;
            X             = 0;
            Y             = 0;
            RelativeWidth = 1f;
            Height        = 50;
            BGColor       = new Color4(0.913725f, 0.905882f, 0.9098f, 1f);
            Sprite.texture_height_pixels = 1024;
            Sprite.texture_width_pixels  = 1024;
            var x1 = 10;

            m_owidgetFilamentButton = new ButtonWidget(8)
            {
                Text          = "T_3DINK",
                Size          = FontSize.Large,
                TextColor     = new Color4(0.5f, 0.5f, 0.5f, 1f),
                TextOverColor = new Color4(0.4392157f, 0.8392157f, 0.9372549f, 1f),
                TextDownColor = new Color4(0.2f, 0.6078432f, 0.7098039f, 1f),
                Alignment     = QFontAlignment.Left
            };
            m_owidgetFilamentButton.SetSize(170, 50);
            m_owidgetFilamentButton.SetPosition(x1, 0);
            m_owidgetFilamentButton.SetCallback(new ButtonCallback(MyButtonCallback));
            m_owidgetFilamentButton.Init(host, "guicontrols", 0.0f, 6f, 157f, 57f, 0.0f, 70f, 157f, 121f, 0.0f, 134f, 157f, 185f);
            m_owidgetFilamentButton.SetGrowableWidth(2, 2, 160);
            m_owidgetFilamentButton.ToolTipMessage = host.Locale.T("T_TOOLTIP_3DINK");
            var x2 = x1 + m_owidgetFilamentButton.Width;

            m_owidgetAccessoriesButton = new ButtonWidget(13)
            {
                Text          = "T_ACCESSORIES",
                Size          = FontSize.Large,
                TextColor     = new Color4(0.5f, 0.5f, 0.5f, 1f),
                TextOverColor = new Color4(0.4392157f, 0.8392157f, 0.9372549f, 1f),
                TextDownColor = new Color4(0.2f, 0.6078432f, 0.7098039f, 1f),
                Alignment     = QFontAlignment.Justify
            };
            m_owidgetAccessoriesButton.SetPosition(x2, 8);
            m_owidgetAccessoriesButton.SetSize(200, 40);
            m_owidgetAccessoriesButton.SetCallback(new ButtonCallback(MyButtonCallback));
            m_owidgetAccessoriesButton.Init(host, "extendedcontrols3", 0.0f, 384f, 95f, 479f, 128f, 384f, 223f, 479f, 256f, 384f, 351f, 479f, 384f, 384f, 479f, 479f);
            m_owidgetAccessoriesButton.SetGrowableWidth(2, 2, 160);
            m_owidgetAccessoriesButton.ImageAreaWidth = 48;
            m_owidgetAccessoriesButton.ToolTipMessage = host.Locale.T("T_TOOLTIP_ACCESSORIES");
            var x3 = x2 + m_owidgetAccessoriesButton.Width;

            m_owidgetOpenmodelButton = new ButtonWidget(0)
            {
                Text          = "T_OPENFILE",
                Size          = FontSize.Large,
                TextColor     = new Color4(0.5f, 0.5f, 0.5f, 1f),
                TextOverColor = new Color4(0.4392157f, 0.8392157f, 0.9372549f, 1f),
                TextDownColor = new Color4(0.2f, 0.6078432f, 0.7098039f, 1f),
                Alignment     = QFontAlignment.Left
            };
            m_owidgetOpenmodelButton.SetPosition(x3, 0);
            m_owidgetOpenmodelButton.SetSize(200, 50);
            m_owidgetOpenmodelButton.SetCallback(new ButtonCallback(MyButtonCallback));
            m_owidgetOpenmodelButton.Init(host, "guicontrols", 352f, 8f, 511f, 51f, 352f, 72f, 511f, 115f, 352f, 136f, 511f, 179f);
            m_owidgetOpenmodelButton.SetGrowableWidth(2, 2, 160);
            m_owidgetOpenmodelButton.ToolTipMessage = host.Locale.T("T_TOOLTIP_OPENFILE");
            var num = x3 + m_owidgetOpenmodelButton.Width;

            m_owidgetHelpButton = new ButtonWidget(11)
            {
                Text          = "",
                Size          = FontSize.Large,
                TextColor     = new Color4(0.5f, 0.5f, 0.5f, 1f),
                TextOverColor = new Color4(0.4392157f, 0.8392157f, 0.9372549f, 1f),
                TextDownColor = new Color4(0.2f, 0.6078432f, 0.7098039f, 1f),
                Alignment     = QFontAlignment.Left
            };
            m_owidgetHelpButton.SetSize(52, 44);
            m_owidgetHelpButton.SetPosition(-m_owidgetHelpButton.Width, 3);
            m_owidgetHelpButton.SetCallback(new ButtonCallback(MyButtonCallback));
            m_owidgetHelpButton.Init(host, "extendedcontrols", 852f, 196f, 909f, 245f, 852f, 260f, 909f, 309f, 852f, 324f, 909f, 373f);
            m_owidgetHelpButton.SetGrowableWidth(2, 2, 160);
            m_owidgetHelpButton.ToolTipMessage = host.Locale.T("T_TOOLTIP_HELP");
            m_owidgetSettingsButton            = new ButtonWidget(1)
            {
                Text          = "",
                Size          = FontSize.Large,
                TextColor     = new Color4(0.5f, 0.5f, 0.5f, 1f),
                TextOverColor = new Color4(0.4392157f, 0.8392157f, 0.9372549f, 1f),
                TextDownColor = new Color4(0.2f, 0.6078432f, 0.7098039f, 1f),
                Alignment     = QFontAlignment.Left
            };
            m_owidgetSettingsButton.SetSize(58, 50);
            m_owidgetSettingsButton.SetPosition(-(m_owidgetSettingsButton.Width + m_owidgetHelpButton.Width), 0);
            m_owidgetSettingsButton.SetCallback(new ButtonCallback(MyButtonCallback));
            m_owidgetSettingsButton.Init(host, "guicontrols", 192f, 10f, 240f, 53f, 192f, 74f, 240f, 117f, 192f, 138f, 240f, 181f);
            m_owidgetSettingsButton.SetGrowableWidth(2, 2, 160);
            m_owidgetSettingsButton.ToolTipMessage = host.Locale.T("T_TOOLTIP_SETTINGS");
            m_owidgetPrinterButton = new ButtonWidget(12)
            {
                Text          = "NV-00-00-00-00-000-000",
                Size          = FontSize.Large,
                TextColor     = new Color4(0.5f, 0.5f, 0.5f, 1f),
                TextOverColor = new Color4(0.4392157f, 0.8392157f, 0.9372549f, 1f),
                TextDownColor = new Color4(0.2f, 0.6078432f, 0.7098039f, 1f),
                Alignment     = QFontAlignment.Justify
            };
            m_owidgetPrinterButton.SetSize(250, 33);
            m_owidgetPrinterButton.ImageAreaWidth = 55;
            m_owidgetPrinterButton.SetPosition(-(m_owidgetSettingsButton.Width + m_owidgetHelpButton.Width + m_owidgetPrinterButton.Width), 9);
            m_owidgetPrinterButton.SetCallback(new ButtonCallback(MyButtonCallback));
            m_owidgetPrinterButton.Init(host, "guicontrols", 448f, 650f, 525f, 693f, 608f, 650f, 685f, 693f, 768f, 650f, 845f, 693f);
            m_owidgetPrinterButton.ToolTipMessage = host.Locale.T("T_TOOLTIP_MULTIPRINTER");
            AddChildElement(m_owidgetPrinterButton);
            AddChildElement(m_owidgetFilamentButton);
            AddChildElement(m_owidgetAccessoriesButton);
            AddChildElement(m_owidgetOpenmodelButton);
            AddChildElement(m_owidgetSettingsButton);
            AddChildElement(m_owidgetHelpButton);
            loading_frame = new Frame(10);
            loading_frame.SetSize(160, 200);
            loading_frame.CenterHorizontallyInParent = true;
            loading_frame.CenterVerticallyInParent   = true;
            loading_frame.Visible = false;
            loading_progress      = new SpriteAnimationWidget(10);
            loading_progress.Init(host, "guicontrols", 0.0f, 768f, 767f, 1023f, 6, 2, 12, 200U);
            loading_progress.SetSize(160, 135);
            loading_progress.SetPosition(0, 0);
            loading_progress.Visible = true;
            loading_text             = new TextWidget(0)
            {
                Size = FontSize.VeryLarge
            };
            loading_text.SetPosition(0, 135);
            loading_text.SetSize(160, 65);
            loading_text.VAlignment = TextVerticalAlignment.Middle;
            loading_text.Alignment  = QFontAlignment.Centre;
            loading_text.Text       = "Loading....";
            loading_text.Color      = new Color4(byte.MaxValue, 70, 0, byte.MaxValue);
            loading_frame.AddChildElement(loading_text);
            loading_frame.AddChildElement(loading_progress);
            driversInstalling_frame = new XMLFrame();
            driversInstalling_frame.Init(host, Resources.driverInstallDetected, null);
            driversInstalling_frame.SetPosition(50, -50);
            driversInstalling_frame.SetSize(330, 48);
            driversInstalling_frame.Visible = false;
            m_GUIHost.AddControlElement(driversInstalling_frame);
            diagnostics = new TextWidget(7)
            {
                Text  = "",
                Size  = FontSize.Medium,
                Color = new Color4(0.4f, 0.4f, 0.4f, 1f)
            };
            diagnostics.SetPosition(-530, 0);
            diagnostics.Alignment = QFontAlignment.Left;
            diagnostics.SetSize(150, 50);
            diagnostics.Visible = true;
            AddChildElement(diagnostics);
            m_GUIHost.AddControlElement(this);
            m_GUIHost.AddControlElement(loading_frame);
            CreatePopUpDialogs(host, messagebox, infobox, spooler_connection, softwareUpdater);
            message_window       = infobox;
            Sprite.pixel_perfect = true;
            information          = new ButtonWidget(5)
            {
                Text = "",
                Size = FontSize.Medium
            };
            information.SetPosition(4, -36);
            information.SetSize(32, 32);
            information.SetCallback(new ButtonCallback(MyButtonCallback));
            information.Init(host, "guicontrols", 448f, 512f, 511f, 575f, 512f, 512f, 575f, 575f, 576f, 512f, 639f, 575f);
            information.ToolTipMessage = host.Locale.T("T_TOOLTIP_INFORMATION");
            m_GUIHost.AddControlElement(information);
            Sprite.pixel_perfect = false;
            DisableAccessories();
        }
コード例 #27
0
ファイル: MainWindow.cs プロジェクト: ye-man/M3D
        public MainWindow(int ID, GUIHost host, SettingsManager main_controller, PopupMessageBox messagebox, SpoolerConnection spooler_connection)
            : base(ID)
        {
            settingsManager = main_controller;
            this.messagebox = messagebox;
            this.host       = host;
            Init(host, "guicontrols", 640f, 320f, 704f, 383f, 41, 8, 64, 37, 8, 64);
            SetSize(792, 356);
            var textWidget = new TextWidget(0);

            textWidget.SetPosition(50, 2);
            textWidget.SetSize(500, 35);
            textWidget.Text      = "T_ACCESSORIES";
            textWidget.Alignment = QFontAlignment.Left;
            textWidget.Size      = FontSize.Large;
            textWidget.Color     = new Color4(0.5f, 0.5f, 0.5f, 1f);
            AddChildElement(textWidget);
            var buttonWidget = new ButtonWidget(1)
            {
                X = -40,
                Y = 4
            };

            buttonWidget.SetSize(32, 32);
            buttonWidget.Text          = "";
            buttonWidget.TextColor     = new Color4(0.5f, 0.5f, 0.5f, 1f);
            buttonWidget.TextDownColor = new Color4(1f, 1f, 1f, 1f);
            buttonWidget.TextOverColor = new Color4(0.161f, 0.79f, 0.95f, 1f);
            buttonWidget.Alignment     = QFontAlignment.Left;
            buttonWidget.Init(host, "guicontrols", 704f, 320f, 735f, 351f, 736f, 320f, 767f, 351f, 704f, 352f, 735f, 383f);
            buttonWidget.DontMove = true;
            buttonWidget.SetCallback(new ButtonCallback(MyButtonCallback));
            AddChildElement(buttonWidget);
            tab_frame = new Frame(2)
            {
                X                 = 210,
                Y                 = 45,
                RelativeWidth     = 1f,
                RelativeWidthAdj  = -220,
                RelativeHeight    = 1f,
                RelativeHeightAdj = -55
            };
            AddChildElement(tab_frame);
            m_oTabButtonsVerticalLayout = new ScrollableVerticalLayout();
            m_oTabButtonsVerticalLayout.Init(host);
            m_oTabButtonsVerticalLayout.SetSize(208, 200);
            m_oTabButtonsVerticalLayout.RelativeHeight    = 1f;
            m_oTabButtonsVerticalLayout.RelativeHeightAdj = -40;
            m_oTabButtonsVerticalLayout.Y            = 35;
            m_oTabButtonsVerticalLayout.X            = 0;
            m_oTabButtonsVerticalLayout.BorderWidth  = 0;
            m_oTabButtonsVerticalLayout.BorderHeight = 0;
            m_oTabButtonsVerticalLayout.layoutMode   = Layout.LayoutMode.ResizeLayoutToFitChildren;
            AddChildElement(m_oTabButtonsVerticalLayout);
            Sprite.pixel_perfect = true;
            ButtonWidget tabButton = CreateTabButton(3, "T_AccessoriesTab_Nozzle");

            m_oTabButtonsVerticalLayout.Refresh();
            Sprite.pixel_perfect = false;
            Visible = false;
            CreateNozzlePage(host, spooler_connection, messagebox);
            var num = 1;

            tabButton.Checked = num != 0;
        }
コード例 #28
0
 public static void Show(PopupMessageBox messagebox, SpoolerConnection spoolerConnection, PrinterObject printer)
 {
     messagebox.AddXMLMessageToQueue(new PopupMessageBox.MessageDataXML(Resources.FeaturesDialogFrame, new PopupMessageBox.XMLButtonCallback(FeaturesDialog.XMLButtonCallback), new ElementStandardDelegate(FeaturesDialog.XMLOnUpdateCallback), new PopupMessageBox.XMLOnShow(FeaturesDialog.XMLOnShow), new FeaturesDialog.ProFeaturesDialogData(spoolerConnection, printer)));
 }
コード例 #29
0
ファイル: SettingsDialogWidget.cs プロジェクト: ye-man/M3D
 private void CreateProFeaturesFrame(GUIHost host, SpoolerConnection spooler_connection)
 {
     proFeaturePanelFrame = new FeaturePanel(6, host, spooler_connection);
     tab_frame.AddChildElement(proFeaturePanelFrame);
     proFeaturePanelFrame.Refresh();
 }