Exemple #1
0
 public FCWorker(mko.Log.LogServer log)
 {
     this.log = log;
     server   = new DMS.FC.FileClassificatorServer(new DMS.FC.StandardFileClassificator(), writer);
     Debug.WriteLine("Der FCWorker wurde in AppDomain " + AppDomain.CurrentDomain.FriendlyName + " instanziiert");
     log.Log(mko.Log.RC.CreateMsg("Der FCWorker wurde in AppDomain " + AppDomain.CurrentDomain.FriendlyName + " instanziiert"));
 }
        private async void mnuiFileOpen_Click(object sender, RoutedEventArgs e)
        {
            tabControlMain.SelectedItem = ImportTab;

            var openAsteroidsCSV = new Microsoft.Win32.OpenFileDialog();

            openAsteroidsCSV.Multiselect = false;

            if (openAsteroidsCSV.ShowDialog() ?? false)
            {
                //MessageBox.Show("Selected Filename: " + openAsteroidsCSV.FileName);

                // Erfassung vorbereiten
                mko.TraceHlp.ThrowArgExIfNot(File.Exists(openAsteroidsCSV.FileName), "Die Datei " + openAsteroidsCSV.FileName + " existiert nicht");

                ((AsteroidsCollectorMVVM)FindResource("Collector")).StartCollect();
                collector = ((AsteroidsCollectorMVVM)FindResource("Collector")).Collector;

                clock.AutoReset = true;
                clock.Elapsed  += new System.Timers.ElapsedEventHandler(clock_Elapsed);
                clock.Enabled   = true;

                log.Log(mko.Log.RC.CreateStatus("Einlesevorgang gestartet"));

                await Task.Run(() =>
                {
                    var reader = new AsteroidsDAL.CSV.AsteroidsCSVReader(openAsteroidsCSV.FileName, 2);

                    // geht nicht aus einem anderen Thread
                    //lblImportCsvCountAsteroids.Text = "HAllo";

                    while (!reader.EOF)
                    {
                        collector.Add(reader.Read());
                    }
                });

                clock.Stop();

                //UpdateCollectorCounterTimer_Tick(null, null);

                mvvmRepo.Repo = collector.CreateRepository();
                //presenter = new Impl.PresenterV1(this, repo);

                log.Log(mko.Log.RC.CreateStatus("Einlesen erfolgreich beendet"));
            }
        }
Exemple #3
0
        private void btnReloadDirectory_Click(object sender, EventArgs e)
        {
            if (folderBrowserDialogForScan.ShowDialog(this) == DialogResult.OK)
            {
                var rootNode = new TreeNode(folderBrowserDialogForScan.SelectedPath);
                rootNode.Tag = new DirEntryDescriptor {
                    Path = folderBrowserDialogForScan.SelectedPath, IsDir = true
                };
                rootNode.ImageIndex         = 0;
                rootNode.SelectedImageIndex = 1;

                trvPicDir.Nodes.Clear();
                trvPicDir.Nodes.Add(rootNode);

                log.Log(mko.Log.RC.CreateStatus(string.Format("Ein neues Bildverzeichnis wurde eingelesen: {0}", folderBrowserDialogForScan.SelectedPath)));
            }
        }
Exemple #4
0
        public MainForm()
        {
            InitializeComponent();

            var lbxHnd = new mko.Log.WinFormListBoxLogHnd(lbxLog);

            log.registerLogHnd(lbxHnd);

            //var lbxLbl = new mko.Log.WinFormStatusStripLogHnd(statusStrip1);

            log.Log(mko.Log.RC.CreateStatus("Initialisierung beendet"));

            EnableTbx(false);
            EnableGrpSort(false);
            btnGetSortOrderBuilder.Enabled = false;
            btnGetResult.Enabled           = false;
        }
