Пример #1
0
        public SquaresLayout(List<Window> windowList, Rectangle area, TagScreen parent)
        {
            _windowList = windowList;
            _owned = area;
            _parent = parent;

            splitter =
                float.Parse(Manager.settings.ReadSettingOrDefault(0.5f, parent.parent.Screen.DeviceName.Replace(".", ""),
                                                                  parent.tag.ToString(), "Splitter"));
            vsplitter =
                float.Parse(Manager.settings.ReadSettingOrDefault(0.5f, parent.parent.Screen.DeviceName.Replace(".", ""),
                                                                  parent.tag.ToString(), "VSplitter"));
        }
Пример #2
0
 private void createTagScreens()
 {
     for (int i = 0; i < tagScreens.Length; i++) {
         tagScreens[i] = new TagScreen(this, i);
     }
 }
Пример #3
0
 public void Disable(TagScreen swappingWith)
 {
     foreach (Window window in windows) {
         if (!swappingWith.windows.Contains(window)) {
             window.Visible = false;
         }
     }
 }
Пример #4
0
 public void ChangeNumberOfTagScreens(int newNumber)
 {
     if (newNumber < 1) {
         return;
     }
     if (IsTagEnabled(newNumber)) {
         SetTagState(0, true);
     }
     TagScreen[] newTS = new TagScreen[newNumber];
     if (tagScreens.Length > newNumber) {
         for (int i = newNumber; i < tagScreens.Length; i++) {
             tagScreens[i].Disown();
         }
         Array.Copy(tagScreens, newTS, newNumber);
     }
     else {
         Array.Copy(tagScreens, newTS, newNumber - (newNumber - tagScreens.Length));
     }
     for (int i = tagScreens.Length; i < newTS.Length; i++) {
         newTS[i] = new TagScreen(this, i);
     }
     tagScreens = newTS;
     Manager.settings.AddSetting(newNumber.ToString(), SafeName, "NumberOfTags");
 }