public void setupColor() { CurrentZoomLevel = RegMemory.GetInt("tempZoomLevel", 15); AvgPeriod = RegMemory.GetInt("tempAverageSeconds", 120); ShowExtruder = RegMemory.GetBool("tempShowExtruder", true); ShowAverage = RegMemory.GetBool("tempShowAverage", true); ShowBed = RegMemory.GetBool("tempShowBed", true); Autoscroll = RegMemory.GetBool("tempAutoscroll", true); ShowOutput = RegMemory.GetBool("tempShowOutput", true); ShowTarget = RegMemory.GetBool(@"tempShowTarget", true); extruderWidth = RegMemory.GetDouble("tempExtruderWidth", 2); avgExtruderWidth = RegMemory.GetDouble("tempAvgExtruderWidth", 7); targetExtruderWidth = RegMemory.GetDouble("tempTargetExtruderWidth", 1); bedWidth = RegMemory.GetDouble("tempBedWidth", 2); avgBedWidth = RegMemory.GetDouble("tempAvgBedWidth", 7); targetBedWidth = RegMemory.GetDouble("tempTargetBedWidth", 1); avgOutputWidth = RegMemory.GetDouble("tempAvgOutputWidth", 2); backgroundColor = RegMemory.GetColor("tempBackgroundColor", Color.Black); gridColor = RegMemory.GetColor("tempGridColor", Color.FromArgb(255, 0, 70, 0)); axisColor = RegMemory.GetColor("tempAxisColor", Color.FromArgb(255, 255, 255, 255)); fontColor = RegMemory.GetColor("tempFontColor", Color.FromArgb(255, 229, 229, 229)); extruderColor = RegMemory.GetColor("tempExtruderColor", Color.FromArgb(255, 255, 2, 61)); avgExtruderColor = RegMemory.GetColor("tempAvgExtruderColor", Color.FromArgb(178, 222, 114, 0)); bedColor = RegMemory.GetColor("tempBedColor", Color.FromArgb(255, 0, 208, 210)); avgBedColor = RegMemory.GetColor("tempAvgBedColor", Color.FromArgb(178, 0, 122, 165)); targetExtruderColor = RegMemory.GetColor("tempTargetExtruderColor", Color.FromArgb(255, 153, 102, 204)); targetBedColor = RegMemory.GetColor("tempTargetBedColor", Color.FromArgb(255, 153, 102, 204)); outputColor = RegMemory.GetColor("tempOutputColor", Color.FromArgb(178, 13, 128, 15)); avgOutputColor = RegMemory.GetColor("tempAvgOutputColor", Color.FromArgb(255, 0, 128, 255)); }
public SoundConfig() { InitializeComponent(); config = this; filePrintFinished = RegMemory.GetString("soundPrintFinished", filePrintFinished); filePrintPaused = RegMemory.GetString("soundPrintPaused", filePrintPaused); fileError = RegMemory.GetString("soundError", fileError); fileSoundCommand = RegMemory.GetString("soundSoundCommand", fileSoundCommand); checkPrintFinished.Checked = RegMemory.GetBool("soundPrintFinishedEnabled", checkPrintFinished.Checked); checkPrintPaused.Checked = RegMemory.GetBool("soundPrintPausedEnabled", checkPrintPaused.Checked); checkError.Checked = RegMemory.GetBool("soundErrorEnabled", checkError.Checked); checkSoundCommand.Checked = RegMemory.GetBool("soundSoundCommandEnabled", checkSoundCommand.Checked); translate(); Main.main.languageChanged += translate; }
public BasicConfiguration() { slic3rConfigDir = RegMemory.GetString("slic3rConfigDir", slic3rConfigDir); slic3rExecutable = RegMemory.GetString("slic3rExecutable", slic3rExecutable); slic3rPrintSettings = RegMemory.GetString("slic3rPrintSettings", slic3rPrintSettings); slic3rPrinterSettings = RegMemory.GetString("slic3rPrinterSettings", slic3rPrinterSettings); slic3rFilamentSettings = RegMemory.GetString("slic3rFilamentSettings", slic3rFilamentSettings); slic3rFilament2Settings = RegMemory.GetString("slic3rFilament2Settings", slic3rFilament2Settings); slic3rFilament3Settings = RegMemory.GetString("slic3rFilament3Settings", slic3rFilament3Settings); skeinforgeProfile = RegMemory.GetString("skeinforgeProfile", skeinforgeProfile); skeinforgeProfileDir = RegMemory.GetString("skeinforgeProfileDir", skeinforgeProfileDir); externalSlic3rPath = RegMemory.GetString("externalSlic3rPath", externalSlic3rPath); externalSlic3rIniFile = RegMemory.GetString("externalSlic3rIniFile", externalSlic3rIniFile); internalSlic3rUseBundledVersion = RegMemory.GetBool("internalSlic3rUseBundledVersion", internalSlic3rUseBundledVersion); }
public SlicerPanel() { InitializeComponent(); //UpdateSelection(); if (Main.main != null) { Main.main.languageChanged += translate; translate(); if (Custom.GetBool("reverseSlicerOrder", false)) { //Controls.Remove(panelSlic3rPos); //Controls.Remove(panelTop); //Controls.Remove(panelSkeinforgePos); Controls.Add(panelSlic3rPos); // Controls.Add(panelSkeinforgePos); //Controls.Add(panelTop); } if (Custom.GetBool("removeSkeinforge", false)) { groupSkeinforge.Visible = false; switchSlic3rActive.On = true; switchSlic3rActive.Visible = false; } if (RegMemory.GetBool("generateSupportMaterial", false)) { this.generateSupportCheckbox.Checked = true; Main.main.withSupportsToolStripMenuItem1.Checked = true; } if (RegMemory.GetBool("generateRaft", false)) { this.generateRaftCheckbox.Checked = true; Main.main.withRaftToolStripMenuItem1.Checked = true; } mainBindingSource.DataSource = Main.printerModel; } }
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); } }