Changeset 12262 for extensions/PiwigoLib/PiwigoUpload/MainForm.cs
- Timestamp:
- Sep 29, 2011, 5:38:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoLib/PiwigoUpload/MainForm.cs
r12256 r12262 17 17 { 18 18 InitializeComponent(); 19 selectedPwgCategoryListBindingSource.DataSource = ModelManager.Instance.lstCat; 20 modelManagerBaseBindingSource.DataSource = ModelManager.Instance; 19 21 } 20 22 21 private void Form1_Load(object sender, EventArgs e)23 private void MainForm_Load(object sender, EventArgs e) 22 24 { 23 25 string[] args = Environment.GetCommandLineArgs(); … … 38 40 } 39 41 } 42 43 MainAppHelper.BuildAlbumTree(AlbumsTV, ModelManager.Instance.lstAlbumLocaux); 44 40 45 } 41 46 … … 46 51 { 47 52 String strUri= tbServer.Text.Replace("\\","/"); 53 if (!strUri.StartsWith("http")) 54 { 55 strUri = "http://" + strUri; 56 } 48 57 if (!strUri.EndsWith("/ws.php")) 49 58 { … … 76 85 try 77 86 { 78 79 Int32 newid = 0; 80 String msg = String.Empty; 81 Boolean rc; 82 // rc = PwgServiceProvider.Instance.PwgCategoriesService.AddCategory("test_cat", 1, ref newid, ref msg); 83 //List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory(); 84 //Console.WriteLine(String.Format("newid : {0} message : {1}", newid,msg)); 85 //rc = PwgServiceProvider.Instance.PwgCategoriesService.UpdateCategoryInfo(newid, "test2", "rename cat"); 86 //Boolean rc = PwgServiceProvider.Instance.PwgCategoriesService.DeleteCategory(newid, sess.SecurityToken, PwgCategoryPhotoDeletionModeEnum.None); 87 //rc = PwgServiceProvider.Instance.PwgCategoriesService.MoveCategory(new List<Int32>() { newid }, PwgCategory.RootCategoryId, sess.SecurityToken); 88 89 //lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory(); 90 91 //FileInfo fiBig = new FileInfo("C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n.jpg"); 92 //FileInfo fiThumb = new FileInfo(MakeThumb(fiBig, "C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n_thum.jpg", 64)); 93 //FileInfo fiLow = new FileInfo(MakeThumb(fiBig, "C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n_low.jpg", 256)); 94 95 //FileInfo fiBig = new FileInfo("C:\\temp\\Oryx.jpg"); 96 //FileInfo fiThumb = new FileInfo(MakeThumb(fiBig, "C:\\temp\\Oryx_thumb.jpg", 64)); 97 //FileInfo fiLow = new FileInfo(MakeThumb(fiBig, "C:\\temp\\Oryx_low.jpg", 256)); 98 99 //PwgImageAdded imgAdd = PwgServiceProvider.Instance.PwgImagesService.addImageByMultiPartForm(fiBig, null, 1, "benoit", "byarl", "test upload", 0, new List<PwgTag>() { new PwgTag() { Name = "Benoit" }, new PwgTag() { Name = "Noé" } }); 100 //rc = PwgServiceProvider.Instance.PwgImagesService.addImage(fiBig, fiLow, fiThumb, "Benoit", "bayral", DateTime.Now, "demo", new List<string>() { "1" }, new List<string>() { "Benoit" }, PwgConfidentLevelEnum.All); 101 //rc = PwgServiceProvider.Instance.PwgImagesService.DeleteImage(319, sess.SecurityToken); 102 103 //PwgImageInfo info = PwgServiceProvider.Instance.PwgImagesService.getImageInfo(imgAdd.Id, null, null); 104 105 //PwgImageRate imgRate = PwgServiceProvider.Instance.PwgImagesService.RateImage(1, 5); 106 107 87 ServiceFactory.GetByType<UploadToPiwigo>().runService(); 108 88 } 109 89 catch (ApplicationException aex) … … 113 93 } 114 94 115 private void Form1_FormClosing(object sender, FormClosingEventArgs e)95 private void MainForm_FormClosing(object sender, FormClosingEventArgs e) 116 96 { 117 97 try
Note: See TracChangeset
for help on using the changeset viewer.