개정판 8af2ace4
dev issue #1227 : symbol refresh
Change-Id: Ie0af17df0672e2e75f10f568be2649cb7c46621f
DTI_PID/APIDConverter/Form/MappingForm.cs | ||
---|---|---|
32 | 32 |
SetAvevaSymbolStructure(); |
33 | 33 |
gridViewSymbol.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(gridViewSymbol_FocusedRowChanged); |
34 | 34 |
treeListAvevaSymbol.FocusedNodeChanged += new FocusedNodeChangedEventHandler(treeListAvevaSymbol_FocusedNodeChanged); |
35 |
galleryControlAvevaSymbols.Gallery.ItemSize = new System.Drawing.Size(32, 32);
|
|
36 |
galleryControlAvevaSymbols.Gallery.ShowItemImage = true;
|
|
35 |
galleryControlAvevaSymbols.Gallery.ItemImageLayout = DevExpress.Utils.Drawing.ImageLayoutMode.ZoomInside;
|
|
36 |
galleryControlAvevaSymbols.Gallery.ImageSize = new System.Drawing.Size(112, 55);
|
|
37 | 37 |
galleryControlAvevaSymbols.Gallery.ShowItemText = true; |
38 | 38 |
} |
39 | 39 |
|
... | ... | |
200 | 200 |
Cursor = Cursors.WaitCursor; |
201 | 201 |
try |
202 | 202 |
{ |
203 |
while (galleryControlAvevaSymbols.Gallery.Groups[0].Items.Count > 0) |
|
204 |
{ |
|
205 |
DevExpress.XtraBars.Ribbon.GalleryItem item = galleryControlAvevaSymbols.Gallery.Groups[0].Items[0]; |
|
206 |
galleryControlAvevaSymbols.Gallery.Groups[0].Items.Remove(item); |
|
207 |
item.ImageOptions.Image.Dispose(); |
|
208 |
item.ImageOptions.Dispose(); |
|
209 |
} |
|
210 |
|
|
203 | 211 |
Project_Info project_Info = Project_Info.GetInstance(); |
204 | 212 |
if (Directory.Exists(project_Info.AVEVA_ImageDirPath)) |
205 | 213 |
Directory.Delete(project_Info.AVEVA_ImageDirPath, true); |
... | ... | |
237 | 245 |
mStream.Dispose(); |
238 | 246 |
} |
239 | 247 |
imageTable.Dispose(); |
248 |
|
|
249 |
MessageBox.Show("End Aveva Symbol Refresh", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Information); |
|
240 | 250 |
} |
241 | 251 |
catch (Exception ex) |
242 | 252 |
{ |
243 |
|
|
253 |
MessageBox.Show("Fail Aveva Symbol Refresh", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
244 | 254 |
} |
245 | 255 |
Cursor = Cursors.Default; |
246 | 256 |
} |
... | ... | |
258 | 268 |
string resultPath = imagePath + dirPath; |
259 | 269 |
string[] fileNames = Directory.GetFiles(resultPath, "*.png", SearchOption.TopDirectoryOnly); |
260 | 270 |
galleryControlAvevaSymbols.Gallery.Groups[0].Caption = e.Node.GetDisplayText("Name"); |
271 |
|
|
261 | 272 |
while (galleryControlAvevaSymbols.Gallery.Groups[0].Items.Count > 0) |
262 | 273 |
{ |
263 |
//DevExpress.XtraBars.Ribbon.GalleryItem item = galleryControlAvevaSymbols.Gallery.Groups[0].Items[0]; |
|
264 |
galleryControlAvevaSymbols.Gallery.Groups[0].Items.RemoveAt(0); |
|
274 |
DevExpress.XtraBars.Ribbon.GalleryItem item = galleryControlAvevaSymbols.Gallery.Groups[0].Items[0]; |
|
275 |
galleryControlAvevaSymbols.Gallery.Groups[0].Items.Remove(item); |
|
276 |
item.ImageOptions.Image.Dispose(); |
|
277 |
item.ImageOptions.Dispose(); |
|
265 | 278 |
} |
266 | 279 |
|
267 | 280 |
foreach (var fileName in fileNames) |
268 | 281 |
{ |
269 |
DevExpress.XtraBars.Ribbon.GalleryItem item = new DevExpress.XtraBars.Ribbon.GalleryItem(Image.FromFile(fileName), Path.GetFileNameWithoutExtension(fileName), Path.GetFileNameWithoutExtension(fileName));
|
|
282 |
DevExpress.XtraBars.Ribbon.GalleryItem item = new DevExpress.XtraBars.Ribbon.GalleryItem(Image.FromFile(fileName), Path.GetFileNameWithoutExtension(fileName), "");
|
|
270 | 283 |
galleryControlAvevaSymbols.Gallery.Groups[0].Items.Add(item); |
271 | 284 |
} |
272 | 285 |
} |
내보내기 Unified diff