コード例 #1
0
        public FormMain()
        {
            InitializeComponent();

            alp = new MultiLanguage(System.IO.File.Exists(Variables.baseDir + "\\AllLanguageInOnePack.alp") ? Variables.baseDir + "\\AllLanguageInOnePack.alp" : "");
            alpPackSourceXdocument = alp.LoadAlp(System.IO.File.Exists(Variables.baseDir + "\\AllLanguageInOnePack.alp") ? Variables.baseDir + "\\AllLanguageInOnePack.alp" : "");

            language = MultiLanguage.ResetLanguage(alpPackSourceXdocument);

            if (Properties.Settings.Default.BatchCodes != null && !String.IsNullOrEmpty(Properties.Settings.Default.BatchCodes.ToString()))
            {
                foreach (var el in Properties.Settings.Default.BatchCodes.Root.Elements("vendor"))
                {
                    if (el.Descendants().FirstOrDefault(p => p.Name == "batchCode").Value == "DEMOMA")
                    {
                        break;
                    }

                    Variables.vendorCode.Add(new KeyValuePair <string, string>(el.Descendants().FirstOrDefault(p => p.Name == "batchCode").Value, el.Descendants().FirstOrDefault(p => p.Name == "vendorId").Value), el.Descendants().FirstOrDefault(p => p.Name == "vendorCode").Value);
                }
            }

            SettingsWindow = new FormSettings();
        }
コード例 #2
0
 private void FormMain_Load(object sender, EventArgs e)
 {
     mForm = (FormMain)Application.OpenForms["FormMain"];
     sForm = SettingsWindow;
     bool isSetAlpFormMain = alp.SetLanguage(language.Key, this.Controls, mForm);
 }