Exemplo n.º 1
0
        public void but_Click(object sender, RoutedEventArgs e)
        {
            Button but = (Button)sender;

            FileManager.ManagerProjects.INFO_ALL_PROJECTS info = (FileManager.ManagerProjects.INFO_ALL_PROJECTS)but.Tag;

            if (clickItems != null)
            {
                clickItems(but, info);
            }
        }
        private void LeftPanel_clickItems(Button button, FileManager.ManagerProjects.INFO_ALL_PROJECTS info)
        {
            Boolean result = FileManager.ManagerProjects.LoadProject(info);

            if (result)
            {
            }
            else if (!result)
            {
                String error = FileManager.ManagerProjects.GetError();
                LMD_GUI.LMD_WindowError we = new LMD_WindowError(error);
                we.ShowDialog();
            }
        }
Exemplo n.º 3
0
        public void AddItem(String name, String path)
        {
            TextBlock t_n = new TextBlock();

            t_n.Text   = name;
            t_n.Margin = new Thickness(0, -5, 0, 0);
            TextBlock t_p = new TextBlock();

            t_p.Text       = path;
            t_p.FontSize   = 12;
            t_p.Foreground = new SolidColorBrush(Color.FromArgb(255, 150, 150, 150));
            t_p.Margin     = new Thickness(0, 0, 0, 0);

            StackPanel sp = new StackPanel();

            sp.Children.Add(t_n);
            sp.Children.Add(t_p);

            Grid grid = new Grid();

            grid.Children.Add(sp);

            FileManager.ManagerProjects.INFO_ALL_PROJECTS info = new FileManager.ManagerProjects.INFO_ALL_PROJECTS();
            info.Name = name;
            info.Path = path;

            Button but = new Button();

            but.Tag     = path;
            but.Content = grid;
            but.Height  = 40;
            but.Style   = (Style)this.FindResource("MoveButtonStyle");
            but.Tag     = info;
            but.Click  += but_Click;

            stackPanel.Children.Add(but);
        }