예제 #1
0
 public PrinterInfo()
 {
     con = Main.conn;
     InitializeComponent();
     RegMemory.RestoreWindowPos("printerInfoWindow", this);
     timer_Tick(null, null);
 }
예제 #2
0
 public JobStatus()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("jobStatusWindow", this);
     translate();
     Main.main.languageChanged += translate;
 }
예제 #3
0
 public Slic3r()
 {
     InitializeComponent();
     if (Main.IsMono)
     {
         panelCloseButtons.Location = new Point(panelCloseButtons.Location.X, panelCloseButtons.Location.Y - 14);
     }
     comboFillPattern.SelectedIndex      = 0;
     comboSolidFillPattern.SelectedIndex = 0;
     RegMemory.RestoreWindowPos("slic3rWindow", this);
     rconfigs = Main.main.repetierKey.CreateSubKey("slic3r");
     foreach (string s in rconfigs.GetSubKeyNames())
     {
         comboConfig.Items.Add(s);
     }
     config = (string)rconfigs.GetValue("currentConfig", "default");
     if (comboConfig.Items.Count == 0)
     {
         comboConfig.Items.Add("default");
         comboConfig.SelectedIndex = 0;
     }
     else
     {
         for (int i = 0; i < comboConfig.Items.Count; i++)
         {
             if (comboConfig.Items[i].ToString() == config)
             {
                 comboConfig.SelectedIndex = i;
                 break;
             }
         }
     }
 }
예제 #4
0
 public SDCardUpload()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("sdcardUploadWindow", this);
     translate();
     Main.main.languageChanged += translate;
 }
예제 #5
0
 public TestGenerator()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("testGeneratorWindow", this);
     comboTestCase.SelectedIndex = 0;
     gen = Main.generator;
 }
예제 #6
0
 public Skeinforge()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("skeinforgeWindow", this);
     repetierKey = Registry.CurrentUser.CreateSubKey("Software\\Repetier");
     regToForm();
 }
예제 #7
0
 public About()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("aboutWindow", this);
     textLicence.SelectionLength = 0;
     textLicence.SelectionStart  = 0;
 }
예제 #8
0
 public GlobalSettings()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("globalSettingsWindow", this);
     repetierKey = Registry.CurrentUser.CreateSubKey("Software\\Repetier");
     RegToForm();
 }
예제 #9
0
        public FormTempMonitor()
        {
            InitializeComponent();
            RegMemory.RestoreWindowPos("tempMonitorWindow", this);
            this.SuspendLayout();
            comboMonitor.SelectedIndex = 0;
            source                     = new DataSource();
            source.AutoScaleY          = true;
            source.AutoScaleX          = false;
            source.Name                = "Temperature";
            source.OnRenderXAxisLabel += RenderXLabel;
            source.OnRenderYAxisLabel += RenderYLabel;
            source.SetDisplayRangeY(0, 300);
            source.SetGridDistanceY(10);
            source.SetGridOriginY(20);
            source.GraphColor = Color.Red;

            target                     = new DataSource();
            target.AutoScaleY          = true;
            target.AutoScaleX          = false;
            target.Name                = "Target temp.";
            target.OnRenderXAxisLabel += RenderXLabel;
            target.OnRenderYAxisLabel += RenderYLabel;
            target.SetDisplayRangeY(0, 300);
            target.SetGridDistanceY(10);
            target.SetGridOriginY(20);
            target.GraphColor = Color.Blue;
            target.Active     = false; // only show when requested

            output                     = new DataSource();
            output.AutoScaleY          = true;
            output.AutoScaleX          = false;
            output.Name                = "Output";
            output.OnRenderXAxisLabel += RenderXLabel;
            output.OnRenderYAxisLabel += RenderYLabel;
            output.SetDisplayRangeY(0, 255);
            output.SetGridDistanceY(50);
            output.SetGridOriginY(0);
            output.GraphColor = Color.Green;

            /* for (int i = 0; i < 1500; i++)
             *           {
             *               source.Add(i, 23f+180f*(1-300/(1+i))+20f*(float)Math.Sin(0.1f*i));
             *           }*/
            plotter.DataSources.Add(source);
            plotter.DataSources.Add(target);
            plotter.DataSources.Add(output);
            plotter.SetDisplayRangeX(0, 300);
            plotter.SetGridDistanceX(15);

            plotter.PanelLayout        = PlotterGraphPaneEx.LayoutMode.VERTICAL_ARRANGED;
            plotter.BackgroundColorTop = Color.Black;
            plotter.BackgroundColorBot = Color.Black;
            plotter.SolidGridColor     = Color.DarkGray;
            plotter.DashedGridColor    = Color.DarkGray;

            this.ResumeLayout();
            Main.conn.eventTempMonitor += OnTempMonitor;
        }
