private void buttonOK_Click(object sender, EventArgs e)
        {
            string res = Check();

            if (res.Length > 0)
            {
                string acceptstr = "Click Retry to correct errors, Abort to cancel, Ignore to accept valid entries";

                DialogResult dr = ExtendedControls.MessageBoxTheme.Show(this, "Filters produced the following warnings and errors" + Environment.NewLine + Environment.NewLine + res + Environment.NewLine + acceptstr,
                                                                        "Warning", MessageBoxButtons.AbortRetryIgnore);

                if (dr == DialogResult.Retry)
                {
                    return;
                }
                else if (dr == DialogResult.Abort || dr == DialogResult.Cancel)
                {
                    DialogResult = DialogResult.Cancel;
                    Close();
                }
            }

            actionfile.ChangeEventList(result);
            actionfile.WriteFile();

            DialogResult = DialogResult.OK;
            Close();
        }
        public void CreateSet(string s, string appfolder)
        {
            ActionFile af = new ActionFile(appfolder + "\\\\" + s + ".act", s);

            af.WriteFile();
            actionfiles.Add(af);
        }
Exemple #3
0
        static public bool SetEnableFlag(string file, bool enable)              // change the enable flag. Read in,write out.
        {                                                                       // true if managed to change it..
            try
            {
                ActionFile f = new ActionFile();

                bool readenable;
                if (f.ReadFile(file, out readenable).Length == 0)        // read it in..
                {
                    f.enabled = enable;
                    f.WriteFile();                                // write it out.
                    //  System.Diagnostics.Debug.WriteLine("Set Enable " + file + " " + enable );
                    return(true);
                }
            }
            catch
            {
            }

            return(false);
        }