コード例 #1
0
        private void BtnEditDepartment_Clicks(object sender, RoutedEventArgs e)
        {
            this.isEdit = true;
            NewDepartment v = new NewDepartment(this);

            v.Show();
        }
コード例 #2
0
        private void BtnNewDepartment_Clicks(object sender, RoutedEventArgs e)
        {
            this.isEdit = false;
            bool isWindowOpen = false;

            foreach (Window w in Application.Current.Windows)
            {
                if (w is NewDepartment)
                {
                    isWindowOpen = true;
                    w.Activate();
                }
            }

            if (!isWindowOpen)
            {
                NewDepartment period = new NewDepartment(this);
                period.Show();
            }
        }