Esempio n. 1
0
 public void ChangeCurrentSector(Sector newSector)
 {
     if (sector == newSector)
     {
         return;                     //ignore when there is no change
     }
     this.sector = newSector;
     PathToEdit  = null;
     SectorChanged(level, newSector);
     if (CurrentRenderer != null)
     {
         if (show_background1.Active)
         {
             CurrentRenderer.SetBackgroundColor(new Drawing.Color(1, 1, 1, 1));
         }
         else
         {
             CurrentRenderer.SetBackgroundColor(new Drawing.Color(1, 1, 1, 0));
         }
         // If there is no tool activated for this sector yet reset it to the Select tool.
         if (CurrentRenderer.Editor == null)
         {
             OnToolSelect(null, null);
             ToolSelect.Active = true;
         }
     }
 }
Esempio n. 2
0
 protected void OnShowBackground(object o, EventArgs e)
 {
     if (CurrentRenderer == null)
     {
         show_background1.Active = true;
         return;
     }
     CurrentRenderer.SetBackgroundColor(new Drawing.Color(1, 1, 1, (show_background1.Active?1:0)));
 }