コード例 #1
0
 public PrinterInfo()
 {
     con = Main.conn;
     InitializeComponent();
     RegMemory.RestoreWindowPos("printerInfoWindow", this);
     timer_Tick(null, null);
 }
コード例 #2
0
ファイル: JobStatus.cs プロジェクト: tojoshua/Repetier-Host
 public JobStatus()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("jobStatusWindow", this);
     translate();
     Main.main.languageChanged += translate;
 }
コード例 #3
0
 public SDCardUpload()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("sdcardUploadWindow", this);
     translate();
     Main.main.languageChanged += translate;
 }
コード例 #4
0
        public Trans(string folder)
        {
            string[]    lfiles  = Directory.GetFiles(folder, "*.xml");
            CultureInfo info    = CultureInfo.CurrentUICulture;
            string      deflang = info.TwoLetterISOLanguageName;
            //Console.WriteLine("Default language:" + deflang);
            string lastactive = RegMemory.GetString("lastLanguage", deflang + ".xml");

            translations = new SortedList <string, Translation>();
            foreach (string l in lfiles)
            {
                try
                {
                    //Console.WriteLine("Adding language " + l);
                    FileInfo    f         = new FileInfo(l);
                    string      shortname = f.Name;
                    Translation t         = new Translation(l, shortname);
                    if (shortname == "en.xml")
                    {
                        english = t;
                    }
                    if (shortname == lastactive)
                    {
                        active = t;
                    }
                    translations.Add(t.language, t);
                } catch {}
            }
            Trans.trans = this;
        }
コード例 #5
0
 public About()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("aboutWindow", this);
     textLicence.SelectionLength = 0;
     textLicence.SelectionStart  = 0;
 }
コード例 #6
0
 public TestGenerator()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("testGeneratorWindow", this);
     comboTestCase.SelectedIndex = 0;
     gen = Main.generator;
 }
コード例 #7
0
 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));
 }
コード例 #8
0
ファイル: Slic3r.cs プロジェクト: lanthan/Repetier-Host
 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;
             }
         }
     }
 }
コード例 #9
0
 public Skeinforge()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("skeinforgeWindow", this);
     repetierKey = Registry.CurrentUser.CreateSubKey("Software\\Repetier");
     regToForm();
 }
コード例 #10
0
        public PrintPanel()
        {
            InitializeComponent();
            con = Main.conn;
            ann = con.analyzer;
            con.eventConnectionChange += ConnectionChanged;
            ann.fanVoltage             = trackFanVoltage.Value;
            con.eventTempChange       += tempUpdate;
            //  ann.eventPosChanged += coordUpdate;
            ann.eventChange += analyzerChange;
            UpdateConStatus(false);
            textExtrudeSpeed.Text  = RegMemory.GetString("panelExtrudeSpeed", textExtrudeSpeed.Text);
            textExtrudeAmount.Text = RegMemory.GetString("panelExtrudeAmount", textExtrudeAmount.Text);
            textRetractAmount.Text = RegMemory.GetString("panelRetractAmount", textRetractAmount.Text);

            float volt = 100f * trackFanVoltage.Value / 255;

            labelVoltage.Text = Trans.T1("L_OUTPUT_PERCENT", volt.ToString("0.0")); //"Output " + volt.ToString("0.0") + "%";
            arrowButtonXMinus.PossibleValues = Custom.GetString("xyMoveDistances", arrowButtonXMinus.PossibleValues);
            arrowButtonXPlus.PossibleValues  = Custom.GetString("xyMoveDistances", arrowButtonXPlus.PossibleValues);
            arrowButtonYMinus.PossibleValues = Custom.GetString("xyMoveDistances", arrowButtonYMinus.PossibleValues);
            arrowButtonYPlus.PossibleValues  = Custom.GetString("xyMoveDistances", arrowButtonYPlus.PossibleValues);
            if (Custom.GetBool("noPowerControlButton", false))
            {
                switchPower.Visible = false;
            }
            timer.Start();
            if (Main.main != null)
            {
                translate();
                Main.main.languageChanged += translate;
            }
        }
コード例 #11
0
 public GlobalSettings()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("globalSettingsWindow", this);
     repetierKey = Registry.CurrentUser.CreateSubKey("Software\\Repetier");
     RegToForm();
 }
コード例 #12
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;
        }
