mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
A bit of work on app's UI and integration between .net and native.
This commit is contained in:
82
RainmeterEditor/UI/MainWindow.xaml
Normal file
82
RainmeterEditor/UI/MainWindow.xaml
Normal file
@ -0,0 +1,82 @@
|
||||
<Window x:Class="RainmeterEditor.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="clr-namespace:RainmeterEditor.UI"
|
||||
xmlns:ad="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
|
||||
xmlns:adlayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
|
||||
Title="MainWindow" Height="350" Width="525">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<!-- Menu bar -->
|
||||
<RowDefinition Height="Auto" />
|
||||
<!-- Toolbar -->
|
||||
<RowDefinition />
|
||||
<!-- Dock area -->
|
||||
<RowDefinition Height="Auto" />
|
||||
<!-- Status bar -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Menu bar -->
|
||||
<Menu Grid.Row="0" Grid.ColumnSpan="10">
|
||||
<MenuItem Header="_File">
|
||||
<MenuItem Header="_New Item..." />
|
||||
<MenuItem Header="_Open..." />
|
||||
<Separator />
|
||||
<MenuItem Header="_Close" />
|
||||
<MenuItem Header="E_xit" />
|
||||
</MenuItem>
|
||||
<MenuItem Header="_Edit" />
|
||||
<MenuItem Header="_Help" />
|
||||
</Menu>
|
||||
|
||||
<!-- Toolbar -->
|
||||
|
||||
<!-- Grid splitter -->
|
||||
<GridSplitter Grid.Row="2" Grid.Column="1"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<!-- Document panel -->
|
||||
<ad:DockingManager
|
||||
x:Name="dockingManager"
|
||||
Grid.Row="2">
|
||||
<adlayout:LayoutRoot>
|
||||
|
||||
<adlayout:LayoutRoot.LeftSide>
|
||||
<adlayout:LayoutAnchorSide>
|
||||
<adlayout:LayoutAnchorGroup>
|
||||
<adlayout:LayoutAnchorable Title="Toolbox" />
|
||||
</adlayout:LayoutAnchorGroup>
|
||||
</adlayout:LayoutAnchorSide>
|
||||
</adlayout:LayoutRoot.LeftSide>
|
||||
|
||||
<adlayout:LayoutPanel Orientation="Horizontal">
|
||||
<adlayout:LayoutDocumentPane x:Name="documentPane" />
|
||||
|
||||
<adlayout:LayoutAnchorablePaneGroup DockWidth="150" Orientation="Vertical">
|
||||
<adlayout:LayoutAnchorablePane>
|
||||
<adlayout:LayoutAnchorable Title="Skins">
|
||||
<ui:SkinsPanel />
|
||||
</adlayout:LayoutAnchorable>
|
||||
<adlayout:LayoutAnchorable Title="Outline" />
|
||||
</adlayout:LayoutAnchorablePane>
|
||||
<adlayout:LayoutAnchorablePane>
|
||||
<adlayout:LayoutAnchorable Title="Properties" />
|
||||
</adlayout:LayoutAnchorablePane>
|
||||
</adlayout:LayoutAnchorablePaneGroup>
|
||||
</adlayout:LayoutPanel>
|
||||
</adlayout:LayoutRoot>
|
||||
</ad:DockingManager>
|
||||
|
||||
<!-- Status bar -->
|
||||
<StatusBar Grid.Row="3" Grid.ColumnSpan="10">
|
||||
|
||||
<ProgressBar Name="statusProgress"
|
||||
Width="64" Height="8"
|
||||
IsIndeterminate="True"
|
||||
Visibility="Collapsed" />
|
||||
|
||||
<TextBlock Name="statusMessage">Ready</TextBlock>
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
</Window>
|
27
RainmeterEditor/UI/MainWindow.xaml.cs
Normal file
27
RainmeterEditor/UI/MainWindow.xaml.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace RainmeterEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
16
RainmeterEditor/UI/SkinsPanel.xaml
Normal file
16
RainmeterEditor/UI/SkinsPanel.xaml
Normal file
@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="RainmeterEditor.UI.SkinsPanel"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<Grid>
|
||||
<TreeView>
|
||||
<TreeViewItem Header="Sample item">
|
||||
<TreeViewItem Header="Sample subitem" />
|
||||
</TreeViewItem>
|
||||
<TreeViewItem Header="Sample item 2" />
|
||||
</TreeView>
|
||||
</Grid>
|
||||
</UserControl>
|
31
RainmeterEditor/UI/SkinsPanel.xaml.cs
Normal file
31
RainmeterEditor/UI/SkinsPanel.xaml.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using RainmeterEditor.Interop;
|
||||
using RainmeterEditor.Storage;
|
||||
|
||||
namespace RainmeterEditor.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SkinsPanel.xaml
|
||||
/// </summary>
|
||||
public partial class SkinsPanel : UserControl
|
||||
{
|
||||
public SkinsPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var x = Rainmeter.Instance.Handle;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user