Exemple #1
0
        void IPagePresenter.Apply()
        {
            string tmp = view.InputValue.Trim();

            if (tmp == "")
            {
                return;
            }
            view.InputValue = "";

            preprocessingManager.Preprocess(
                FileListUtils.ParseFileList(tmp).Select(arg => preprocessingStepsFactory.CreateLocationTypeDetectionStep(new PreprocessingStepParams(arg))),
                "Processing selected files"
                );
        }
Exemple #2
0
        void ApplyIndependentLogsMode()
        {
            string tmp = ((string)view.ReadControlValue(ControlId.FileSelector)).Trim();

            if (tmp == "")
            {
                return;
            }
            view.WriteControlValue(ControlId.FileSelector, "");
            foreach (string fname in FileListUtils.ParseFileList(tmp))
            {
                try
                {
                    model.Create(factory, factory.CreateParams(fname));
                }
                catch (Exception e)
                {
                    alerts.ShowPopup("Error",
                                     string.Format("Failed to create log source for '{0}': {1}", fname, e.Message),
                                     AlertFlags.Ok | AlertFlags.WarningIcon);
                    break;
                }
            }
        }