public frmActorChooser(String [] actors, Localizer localizer) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent // localizer.LocalizeControls(this); lbActors.Items.Clear(); foreach(String actor in actors) { lbActors.Items.Add(actor); } if(lbActors.Items.Count == 0) { btnOK.Enabled = false; } else { btnOK.Enabled = true; lbActors.SelectedIndex = 0; } }
public frmNameListChooser(String[] names, Localizer localizer) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent // localizer.LocalizeControls(this); lbNames.Items.Clear(); foreach (String name in names) { lbNames.Items.Add(name); } if (lbNames.Items.Count == 0) { btnOK.Enabled = false; } else { btnOK.Enabled = true; lbNames.SelectedIndex = 0; } }
public frmHistoryNotes(Localizer localizer) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent // localizer.LocalizeControls(this); }
public frmNameChanger(Localizer localizer, string elementType) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent // localizer.LocalizeControls(this); this.Text += ": " + elementType; }
public frmReorder(Localizer localizer, string prefix) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent // this.prefix = prefix; localizer.LocalizeControls(this); btnMoveDown.Enabled = false; btnMoveUp.Enabled = false; }
public frmTabView(frmMain parent, object element, SepararatorCollection separators, HighLightDescriptorCollection hdc, Localizer localizer) { this.parent = parent; this.currentElement = element; this.localizer = localizer; this.hdc = hdc; this.separators = separators; InitializeComponent(); localizer.LocalizeControls(this); this.ImeMode = ImeMode.On; }
public frmModelBrowser( frmMain parent, ImageList imgList, ContextMenu ctxMenu, Localizer localizer) { this.parent = parent; InitializeComponent(); tvModelBrowser.ImageList = imgList; tvModelBrowser.ContextMenu = ctxMenu; // Create handler for treeview node auto expand tmrNodeAutoExpand.Tick += new EventHandler(OnNodeAutoExpandTest); tmrNodeAutoExpand.Interval = 750; tmrNodeAutoExpand.Enabled = false; localizer.LocalizeControls(this); this.TabText = this.Text; this.ImeMode = ImeMode.On; }
public frmOptions(ApplicationSettings appSettings, Localizer localizer) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent // XmlDocument locals = new XmlDocument(); try { locals.Load(appSettings.LanguagesFilePath + Path.DirectorySeparatorChar + "Localization_list.xml"); } catch(Exception) { MessageBox.Show( this, "Cannot load the localization list file!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } try { XmlNode localsNode = locals.SelectSingleNode("//Localizations"); foreach(XmlNode node in localsNode.ChildNodes) { if(node.NodeType == XmlNodeType.Element && node.Name == "Localization") { if(node.Attributes["Description"] != null && node.Attributes["Country"] != null && node.Attributes["RefCode"] != null) { ListViewItem lvi = new ListViewItem(); lvi.Text = node.Attributes["Description"].Value; lvi.SubItems.Add(node.Attributes["Country"].Value); lvi.SubItems.Add(node.Attributes["RefCode"].Value); lvOptLanguages.Items.Add(lvi); } } } } catch(XmlException) { MessageBox.Show( this, "Malformed xml format!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } foreach(ListViewItem lvi in lvOptLanguages.Items) { if(lvi.SubItems[2].Text == appSettings.UILanguage) { lvi.Selected = true; break; } } this.previousLanguage = appSettings.UILanguage; this.appSettings = appSettings; this.localizer = localizer; localizer.LocalizeControls(this); }
public frmOptions(ApplicationSettings appSettings, Localizer localizer) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent // XmlDocument local = new XmlDocument(); DirectoryInfo di = new DirectoryInfo(appSettings.LanguagesFilePath + Path.DirectorySeparatorChar); foreach(FileInfo fi in di.GetFiles(appSettings.LanguageFileNamePrefix + "*.xml")) { try { local.Load(fi.FullName); } catch(Exception) { MessageBox.Show( this, "Cannot load the localization file: " + fi.Name, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } try { XmlNode node = local.DocumentElement; if(node.Attributes["Description"] != null && node.Attributes["Country"] != null && node.Attributes["RefCode"] != null) { ListViewItem lvi = new ListViewItem(); lvi.Text = node.Attributes["Description"].Value; lvi.SubItems.Add(node.Attributes["Country"].Value); lvi.SubItems.Add(node.Attributes["RefCode"].Value); lvOptLanguages.Items.Add(lvi); } } catch(XmlException) { MessageBox.Show( this, "Malformed xml format: " + fi.Name, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } } if(lvOptLanguages.Items.Count == 0) { btnOK.Enabled = false; } foreach(ListViewItem lvi in lvOptLanguages.Items) { if(lvi.SubItems[2].Text == appSettings.UILanguage) { lvi.Selected = true; break; } } this.previousLanguage = appSettings.UILanguage; this.appSettings = appSettings; this.localizer = localizer; localizer.LocalizeControls(this); }
public frmOptions(ApplicationSettings appSettings, Localizer localizer) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent // XmlDocument locals = new XmlDocument(); try { locals.Load(appSettings.LanguagesFilePath + Path.DirectorySeparatorChar + "Localization_list.xml"); } catch (Exception) { MessageBox.Show( this, "Cannot load the localization list file!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } try { XmlNode localsNode = locals.SelectSingleNode("//Localizations"); foreach (XmlNode node in localsNode.ChildNodes) { if (node.NodeType == XmlNodeType.Element && node.Name == "Localization") { if (node.Attributes["Description"] != null && node.Attributes["Country"] != null && node.Attributes["RefCode"] != null) { ListViewItem lvi = new ListViewItem(); lvi.Text = node.Attributes["Description"].Value; lvi.SubItems.Add(node.Attributes["Country"].Value); lvi.SubItems.Add(node.Attributes["RefCode"].Value); lvOptLanguages.Items.Add(lvi); } } } } catch (XmlException) { MessageBox.Show( this, "Malformed xml format!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } foreach (ListViewItem lvi in lvOptLanguages.Items) { if (lvi.SubItems[2].Text == appSettings.UILanguage) { lvi.Selected = true; break; } } this.previousLanguage = appSettings.UILanguage; this.appSettings = appSettings; this.localizer = localizer; localizer.LocalizeControls(this); }