Exemplo n.º 1
0
        private async Task SetupTaskbar()
        {
            taskbar = TaskBarFactory.GetTaskbar();
            process = await taskbar.AddToTaskbar();

            Size      = new Size(452, 30);
            var(X, Y) = ConfigUtils.StringToPosition(Config.Get(ConfigKeys.BarPosition));
            process.SetPosition(X, Y);
        }
Exemplo n.º 2
0
 private void Drag_MouseMove(object sender, MouseEventArgs e)
 {
     if (IsDragging)
     {
         var position = ConfigUtils.StringToPosition(Config.Get(ConfigKeys.BarPosition));
         int X        = this.Location.X - taskbar.Rectangle.Left + e.X;
         process.SetPosition(NumberUtils.Clamp(X, position.Y, taskbar.Rectangle.Right - 300), 0);
         Config.Set(ConfigKeys.BarPosition, ConfigUtils.PositionToString(X, position.Y));
     }
 }