예제 #1
0
        private void OnClosed(ConfigurationData data)
        {
            if (data != null)
            {
                //this.Hide();
            }
            else
            {
                return;
            }
            if (data.OperateType == OperateScreenType.CreateScreenAndOpenConfigFile)
            {
                if (data.ProjectLocationPath != "")
                {
                   // this.Hide();

                    MainWindow win = new MainWindow(data);
                    win.Owner = this;
                    win.ShowDialog();
                }
            }
            else if (data.OperateType == OperateScreenType.CreateScreen)
            {
                MainWindow win = new MainWindow(data);
                win.Owner = this;
                win.ShowDialog();
            }
            //else if (data.OperateType = OperateScreenType.CreateScreen)
            //{
            //    this.Hide();
            //}
        }
        private void OnShowMainWindow(ConfigurationData data)
        {
            if (data != null)
            {
                this.Hide();
            }
            else
            {
                return;
            }
            if (data.OperateType == OperateScreenType.CreateScreenAndOpenConfigFile)
            {
                if (data.ProjectLocationPath != "")
                {
                    this.Hide();

                    MainWindow win = new MainWindow(data);
                    Application.Current.MainWindow = win;
                    win.Show();
                    //ShowInCenterParent(win);
                }
            }
            else if (data.OperateType == OperateScreenType.CreateScreen)
            {
                MainWindow win = new MainWindow(data);
                win.Show();
                //ShowInCenterParent(win);
            }
        }