Example #1
0
 /// <summary>
 /// 激活所有的便签
 /// </summary>
 public static void ActivatedNotepad()
 {
     _isActivatedNotepad = true;
     //升序
     foreach (WindowNotepad window in WindowList.OrderBy(s => s.WindowSettings.Index))
     {
         //window.Topmost = true;
         window.Activate();
         //window.Topmost = false;
         //Debug.WriteLine(window.Caption);
         //window.WindowsTool.ShowWindow(window);
     }
     _isActivatedNotepad = false;
 }
Example #2
0
 /// <summary>
 /// 重新排序
 /// </summary>
 /// <param name="index"></param>
 public static void SetIndexOrderBy(int index)
 {
     if (_isActivatedNotepad == false)
     {
         foreach (WindowNotepad w in WindowList.OrderBy(i => i.WindowSettings.Index))
         {
             if (w.WindowSettings.Index > index)
             {
                 w.WindowSettings.Index--;
             }
             else if (w.WindowSettings.Index == index)
             {
                 w.WindowSettings.Index = WindowList.Count;
             }
             //w.Caption = w.Index.ToString();
         }
     }
 }