예제 #10
0
 public About()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("aboutWindow", this);
     textLicence.SelectionLength = 0;
     textLicence.SelectionStart  = 0;
     translate();
     Main.main.languageChanged += translate;
 }
예제 #11
0
 public PrinterInfo()
 {
     con = Main.conn;
     InitializeComponent();
     RegMemory.RestoreWindowPos("printerInfoWindow", this);
     timer_Tick(null, null);
     translate();
     Main.main.languageChanged += translate;
 }
예제 #12
0
 public GlobalSettings()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("globalSettingsWindow", this);
     repetierKey = Custom.BaseKey; // Registry.CurrentUser.CreateSubKey("SOFTWARE\\Repetier");
     RegToForm();
     translate();
     Main.main.languageChanged += translate;
 }
예제 #13
0
 public EEPROMMarlin()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("eepromMarlinWindow", this);
     storage             = Main.conn.eepromm;
     storage.eventAdded += newline;
     translate();
     Main.main.languageChanged += translate;
     newline(Main.conn.eepromm);
 }
예제 #14
0
        /// <summary>
        /// Initialize the class by getting Registry key related to global settings and translating
        /// </summary>
        public GlobalSettings()
        {
            InitializeComponent();

            RegMemory.RestoreWindowPos("globalSettingsWindow", this);
            this.Size   = FormSize;
            repetierKey = Custom.BaseKey; // Registry.CurrentUser.CreateSubKey("SOFTWARE\\Repetier");
            RegToForm();
            translate();
            Main.main.languageChanged += translate; // Register the translate function to the list of what to run if the language changes in Main.
        }
예제 #15
0
 public EEPROMRepetier()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("eepromWindow", this);
     storage             = Main.conn.eeprom;
     storage.eventAdded += newline;
     grid.Columns.Add("Description", "Description");
     grid.Columns[0].DataPropertyName = "Description";
     grid.Columns[0].ReadOnly         = true;
     grid.Columns.Add("Value", "Value");
     grid.Columns[1].DataPropertyName = "Value";
     grid.DataSource = data;
 }
예제 #16
0
 public EEPROMRepetier()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("eepromWindow", this);
     storage = Main.connection.eeprom;
     grid.Columns.Add("Description", "Description");
     grid.Columns[0].DataPropertyName = "Description";
     grid.Columns[0].ReadOnly         = true;
     grid.Columns.Add("Value", "Value");
     grid.Columns[1].DataPropertyName = "Value";
     grid.DataSource = data;
     translate();
     Main.main.languageChanged += translate;
 }
 public FormPrinterSettings()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("printerSettingsWindow", this);
     repetierKey = Custom.BaseKey; // Registry.CurrentUser.CreateSubKey("SOFTWARE\\Repetier");
     printerKey  = repetierKey.CreateSubKey("printer");
     con         = Main.conn;
     conToForm();
     comboPrinter.Items.Clear();
     foreach (string s in printerKey.GetSubKeyNames())
     {
         comboPrinter.Items.Add(s);
     }
     con.printerName = (string)repetierKey.GetValue("currentPrinter", "default");
     load(con.printerName);
     formToCon();
     UpdateDimensions();
     if (Custom.GetBool("simpleConnectionsConfig", false))
     {
         comboParity.Visible   = false;
         comboStopbits.Visible = false;
         labelStopbits.Visible = false;
         labelParity.Visible   = false;
     }
     if (Custom.GetBool("noDisposeArea", false))
     {
         labelDumpAreaDepth.Visible = false;
         labelDumpAreaFront.Visible = false;
         labelDumpAreaLeft.Visible  = false;
         labelDumpAreaWidth.Visible = false;
         labelDumpUnit1.Visible     = false;
         labelDumpUnit2.Visible     = false;
         labelDumpUnit3.Visible     = false;
         labelDumpUnit4.Visible     = false;
         checkHasDumpArea.Visible   = false;
         textDumpAreaDepth.Visible  = false;
         textDumpAreaFront.Visible  = false;
         textDumpAreaLeft.Visible   = false;
         textDumpAreaWidth.Visible  = false;
     }
     if (Custom.GetBool("noMaxHoming", false))
     {
         checkHomeXMax.Visible = false;
         checkHomeYMax.Visible = false;
         checkHomeZMax.Visible = false;
     }
     Main.main.languageChanged += translate;
     translate();
 }
예제 #18
0
 public float openGLVersion = 1.0f; // Version for feature detection
 public ThreeDSettings()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("threeDSettingsWindow", this);
     if (Main.IsMono)
     {
         buttonOK.Location = new Point(buttonOK.Location.X, buttonOK.Location.Y - 10);
     }
     comboDrawMethod.SelectedIndex = 0;
     repetierKey = Registry.CurrentUser.CreateSubKey("Software\\Repetier");
     threedKey   = repetierKey.CreateSubKey("3D");
     if (comboFilamentVisualization.SelectedIndex < 0)
     {
         comboFilamentVisualization.SelectedIndex = 1;
     }
     RegistryToForm();
 }
