コード例 #1
0
 public void Close()
 {
     if (!this.IsOpen)
     {
         return;
     }
     this.IsOpen = false;
     if (this.Window != null)
     {
         for (int i = 0; i < this.Window.Elements.Count; i++)
         {
             ArcenUI_Element element = this.Window.Elements[i];
             if (!(element.Controller is WindowTogglingButtonController))
             {
                 continue;
             }
             WindowTogglingButtonController otherControllerAsType  = (WindowTogglingButtonController)element.Controller;
             ToggleableWindowController     otherRelatedController = otherControllerAsType.GetRelatedController();
             if (!otherRelatedController.IsOpen)
             {
                 continue;
             }
             otherRelatedController.Close();
         }
     }
 }
コード例 #2
0
        public override void HandleClick()
        {
            ToggleableWindowController controller = this.GetRelatedController();

            if (controller.IsOpen)
            {
                controller.Close();
            }
            else
            {
                controller.Open();
                if (this.Window != null && this.Window.Controller is WindowControllerAbstractBase)
                {
                    ((WindowControllerAbstractBase)this.Window.Controller).CloseWindowsOtherThanThisOne(controller);
                }
            }
        }
コード例 #3
0
 public void CloseWindowsOtherThanThisOne(ToggleableWindowController controller)
 {
     for (int i = 0; i < this.Window.Elements.Count; i++)
     {
         ArcenUI_Element element = this.Window.Elements[i];
         if (!(element.Controller is WindowTogglingButtonController))
         {
             continue;
         }
         WindowTogglingButtonController otherControllerAsType  = (WindowTogglingButtonController)element.Controller;
         ToggleableWindowController     otherRelatedController = otherControllerAsType.GetRelatedController();
         if (otherRelatedController == controller)
         {
             continue;
         }
         if (!otherRelatedController.IsOpen)
         {
             continue;
         }
         otherRelatedController.Close();
     }
 }