Ejemplo n.º 1
0
        public OWLOSFileControl(OWLOSFiles files) : base()
        {
            this.files     = files;
            panelName.Text = "files";
            foreach (OWLOSFile file in files.filesList)
            {
                TextBlock textBlock = new TextBlock
                {
                    Foreground = Foreground = (SolidColorBrush)App.Current.Resources["OWLOSInfo"],
                    Text       = file.name + " " + file.size.ToString(),
                    Tag        = file
                };
                file.tag = textBlock;
                file.OnFileSizeChange += File_OnFileSizeChange;
                file.OnFileDelete     += File_OnFileDelete;
                itemsHolder.Children.Add(textBlock);
            }

            files.OnNewFile += Files_OnNewFile;
        }
Ejemplo n.º 2
0
        public OWLOSThingFileControl(OWLOSThingControl parentOWLOSThingControl, OWLOSFiles files, double radius, double angel, double length, double width) : base(parentOWLOSThingControl, radius, angel, length, width)
        {
            Rotate(angel);
            this.files = files;

            //file.OnFileStatusChanger += OnFileStatusChanger;

            fileCountrol = new OWLOSFileControl(files);
            fileCountrol.parentControl.Visibility = Visibility.Hidden;
            fileCountrol.parentControl.Hide();

            (parentOWLOSThingControl.parentControl.Parent as Grid).Children.Add(fileCountrol.parentControl);

            //Название драйвера, смотрите UserControl_Loaded - пересчет извиба надписи
            petalNameText.Text = "files";

            //создаем и настраиваем соеденительную линию
            relationLine = new EcosystemRelationLine(fileCountrol, fileCountrol.parentControl, connector, fileCountrol, parentOWLOSThingControl.parentControl.Parent as Grid);

            petalBackground.PreviewMouseLeftButtonDown += petalBackground_PreviewMouseLeftButtonDown;
        }