Ejemplo n.º 1
0
        public App()
        {
            InitializeComponent();

            ToolbarShadow  shadow   = new ToolbarShadow();
            MainWindow     main     = new MainWindow(shadow);
            SettingsWindow settings = new SettingsWindow();

            Current.MainWindow   = main;
            Current.ShutdownMode = ShutdownMode.OnMainWindowClose;

            shadow.Show();
            main.Show();
            settings.Show();
        }
Ejemplo n.º 2
0
        public MainWindow(ToolbarShadow shadow)
        {
            this.Shadow = shadow;
            IsDragging  = false;

            InitializeComponent();

            if (Settings.Default.StartPosition.X == 0 && Settings.Default.StartPosition.Y == 0)
            {
                Settings.Default.StartPosition = new System.Drawing.Point(
                    (int)System.Windows.SystemParameters.PrimaryScreenWidth / 2,
                    (int)System.Windows.SystemParameters.PrimaryScreenHeight - 110);
            }

            Left = Settings.Default.StartPosition.X;
            Top  = Settings.Default.StartPosition.Y;

            Elements = new List <ExpressElement>();
        }