コード例 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            txtName.Text   = inspector.Name;
            txtPath.Text   = inspector.Path;
            slPeriod.Value = inspector.CheckPeriod;
            txtPeriod.Text = InspectorDetail.GetPeriodText(inspector.CheckPeriod);

            if (inspector.Action == (int)Inspector.TypeActions.MoveSubDir)
            {
                rbtMoveSubDir.IsChecked = true;

                if (!String.IsNullOrEmpty(inspector.SubDirAction))
                {
                    txtPathAction.Text = inspector.SubDirAction;
                }
            }
            else
            {
                rbtDeleteFiles.IsChecked = true;
            }

            if (inspector.InspectorId != 0)
            {
                rbtMoveSubDir.IsEnabled  = false;
                rbtDeleteFiles.IsEnabled = false;
            }

            RulesRefresh(null);
        }
コード例 #2
0
        private void pnlNewRastreador_MouseUp(object sender, MouseButtonEventArgs e)
        {
            InspectorDetail inspDetail = new InspectorDetail();

            inspDetail.ShowDialog();

            this.Focus();
        }
コード例 #3
0
        private void pnlNewInspector_MouseUp(object sender, MouseButtonEventArgs e)
        {
            var inspector = new Inspector {
                Path = "Seleccione una carpeta para rastrear"
            };

            InspectorDetail inspDetail = new InspectorDetail(inspector);

            inspDetail.ShowDialog();

            inspector = inspDetail.inspector;

            InspectorsRefresh(inspector, true);
        }
コード例 #4
0
        private void FillRulesAux(Inspector inspector)
        {
            if (inspector.Enable)
            {
                inspector.ImageEnable = @"/Resources/play.png";
            }
            else
            {
                inspector.ImageEnable = @"/Resources/pausa.png";
            }

            inspector.CheckPeriodText = InspectorDetail.GetPeriodText(inspector.CheckPeriod) + " ";

            inspector.RulesAux = new List <InspectorHelper>(3);

            var queryRule = from rule in inspector.Rules
                            where rule.RuleType.Equals((int)RuleFile.TypeFileRule.FileName)
                            select rule;

            InspectorHelper inspHelper = new InspectorHelper();

            inspHelper.CountRuleType = queryRule.Count();
            inspHelper.Type          = RuleFile.TypeFileRule.FileName;
            inspHelper.ImagePath     = @"/images/icon_ruleFileName.png";

            inspector.RulesAux.Add(inspHelper);

            queryRule = from rule in inspector.Rules
                        where rule.RuleType.Equals((int)RuleFile.TypeFileRule.Extension)
                        select rule;

            inspHelper = new InspectorHelper();
            inspHelper.CountRuleType = queryRule.Count();
            inspHelper.Type          = RuleFile.TypeFileRule.Extension;
            inspHelper.ImagePath     = @"/images/icon_ruleFileExtension.png";

            inspector.RulesAux.Add(inspHelper);

            queryRule = from rule in inspector.Rules
                        where rule.RuleType.Equals((int)RuleFile.TypeFileRule.Date)
                        select rule;

            inspHelper = new InspectorHelper();
            inspHelper.CountRuleType = queryRule.Count();
            inspHelper.Type          = RuleFile.TypeFileRule.Date;
            inspHelper.ImagePath     = @"/images/icon_ruleFileDate.png";

            inspector.RulesAux.Add(inspHelper);
        }
コード例 #5
0
        private void lstVInspectors_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (lstVInspectors.SelectedIndex != -1)
            {
                Inspector inspSelected = (Inspector)lstVInspectors.SelectedValue;

                InspectorDetail inspDetail = new InspectorDetail(inspSelected);
                inspDetail.ShowDialog();

                List <Inspector> lstInspectors = (List <Inspector>)lstVInspectors.ItemsSource;

                inspSelected = inspDetail.inspector;

                FillRulesAux(inspSelected);

                lstVInspectors.ItemsSource = null;
                lstVInspectors.ItemsSource = lstInspectors;
            }
        }
コード例 #6
0
        private void pnlNewInspector_MouseUp(object sender, MouseButtonEventArgs e)
        {
            var inspector = new Inspector { Path = "Seleccione una carpeta para rastrear" };

            InspectorDetail inspDetail = new InspectorDetail(inspector);
            inspDetail.ShowDialog();

            inspector = inspDetail.inspector;

            InspectorsRefresh(inspector, true);
        }
コード例 #7
0
        private void lstVInspectors_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (lstVInspectors.SelectedIndex != -1)
            {
                Inspector inspSelected = (Inspector)lstVInspectors.SelectedValue;

                InspectorDetail inspDetail = new InspectorDetail(inspSelected);
                inspDetail.ShowDialog();

                List<Inspector> lstInspectors = (List<Inspector>)lstVInspectors.ItemsSource;

                inspSelected = inspDetail.inspector;

                FillRulesAux(inspSelected);

                lstVInspectors.ItemsSource = null;
                lstVInspectors.ItemsSource = lstInspectors;
            }
        }
コード例 #8
0
        private void pnlNewRastreador_MouseUp(object sender, MouseButtonEventArgs e)
        {
            InspectorDetail inspDetail = new InspectorDetail();
            inspDetail.ShowDialog();

            this.Focus();
        }
コード例 #9
0
        private void mnFileR_Click(object sender, RoutedEventArgs e)
        {
            var inspector = new FileInspector { Path = "Seleccione una carpeta para rastrear" };

            var inspDetail = new InspectorDetail(inspector);
            inspDetail.ShowDialog();

            inspector = inspDetail.Inspector;

            if (inspector.InspectorId.HasValue)
            {
                InspectorsRefresh(inspector, true);
            }
        }
コード例 #10
0
 private void slPeriod_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     txtPeriod.Text        = InspectorDetail.GetPeriodText((int)e.NewValue);
     inspector.CheckPeriod = (int)e.NewValue;
 }