Esempio n. 1
0
        private void enterButton_Click(object sender, RoutedEventArgs e)
        {
            if (!ALF.SYSTEM.WindowsTools.IsServeiceStart(ALF.MSSQL.Tools.ServiceName))
            {
                Tools.ShowError(101);
                return;
            }

            if (!ALF.MSSQL.Tools.IsDBOpen())
            {
                Tools.ShowError(102);
                return;
            }

            if (!File.Exists(Tools.TemplateConfigPath) || !File.Exists(Tools.ArgConfigPath))
            {
                Tools.ShowError(200);
                return;
            }
            ALF.EDU.EduTools.RecordYear = "2016";
            ALF.MSSQL.Tools.DBName      = ALF.EDU.EduTools.EduDBName;
            var windos = new WorkWindow();

            windos.Load(typeCombo.SelectedIndex);
            windos.Show();
            Close();
        }
Esempio n. 2
0
        public void Load(int index)
        {
            Title        = Tools.Title;
            verText.Text = Tools.Ver;
            Cover        = coverGrid;
            Window       = this;

            regionControl.CreateAction += () =>
            {
                wordControl.Load(false);
                tab.SelectedItem = wordControl;
            };

            wordControl.Load(true);
            if (index == 0)
            {
                string tmpResult;

                var templateInfos = Tools.GetLocalTemplateFileList(out tmpResult);

                if (tmpResult != "")
                {
                    ShowError(tmpResult);
                    return;
                }

                tab.Items.RemoveAt(0);
                regionControl.Load(templateInfos);
                return;
            }
            templateControl.SelectAction += list =>
            {
                regionControl.Load(list);
                tab.SelectedItem = regionControl;
            };
            templateControl.Load();
        }