コード例 #13
0
 /// <summary>
 /// Gets values from the registry and sets the text and checkboxes in the forms according to what was
 /// saved in the regestry.
 /// </summary>
 public void RegToForm()
 {
     Workdir = (string)repetierKey.GetValue("workdir", Workdir);
     checkLogfile.Checked = 1 == (int)repetierKey.GetValue("logEnabled", LogEnabled ? 1 : 0);
     checkDisableQualityReduction.Checked = 1 == (int)repetierKey.GetValue("disableQualityReduction", DisableQualityReduction ? 1 : 0);
     checkReduceToolbarSize.Checked       = 1 == (int)repetierKey.GetValue("reduceToolbarSize", ReduceToolbarSize ? 1 : 0);
     checkRedGreenSwitch.Checked          = 2 == RegMemory.GetInt("onOffImageOffset", 0);
 }
コード例 #14
0
 /// <summary>
 /// Saves the values in the form to the registry
 /// </summary>
 public void FormToReg()
 {
     repetierKey.SetValue("workdir", Workdir);
     repetierKey.SetValue("logEnabled", LogEnabled ? 1 : 0);
     repetierKey.SetValue("disableQualityReduction", DisableQualityReduction ? 1 : 0);
     repetierKey.SetValue("reduceToolbarSize", ReduceToolbarSize ? 1 : 0);
     RegMemory.SetInt("onOffImageOffset", checkRedGreenSwitch.Checked ? 2 : 0);
 }
コード例 #15
0
 public GlobalSettings()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("globalSettingsWindow", this);
     repetierKey = Custom.BaseKey; // Registry.CurrentUser.CreateSubKey("SOFTWARE\\Repetier");
     RegToForm();
     translate();
     Main.main.languageChanged += translate;
 }
コード例 #16
0
ファイル: PrinterInfo.cs プロジェクト: rdacomp/Repetier-Host2
 public PrinterInfo()
 {
     con = Main.conn;
     InitializeComponent();
     RegMemory.RestoreWindowPos("printerInfoWindow", this);
     timer_Tick(null, null);
     translate();
     Main.main.languageChanged += translate;
 }
コード例 #17
0
ファイル: About.cs プロジェクト: rdacomp/Repetier-Host2
 public About()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("aboutWindow", this);
     textLicence.SelectionLength = 0;
     textLicence.SelectionStart  = 0;
     translate();
     Main.main.languageChanged += translate;
 }
コード例 #18
0
 public EEPROMMarlin()
 {
     InitializeComponent();
     RegMemory.RestoreWindowPos("eepromMarlinWindow", this);
     storage             = Main.conn.eepromm;
     storage.eventAdded += newline;
     translate();
     Main.main.languageChanged += translate;
     newline(Main.conn.eepromm);
 }
コード例 #19
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.
        }
コード例 #20
0
ファイル: SoundConfig.cs プロジェクト: gmorkvenas/pimaker
 public void saveSettings()
 {
     RegMemory.SetString("soundPrintFinished", filePrintFinished);
     RegMemory.SetString("soundPrintPaused", filePrintPaused);
     RegMemory.SetString("soundError", fileError);
     RegMemory.SetString("soundSoundCommand", fileSoundCommand);
     RegMemory.SetBool("soundPrintFinishedEnabled", checkPrintFinished.Checked);
     RegMemory.SetBool("soundPrintPausedEnabled", checkPrintPaused.Checked);
     RegMemory.SetBool("soundErrorEnabled", checkError.Checked);
     RegMemory.SetBool("soundSoundCommandEnabled", checkSoundCommand.Checked);
 }
コード例 #21
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;
 }
コード例 #22
0
        private void Main_FormClosing(object sender, FormClosingEventArgs e)
        {
            conn.close();
            RegMemory.StoreWindowPos("mainWindow", this, true, true);
            RegMemory.SetInt("logSplitterDistance", splitLog.SplitterDistance);
            RegMemory.SetBool("logShow", toolShowLog.Checked);

            if (previewThread != null)
            {
                previewThread.Join();
            }
            conn.Destroy();
        }
コード例 #23
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;
 }
コード例 #24
0
 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();
 }
コード例 #25
0
ファイル: SoundConfig.cs プロジェクト: gmorkvenas/pimaker
 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;
 }
コード例 #26
0
 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);
 }
コード例 #27
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();
 }
コード例 #28
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;
 }
コード例 #29
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();
        }
コード例 #30
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();
 }