Ejemplo n.º 1
0
        public void addTile(StackTile t)
        {
            Canvas.SetLeft(t, GridPosX[DockTiles.Count]);
            Canvas.SetTop(t, 9);
            DockTiles.Add(new Tile());

            CanvasMain.Children.Add(t);

            resizeMainBar();
        }
Ejemplo n.º 2
0
        private void b_Add_Click(object sender, RoutedEventArgs e)
        {
            if (tb_Title.Text != "")
            {
                Color c = Color.FromRgb(27, 161, 226);

                if (rb_Mag.IsChecked == true)
                    c = Color.FromRgb(255, 0, 151);
                else if (rb_Purp.IsChecked == true)
                    c = Color.FromRgb(162, 0, 255);
                else if (rb_Teal.IsChecked == true)
                    c = Color.FromRgb(0, 171, 169);
                else if (rb_Lime.IsChecked == true)
                    c = Color.FromRgb(140, 191, 38);
                else if (rb_Green.IsChecked == true)
                    c = Color.FromRgb(51, 153, 51);
                else if (rb_Pink.IsChecked == true)
                    c = Color.FromRgb(255, 0, 151);
                else if (rb_Orange.IsChecked == true)
                    c = Color.FromRgb(240, 150, 9);
                else if (rb_Blue.IsChecked == true)
                    c = Color.FromRgb(27, 161, 226);
                else if (rb_Red.IsChecked == true)
                    c = Color.FromRgb(229, 20, 0);

                if (rb_Stack.IsChecked == true)
                {
                    StackTile st = new StackTile(tb_Title.Text, (String)l_StackPath.Content, c);
                    Globals.MainDock.addTile(st);
                }
                else if (rb_App.IsChecked == true)
                {
                    Tile t = new Tile(tb_Title.Text, c, (String)l_FilePath.Content, true);
                    Globals.MainDock.addTile(t);
                }

                Close();
            }
        }