/// <summary>
        /// FileShareControl�N���X�̐V�����C���X�^���X����������܂�
        /// </summary>
        public FileShareControl()
        {
            InitializeComponent();
            EventInit();

            FileShareService.DebugWrite += new FileShareServiceDebugWriteEventHandler(FileShareService_DebugWrite);

            if (Settings.Default.TreeRadioButton == true)
                QueryGrid.Children.Add(new FileShareTreeQueryControl_2());

            if (Settings.Default.TabRadioButton == true)
                QueryGrid.Children.Add(new FileShareTabQueryControl());

            string chk = "";

            using (SettingWindow settingWindow = new SettingWindow())
            {
                chk = settingWindow.DataFormatCheck();
            }

            if (chk == "")
            {
                StartService();
            }
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (settingsWindowShowFlag == true)
            {
                MessageBox.Show("�T�[�r�X�̍X�V���ł��B���΂炭���҂���������");
                return;
            }

            try
            {
                using (SettingWindow settingWindow = new SettingWindow())
                {
                    settingWindow.Owner = System.Windows.Application.Current.Windows[0];
                    settingWindow.ShowDialog();
                    if (settingWindow.DialogResult != true) return;
                    if (settingWindow.DataFormatCheck() != "") return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("��肪�����������߃E�C���h�E��\���ł��܂���ł���\r\n" + ex.Message);
                return;
            }

            QueryGrid.Children.Clear();

            if (Settings.Default.TreeRadioButton == true)
                QueryGrid.Children.Add(new FileShareTreeQueryControl_2());

            if (Settings.Default.TabRadioButton == true)
                QueryGrid.Children.Add(new FileShareTabQueryControl());

            Thread stopThread = new Thread(new ThreadStart(delegate()
            {
                settingsWindowShowFlag = true;

                StopService();
            }));
            stopThread.Start();

            Thread startThread = new Thread(new ThreadStart(delegate()
            {
                stopThread.Join();
                StartService();

                settingsWindowShowFlag = false;
            }));
            startThread.Start();
        }