Exemple #5
0
        public DmsWorker(mko.Log.LogServer log)
        {
            _log = log;

            string msg = "Der DmsWorker wurde in AppDomain " + AppDomain.CurrentDomain.FriendlyName + " instanziiert";

            Trace.WriteLineIf(ts.TraceInfo, msg);
            log.Log(mko.Log.RC.CreateMsg(msg));
        }
        private async void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            tabControl1.SelectedTab = tabImportCSV;

            if (openAsteroidsCSV.ShowDialog() == DialogResult.OK)
            {
                // Erfassung vorbereiten
                mko.TraceHlp.ThrowArgExIfNot(File.Exists(openAsteroidsCSV.FileName), "Die Datei " + openAsteroidsCSV.FileName + " existiert nicht");


                collector = new AsteroidsBL.AsteroidsCollector();

                //UpdateCollectorCounterTimer.Enabled = true;
                UpdateCollectorCounterTimer.Start();

                log.Log(mko.Log.RC.CreateStatus("Einlesevorgang gestartet"));

                await Task.Run(() =>
                {
                    var reader = new AsteroidsDAL.CSV.AsteroidsCSVReader(openAsteroidsCSV.FileName, 2);

                    // geht nicht aus einem anderen Thread
                    //lblImportCsvCountAsteroids.Text = "HAllo";

                    while (!reader.EOF)
                    {
                        collector.Add(reader.Read());
                    }
                });

                UpdateCollectorCounterTimer.Stop();

                //UpdateCollectorCounterTimer_Tick(null, null);

                repo      = collector.CreateRepository();
                presenter = new Impl.PresenterV1(this, repo);

                log.Log(mko.Log.RC.CreateStatus("Einlesen erfolgreich beendet"));
            }
        }
Exemple #7
0
        private void btnTestLinearPlotReset_Click(object sender, EventArgs e)
        {
            try{
                linearChart.Clear();

                linearChart.Title     = "Lineare Achsen";
                linearChart.TitleFont = new Font("Arial", 22f);

                double[] xAchse  = { 0, 0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 16, 32 };
                string[] xLabels = { "0", "0.125", "0.25", "0.5", "1.0", "2.0", "4.0", "8.0", "16", "32" };
                linearChart.CreateXLabelAxis(xAchse, xLabels, babaros6Charts.MultiChart <double, double> .XAxisPosition.Top);
            }
            catch (Exception ex) {
                logServer.Log(mko.Log.RC.CreateError("Reset Test linear Plot" + ex.Message));
            }
        }
Exemple #8
0
        void _btnNew_Click(object sender, EventArgs e)
        {
            try
            {
                // Dummy- Zeile sichbar machen
                showDummyRow = true;

                // 1. Zeile in den Edit- Modus umschalten
                _grd.EditIndex = 0;

                _grd.DataBind();
            }
            catch (Exception ex)
            {
                _log.Log(mko.Log.RC.CreateError("Beim Anlegen eines neuen Datensatzes: ", ex));
            }
        }
Exemple #9
0
        protected void btnSetFilter_Click(object sender, EventArgs e)
        {
            if (grdAll.HeaderRow != null && IsValid)
            {
                // Zugriff auf die Steuerelemente in der Kopfzeile, deren Servereigenschaften nicht mittels
                // ...Changed aktualisiert werden können

                // Darstellung des neu gefilterten Resultsets bei der 1. Seite beginnen lassen
                grdAll.PageIndex  = 0;
                sessVar.PageIndex = 0;

                // Neuen Abruf des gefilterten Resultsets erzwingen
                grdAll.DataBind();
            }
            else
            {
                log.Log(mko.Log.RC.CreateError("Die eingaben sind fehlerhaft"));
            }
        }
Exemple #10
0
 bool DMS.IWorker.setup(DMS.Job currentJob)
 {
     try
     {
         // ContentVec- Tabelle dem writer bekanntmachen
         writer.SetContentVecTab(((Job)currentJob).results);
         server.reset();
         Debug.WriteLine("Job " + currentJob.JobId + " in AppDomain " + AppDomain.CurrentDomain.FriendlyName + " wird gestartet");
         log.Log(mko.Log.RC.CreateMsg("Job " + currentJob.JobId + " in AppDomain " + AppDomain.CurrentDomain.FriendlyName + " wird gestartet"));
         return(true);
     }
     catch (InvalidCastException)
     {
         Trace.Fail("FCWorker/InvalidCastException");
         return(false);
     }
     catch (Exception ex)
     {
         Trace.Fail(string.Format("FCWorker/setup/Exception: {0}", ex.Message));
         return(false);
     }
 }
Exemple #11
0
 private void btnDrawEllipse_Click(object sender, RoutedEventArgs e)
 {
     factory = new EllipsenFactory();
     log.Log(mko.Log.RC.CreateStatus("Ellipse erzeugen"));
 }
 protected void btnMakeErr_Click(object sender, EventArgs e)
 {
     log.Log(mko.Log.RC.CreateError("Eine Fehlermeldung"));
 }