Пример #1
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;
            }
        }
Пример #2
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;
        }
Пример #3
0
 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);
 }