예제 #19
0
 public Skeinforge()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("skeinforgeWindow", this);
     repetierKey = Custom.BaseKey; // Registry.CurrentUser.CreateSubKey("SOFTWARE\\Repetier");
     regToForm();
     translate();
     if (BasicConfiguration.basicConf.SkeinforgeProfileDir.IndexOf("sfact") >= 0)
     {
         name = "SFACT";
     }
     else
     {
         name = "Skeinforge";
     }
     Main.main.languageChanged += translate;
 }
예제 #20
0
        public FormPrinterSettings()
        {
            ps = this;
            InitializeComponent();
            addConnector(new SerialConnector());
            addConnector(new VirtualPrinterConnector());
            RegMemory.RestoreWindowPos("printerSettingsWindow", this);
            repetierKey = Custom.BaseKey; // Registry.CurrentUser.CreateSubKey("SOFTWARE\\Repetier");
            printerKey  = repetierKey.CreateSubKey("printer");
            con         = Main.conn;
            conToForm();
            comboPrinter.Items.Clear();

            /*bindingConnectors.DataSource = connectors;
             * comboConnector.DataSource = bindingConnectors.DataSource;
             * comboConnector.DisplayMember = "Name";
             * comboConnector.ValueMember = "Id";*/
            foreach (string s in printerKey.GetSubKeyNames())
            {
                comboPrinter.Items.Add(s);
            }
            con.printerName = (string)repetierKey.GetValue("currentPrinter", "default");
            load(con.printerName);
            formToCon();
            UpdateDimensions();

            /* if (Custom.GetBool("noDisposeArea", false))
             * {
             *   labelDumpAreaDepth.Visible = false;
             *   labelDumpAreaFront.Visible = false;
             *   labelDumpAreaLeft.Visible = false;
             *   labelDumpAreaWidth.Visible = false;
             *   labelDumpUnit1.Visible = false;
             *   labelDumpUnit2.Visible = false;
             *   labelDumpUnit3.Visible = false;
             *   labelDumpUnit4.Visible = false;
             *   checkHasDumpArea.Visible = false;
             *   textDumpAreaDepth.Visible = false;
             *   textDumpAreaFront.Visible = false;
             *   textDumpAreaLeft.Visible = false;
             *   textDumpAreaWidth.Visible = false;
             * }*/
            Main.main.languageChanged += translate;
            translate();
        }
예제 #21
0
 public FormPrinterSettings()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("printerSettingsWindow", this);
     repetierKey = Registry.CurrentUser.CreateSubKey("Software\\Repetier");
     printerKey  = repetierKey.CreateSubKey("printer");
     con         = Main.conn;
     conToForm();
     comboPrinter.Items.Clear();
     foreach (string s in printerKey.GetSubKeyNames())
     {
         comboPrinter.Items.Add(s);
     }
     con.printerName = (string)repetierKey.GetValue("currentPrinter", "default");
     load(con.printerName);
     formToCon();
     UpdateDimensions();
 }
예제 #22
0
 public GlobalSettings()
 {
     InitializeComponent();
     if (Main.IsMono)
     {
         buttonAssociate.Enabled = false;
         checkG.Enabled          = false;
         checkGCO.Enabled        = false;
         checkGCode.Enabled      = false;
         checkSTL.Enabled        = false;
         checkOBJ.Enabled        = false;
         checkNC.Enabled         = false;
     }
     RegMemory.RestoreWindowPos("globalSettingsWindow", this);
     repetierKey = Custom.BaseKey; // Registry.CurrentUser.CreateSubKey("SOFTWARE\\Repetier");
     RegToForm();
     translate();
     Main.main.languageChanged += translate;
 }
예제 #23
0
 public float openGLVersion = 1.0f; // Version for feature detection
 public ThreeDSettings()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("threeDSettingsWindow", this);
     if (Main.IsMono)
     {
         buttonOK.Location = new Point(buttonOK.Location.X, buttonOK.Location.Y - 10);
     }
     comboDrawMethod.SelectedIndex = 0;
     repetierKey = Custom.BaseKey; //  Registry.CurrentUser.CreateSubKey("SOFTWARE\\Repetier");
     threedKey   = repetierKey.CreateSubKey("3D");
     if (comboFilamentVisualization.SelectedIndex < 0)
     {
         comboFilamentVisualization.SelectedIndex = 1;
     }
     RegistryToForm();
     translate();
     Main.main.languageChanged += translate;
 }
예제 #24
0
 public SDCardUpload()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("sdcardUploadWindow", this);
 }
