private void AddRemoteTarball_Shown(object sender, EventArgs e) { if (File.Exists(VarGlobale.AutoCompleteSrcePath)) { Dictionary <string, string[]> AutoCompSrce = RessManager.LoadStringRess(VarGlobale.AutoCompleteSrcePath); if (AutoCompSrce.ContainsKey("URL")) { CmbxSvnUrl.AutoCompleteCustomSource.AddRange(AutoCompSrce["URL"]); } if (AutoCompSrce.ContainsKey("TarBallLs")) { CmbxTarName.AutoCompleteCustomSource.AddRange(AutoCompSrce["TarBallLs"]); } CmbxSvnUrl.Items.Clear(); string[] ToAdd = new string[CmbxSvnUrl.AutoCompleteCustomSource.Count]; CmbxSvnUrl.AutoCompleteCustomSource.CopyTo(ToAdd, 0); CmbxSvnUrl.Items.AddRange(ToAdd); CmbxTarName.Items.Clear(); ToAdd = new string[CmbxTarName.AutoCompleteCustomSource.Count]; CmbxTarName.AutoCompleteCustomSource.CopyTo(ToAdd, 0); CmbxTarName.Items.AddRange(ToAdd); } }
private void AddRemoteTarball_FormClosing(object sender, FormClosingEventArgs e) { Dictionary <string, string[]> ToAdd = new Dictionary <string, string[]>(); string[] CustomSrce = new string[CmbxSvnUrl.AutoCompleteCustomSource.Count]; CmbxSvnUrl.AutoCompleteCustomSource.CopyTo(CustomSrce, 0); ToAdd.Add("URL", CustomSrce); CustomSrce = new string[CmbxTarName.AutoCompleteCustomSource.Count]; CmbxTarName.AutoCompleteCustomSource.CopyTo(CustomSrce, 0); ToAdd.Add("TarBallLs", CustomSrce); RessManager.SaveRess(ToAdd, VarGlobale.AutoCompleteSrcePath); }