Пример #1
0
 internal void addNewIcon(string fullPath)
 {
     this.Dispatcher.Invoke((Action)(() =>
     {
         if (isFileHidden(fullPath))
         {
             return;
         }
         var p = DIconPositionManager.getPosition(fullPath);
         if (p.x == 0 && p.y == 0)
         {
             addNewIconToEnd(fullPath);
         }
         else
         {
             gridMain.Children.Add(placeIcon(new DIcon(this, fullPath, p.x, p.y)));
         }
         DIconPositionManager.savePositions();
     }));
 }
Пример #2
0
 public void loadIcons(string[] files)
 {
     DIconPositionManager.loadPositions();
     foreach (var f in files)
     {
         if (isFileHidden(f))
         {
             continue;
         }
         var p = DIconPositionManager.getPosition(f);
         if (p.x == 0 && p.y == 0)
         {
             addNewIconToEnd(f);
         }
         else
         {
             gridMain.Children.Add(placeIcon(new DIcon(this, f, p.x, p.y)));
         }
     }
     DIconPositionManager.savePositions();
 }