예제 #1
0
        public WorkWindow(EventClient client, ProgramSetting setting)
        {
            InitializeComponent();

            if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }

            Setting      = setting;
            Client       = client;
            mControls    = new UserControl[] { AttByClass, AttByDay, InqAbsentees, InqIndividual, InqOver, StuList, Accounts, AcceptedAccounts, InqAll };
            ChildManager = new ChildWindowManager(this);
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                mSetting      = ProgramSetting.Load();
                mChildManager = new ChildWindowManager(this);

                if ((bool)mSetting["RememberID"])
                {
                    SaveIDCheck.IsChecked = true;
                    IDText.Text           = (mSetting["ID"] as string) ?? "";
                }

                mChildManager.TryToShow <LoadingWindow>(new EventHandler((o, ev) =>
                {
                    this.Dispatcher.Invoke(() => { SetState(); });
                }), "서버에 연결 중입니다...", (WaitCallback)Connect);
            }
            catch (Exception ex)
            {
                MessageBox.Show($"로그인 준비를 하는 과정에서 오류가 발생하였습니다.\n{ex.Message}");
            }
        }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     mChildManager = new ChildWindowManager(this);
 }
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     ParentWindow = Window.GetWindow(this) as WorkWindow;
     ParentWindow.Client.ReceivedDataSetResult += Client_ReceivedDataSetResult;
     mChildManager = new ChildWindowManager(ParentWindow);
 }