public override void RefreshUI() { this.Title = global::CII.LAR.Properties.Resources.StrSetting; foreach (var ctrl in this.Controls) { MaterialGroupBox mgb = ctrl as MaterialGroupBox; if (mgb != null) { resources.ApplyResources(mgb, mgb.Name); foreach (var subCtrl in mgb.Controls) { MaterialLabel mlbl = subCtrl as MaterialLabel; if (mlbl != null) { resources.ApplyResources(mlbl, mlbl.Name); } MaterialRoundButton mrb = subCtrl as MaterialRoundButton; if (mrb != null) { if (mrb.Name == "btnSimulator") { continue; } resources.ApplyResources(mrb, mrb.Name); } } } } this.cmbLaser.Items.Clear(); this.cmbLaser.Items.AddRange(new object[] { Properties.Resources.StrSingleHole, Properties.Resources.StrMultiHole }); cmbLaser.SelectedIndex = Program.EntryForm.LaserType == LaserType.SaturnFixed ? 0 : 1; this.btnSimulator.Text = simulatorOpen ? CII.LAR.Properties.Resources.StrCloseSimulator : CII.LAR.Properties.Resources.StrOpenSimulator; this.lblCameraStatus.Text = string.IsNullOrEmpty(Program.SysConfig.DeviceName) ? Properties.Resources.StrVideoNoAvailable : Program.SysConfig.DeviceName; this.Invalidate(); }
public virtual void RefreshUI() { if (resources == null) { return; } foreach (var item in this.Controls) { MaterialGroupBox mgb = item as MaterialGroupBox; if (mgb != null) { resources.ApplyResources(mgb, mgb.Name); foreach (var subItem in mgb.Controls) { MaterialRoundButton subMrb = subItem as MaterialRoundButton; if (subMrb != null) { resources.ApplyResources(subMrb, subMrb.Name); } MaterialLabel SubMl = subItem as MaterialLabel; if (SubMl != null) { resources.ApplyResources(SubMl, SubMl.Name); } } } MaterialRoundButton mrb = item as MaterialRoundButton; if (mrb != null) { resources.ApplyResources(mrb, mrb.Name); } MaterialLabel ml = item as MaterialLabel; if (ml != null) { resources.ApplyResources(ml, ml.Name); } } }