Exemplo n.º 1
0
        public void SetWindowExternal(Type curType, string presenterName)
        {
            ModuleSubmenu ms = new ModuleSubmenu {
                Module        = this.Model.Modules[0],
                PresenterType = curType, Name = presenterName
            };

            SetWindow(ms);
        }
Exemplo n.º 2
0
        public void SetWindow(ModuleSubmenu ms)
        {
            InternalWindow window = new InternalWindow();

            window.Parent        = this.content.WindowsContainer as Panel;
            window.CanResize     = true;
            window.ShowStatusBar = false;
            window.Header        = ms.Name;
            window.StartPosition = ToolWindowStartPosition.CenterParent;
            window.Height        = SystemParameters.FullPrimaryScreenHeight - 150;
            window.Width         = SystemParameters.FullPrimaryScreenWidth - 10;
            window.Icon          = new BitmapImage(new Uri(ms.IconPath, UriKind.Relative));
            //window.Width = 800;

            //window.Icon = Util.GetImageSource(ms.Image);
            window.GridContent.Children.Add((UserControlBase)ms.Module.Execute(ms.PresenterType, window));
            window.Show();
        }
Exemplo n.º 3
0
        private void ImageButton_Click(object sender, RoutedEventArgs e)
        {
            ModuleSubmenu ms = ((ImageButton)sender).CommandParameter as ModuleSubmenu;

            SetWindow(ms);
        }
Exemplo n.º 4
0
        private void DropDownMenuItem_Click(object sender, RoutedEventArgs e)
        {
            ModuleSubmenu ms = ((HeaderedItemsControl)e.OriginalSource).Header as ModuleSubmenu; //((DropDownMenuItem)sender).Items[ ((DropDownMenuItem)sender).Items.CurrentPosition] as ModuleSubmenu;

            SetWindow(ms);
        }
Exemplo n.º 5
0
 public void SetWindowExternal(Type curType, string presenterName)
 {
     ModuleSubmenu ms = new ModuleSubmenu { Module = this.Model.Modules[0], 
         PresenterType = curType, Name = presenterName }; 
     SetWindow(ms);
 }
Exemplo n.º 6
0
        public void SetWindow(ModuleSubmenu ms)
        {
            InternalWindow window = new InternalWindow();            
            window.Parent = this.content.WindowsContainer as Panel;
            window.CanResize = true;
            window.ShowStatusBar = false;
            window.Header = ms.Name;
            window.StartPosition = ToolWindowStartPosition.CenterParent;
            window.Height = SystemParameters.FullPrimaryScreenHeight - 150;
            window.Width = SystemParameters.FullPrimaryScreenWidth - 10;
            window.Icon =  new BitmapImage(new Uri(ms.IconPath, UriKind.Relative));
            //window.Width = 800;

            //window.Icon = Util.GetImageSource(ms.Image);            
            window.GridContent.Children.Add((UserControlBase)ms.Module.Execute(ms.PresenterType, window));
            window.Show();
        }