예제 #25
0
 public JobStatus()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("jobStatusWindow", this);
 }
예제 #26
0
 public SlicingParameter()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("slicingParameterWindow", this);
 }
예제 #27
0
 public SDCard()
 {
     ana += analyzer;
     InitializeComponent();
     RegMemory.RestoreWindowPos("sdcardWindow", this);
 }
예제 #28
0
        public Main()
        {
            executeHostCall = new executeHostCommandDelegate(this.executeHostCommand);
            repetierKey     = Registry.CurrentUser.CreateSubKey("Software\\Repetier");
            repetierKey.SetValue("installPath", Application.StartupPath);
            if (Path.DirectorySeparatorChar != '\\' && IsRunningOnMac())
            {
                IsMac = true;
            }

            /*String[] parms = Environment.GetCommandLineArgs();
             * string lastcom = "";
             * foreach (string s in parms)
             * {
             *  if (lastcom == "-home")
             *  {
             *      repetierKey.SetValue("installPath",s);
             *      lastcom = "";
             *      continue;
             *  }
             *  if (s == "-macosx") IsMac = true;
             *  lastcom = s;
             * }*/
            main            = this;
            generator       = new GCodeGenerator();
            globalSettings  = new GlobalSettings();
            conn            = new PrinterConnection();
            printerSettings = new FormPrinterSettings();
            threeDSettings  = new ThreeDSettings();
            InitializeComponent();
            RegMemory.RestoreWindowPos("mainWindow", this);
            if (WindowState == FormWindowState.Maximized)
            {
                Application.DoEvents();
            }
            splitLog.SplitterDistance = RegMemory.GetInt("logSplitterDistance", splitLog.SplitterDistance);
            if (IsMono)
            {
                if (!IsMac)
                {
                    splitContainerPrinterGraphic.SplitterDistance += 52;
                    foreach (ToolStripItem m in menu.Items)
                    {
                        m.Text = m.Text.Replace("&", null);
                    }
                }
                if (IsMac)
                {
                    /*Application.Events.Quit += delegate (object sender, ApplicationEventArgs e) {
                     *      Application.Quit ();
                     *      e.Handled = true;
                     * };
                     *
                     * ApplicationEvents.Reopen += delegate (object sender, ApplicationEventArgs e) {
                     *      WindowState = FormWindowState.Normal;
                     *      e.Handled = true;
                     * };*/

                    MinimumSize              = new Size(500, 640);
                    tab.MinimumSize          = new Size(500, 500);
                    splitLog.Panel1MinSize   = 520;
                    splitLog.Panel2MinSize   = 100;
                    splitLog.IsSplitterFixed = true;
                    splitJob.IsSplitterFixed = true;
                    //splitContainerPrinterGraphic.SplitterDistance -= 52;
                    splitLog.SplitterDistance = splitLog.Height - 100;
                }
            }
            toolShowLog.Checked         = RegMemory.GetBool("logShow", true);
            conn.eventConnectionChange += OnPrinterConnectionChange;
            conn.eventPrinterAction    += OnPrinterAction;
            conn.eventJobProgress      += OnJobProgress;
            printPanel      = new PrintPanel();
            printPanel.Dock = DockStyle.Fill;
            splitContainerPrinterGraphic.Panel1.Controls.Add(printPanel);
            printerSettings.formToCon();
            logView      = new LogView();
            logView.Dock = DockStyle.Fill;
            splitLog.Panel2.Controls.Add(logView);
            skeinforge = new Skeinforge();
            PrinterChanged(printerSettings.currentPrinterKey, true);
            printerSettings.eventPrinterChanged += PrinterChanged;
            // GCode print preview
            printPreview      = new ThreeDControl();
            printPreview.Dock = DockStyle.Fill;
            splitContainerPrinterGraphic.Panel2.Controls.Add(printPreview);
            printPreview.SetEditor(false);
            printPreview.AutoUpdateable = true;
            printVisual          = new GCodeVisual(conn.analyzer);
            printVisual.liveView = true;
            printPreview.models.AddLast(printVisual);
            basicTitle      = Text;
            jobPreview      = new ThreeDControl();
            jobPreview.Dock = DockStyle.Fill;
            splitJob.Panel2.Controls.Add(jobPreview);
            jobPreview.SetEditor(false);
            jobPreview.models.AddLast(jobVisual);
            editor.contentChangedEvent += JobPreview;
            editor.commands             = new Commands();
            editor.commands.Read("default", "en");
            UpdateHistory();
            UpdateConnections();
            Main.slic3r = new Slic3r();
            slicer      = new Slicer();
            if (IsMac)
            {
                tabGCode.Controls.Remove(splitJob);
                tabPrint.Controls.Remove(splitContainerPrinterGraphic);
            }
        }