private void InitMembers() { appli = null; reference = null; this.DisposeAllCSVFile(); sectionCSVManage = null; blockCSVManage = null; articleCSVManage = null; translateCSVManage = null; sceneInfo = null; catalogFilePath = String.Empty; catalogFileName = String.Empty; catalogFileDir = String.Empty; this.Status_TSPB.Value = 0; this.Status_TSSL.Text = KD.StringTools.Const.Zero + KD.StringTools.Const.WhiteSpace + KD.StringTools.Const.Percent; spaceIniFile = new KD.Config.IniFile(spaceIniPath); kdsdkIniFile = new KD.Config.IniFile(kdsdkIniPath); exportDir = spaceIniFile.ReadValue(MainForm.SectionExport, KD.CatalogProperties.Const.KeyDir); this.SaveFilesDirectory_TBX.Text = exportDir; }
private void Initialize() { FileEGI fileEGI = new FileEGI(this.CurrentAppli); this.CurrentFileEGI = fileEGI.Initialize(); if (this.CurrentFileEGI != null) { this.SetSceneDimensions(); if (manageCatalog == null) { manageCatalog = new ManageCatalog(this.CurrentAppli); } if (globalSegment == null) { globalSegment = new GlobalSegment(this.CurrentFileEGI); } string version = globalSegment.GetVersion(); SetSceneReference(version); this.ClearAllSectionsList(); this.SetAllSectionsList(); } }
public WallSegment(Plugin plugin, KD.Config.IniFile fileEGI, string section) { _plugin = plugin; this.CurrentFileEGI = fileEGI; _section = section; this.InitMembers(); this.SetMembers(); }
public KD.Config.IniFile Initialize() { if (Open()) { KD.Config.IniFile iniFile = new KD.Config.IniFile(orderEGIFilePath); return(iniFile); } return(null); }
public ArticleSegment(Plugin plugin, KD.Config.IniFile fileEGI, string section, ManageCatalog manageCatalog)//, string catalogManufacturer { _plugin = plugin; _currentFileEGI = fileEGI; //_catalogManufacturer = catalogManufacturer; _section = section; _manageCatalog = manageCatalog; this.InitMembers(); this.SetMembers(); }
private string GetDocDirDirectory() { KD.Config.IniFile iniFile = new KD.Config.IniFile(Path.Combine(this.CurrentAppli.SpaceIniFilePath)); string docDir = iniFile.GetStringValue("Remote", "DocDir"); if (string.IsNullOrEmpty(docDir)) { docDir = iniFile.GetStringValue("Local", "DocDir"); if (string.IsNullOrEmpty(docDir)) { docDir = iniFile.GetStringValue("InSitu", "DocDir"); } } return(docDir); }
public bool ProcessOrder(int callParamsBlock) { _pluginWord = new KD.Plugin.Word.Plugin(); orderInformations = new OrderInformations(this.CurrentAppli, callParamsBlock); string supplierName = orderInformations.GetSupplierName(); string generateOrder = Order._pluginWord.CurrentAppli.Scene.SceneGetCustomInfo(OrderKey.GenerateOrder); string supplierEmail = Order._pluginWord.CurrentAppli.Scene.SceneGetCustomInfo(OrderKey.SupplierEmail); if (!String.IsNullOrEmpty(supplierEmail)) { orderInformations.SetSupplierEmail(supplierEmail); } if (!String.IsNullOrEmpty(generateOrder)) { bool.TryParse(generateOrder, out bool isGenerateOrder); if (isGenerateOrder) { string retailerNumber = orderInformations.GetRetailerNumber(); Order.orderDir = orderInformations.GetOrderDir(); Order.rootOrderDir = orderInformations.GetRootOrderDir(); KD.Config.IniFile ordersIniFile = new KD.Config.IniFile(Path.Combine(Order.rootOrderDir, FileEDI.IniOrderFileName)); MainForm.EmailTo = ordersIniFile.ReadValue(Eancom.FileEDI.ediSection, Eancom.FileEDI.emailToKey + supplierName); MainForm.EmailCc = ordersIniFile.ReadValue(Eancom.FileEDI.ediSection, Eancom.FileEDI.emailCcKey + supplierName); MainForm.MandatoryDeliveryInformation = ordersIniFile.ReadValue(Eancom.FileEDI.ediSection, OrderKey.MandatoryDeliveryRetailerInformation + retailerNumber); string recipientAddresses = MainForm.EmailTo; // "[email protected];[email protected];[email protected]"; recipientAddresses = recipientAddresses.Replace(KD.StringTools.Const.SemiColon, KD.StringTools.Const.Comma); string ccAdress = MainForm.EmailCc; ccAdress = ccAdress.Replace(KD.StringTools.Const.SemiColon, KD.StringTools.Const.Comma); if (!String.IsNullOrEmpty(recipientAddresses)) { this.SendMail(recipientAddresses, ccAdress); return(true); } } } MessageBox.Show("La commande n'a pas été généré.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return(true); }
public GlobalSegment(KD.Config.IniFile fileEGI) { this.CurrentFileEGI = fileEGI; this.InitMembers(); this.SetMembers(); }