Esempio n. 1
0
 //========================================================================
 public frmReport(string sym, string source, List <SymFile> files, List <string> contents, SymServer server, SymInst inst, bool isFM)
 {
     InitializeComponent();
     this.server  = server;
     this.inst    = inst;
     this.isFM    = isFM;
     Text         = '[' + sym + "] Output of " + source;
     this.reports = contents;
     lstFiles.Items.Clear();
     for (int i = 0; i < files.Count; i++)
     {
         string doFM = (isFM || (i == 0)) ? "" : "Run FM";
         lstFiles.Items.Add(new ListViewItem(new string[] { files[i].sequence.ToString(), files[i].title, files[i].pages.ToString(), doFM }));
         if ((i != 0) && (isFM == false))
         {
             lstFiles.Items[i].UseItemStyleForSubItems = false;
             lstFiles.Items[i].SubItems[3].Font        = new System.Drawing.Font(lstFiles.Items[i].SubItems[3].Font, System.Drawing.FontStyle.Underline);
             lstFiles.Items[i].SubItems[3].ForeColor   = System.Drawing.Color.Blue;
         }
     }
     if (lstFiles.Items.Count > 0)
     {
         lstFiles.Items[0].Selected = true;
     }
 }
Esempio n. 2
0
 public SymInst(SymServer Parent, string SymDir, string SymId, bool Remember)
 {
     this.Parent     = Parent;
     this.SymDir     = SymDir;
     this.SymId      = SymId;
     this.Connection = null;
     this.Remember   = Remember;
 }
Esempio n. 3
0
 //========================================================================
 public SymInst(SymServer Parent)
 {
     this.Parent     = Parent;
     this.SymDir     = "";
     this.SymId      = "";
     this.Connection = null;
     this.Remember   = true;
 }
Esempio n. 4
0
 //------------------------------------------------------------------------
 public frmAddSym(SymInst Sym)
 {
     InitializeComponent();
     this.Server         = Sym.Parent;
     this.SymInst        = Sym;
     txtSym.Text         = SymInst.SymDir;
     txtID.Text          = SymInst.SymId;
     chkRemember.Checked = SymInst.Remember;
 }
Esempio n. 5
0
 //------------------------------------------------------------------------
 public frmAddServer(SymServer Server)
 {
     InitializeComponent();
     this.Server  = Server;
     txtName.Text = Server.Alias;
     txtIP.Text   = Server.IP;
     txtPort.Text = Server.Port.ToString();
     txtUser.Text = Server.AixUsr;
     txtPass.Text = Server.AixPwd;
 }
Esempio n. 6
0
        //========================================================================
        public frmRunFM(string repTitle, SymServer server, SymInst inst)
        {
            InitializeComponent();

            cmbFmFile.SelectedIndex = 0;
            int defQueue = Config.GetInt("Default_Queue");

            if (defQueue > -1)
            {
                optFirstEmpty.Checked  = false;
                optUserSelect.Checked  = true;
                chkQueueAlways.Checked = true;
                txtQueue.Text          = defQueue.ToString();
            }
            else
            {
                optFirstEmpty.Checked  = true;
                optUserSelect.Checked  = false;
                chkQueueAlways.Checked = false;
                txtQueue.Text          = "";
            }

            this.repTitle = repTitle;
            this.server   = server;
            this.inst     = inst;
            session       = Util.TrySymNewConnect(inst);
            if (session == null)
            {
                Close();           //user gets Retry prompt if this fails
            }
            running = false;

            txtFile.Text   = repTitle;
            txtServer.Text = server.Alias;
            txtSym.Text    = inst.SymDir;

            checker                            = new BackgroundWorker();
            checker.DoWork                    += new DoWorkEventHandler(CheckerWork);
            checker.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(CheckerDone);
            checker.ProgressChanged           += new ProgressChangedEventHandler(CheckerProgress);
            checker.WorkerReportsProgress      = true;
            checker.WorkerSupportsCancellation = true;
        }
Esempio n. 7
0
        //========================================================================
        public frmRunRep(SymFile specfile, SymServer server, SymInst clone)
        {
            InitializeComponent();
            this.server    = server;
            this.specfile  = specfile;
            originalInst   = clone;
            txtFile.Text   = specfile.name;
            txtServer.Text = server.Alias;
            txtSym.Text    = specfile.sym;
            session        = Util.TrySymNewConnect(clone);
            if (session == null)
            {
                Close();           //user gets Retry prompt if this fails
            }
            running = false;

            checker                            = new BackgroundWorker();
            checker.DoWork                    += new DoWorkEventHandler(CheckerWork);
            checker.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(CheckerDone);
            checker.ProgressChanged           += new ProgressChangedEventHandler(CheckerProgress);
            checker.WorkerReportsProgress      = true;
            checker.WorkerSupportsCancellation = true;

            int defQueue = Config.GetInt("Default_Queue");

            if (defQueue > -1)
            {
                optFirstEmpty.Checked  = false;
                optUserSelect.Checked  = true;
                chkQueueAlways.Checked = true;
                txtQueue.Text          = defQueue.ToString();
            }
            else
            {
                optFirstEmpty.Checked  = true;
                optUserSelect.Checked  = false;
                chkQueueAlways.Checked = false;
                txtQueue.Text          = "";
            }
            btnRun.Focus();
        }
Esempio n. 8
0
        //========================================================================
        public static void Load(string path)
        {
            try
            {
                XmlTextReader xml = new XmlTextReader(path);
                while (xml.Read())
                {
                    xml.MoveToElement();
                    if ((xml.Name != "CONFIG") && (xml.Name != "xml") && (xml.Name != "") && (xml.NodeType != XmlNodeType.EndElement))
                    {
                        if (xml.Name == "SERVER")
                        {
                            SymServer serv = new SymServer();
                            for (int i = 0; i < xml.AttributeCount; i++)
                            {
                                if (i == 0)
                                {
                                    xml.MoveToFirstAttribute();
                                }
                                else
                                {
                                    xml.MoveToNextAttribute();
                                }
                                switch (xml.Name)
                                {
                                case "IP": serv.IP = xml.Value;             break;

                                case "PORT": serv.Port = int.Parse(xml.Value);  break;

                                case "NAME": serv.Alias = xml.Value;             break;

                                case "USR": serv.AixUsr = xml.Value;             break;

                                case "PWD": serv.AixPwd = xml.Value;             break;

                                case "SAVE": serv.Remember = bool.Parse(xml.Value); break;

                                case "EXPA": serv.Expanded = bool.Parse(xml.Value); break;
                                }
                            }
                            Servers.Add(serv);
                        }
                        else if (xml.Name == "SYM")
                        {
                            if (Servers.Count > 0)
                            {
                                string symDir = "", symId = ""; bool symSave = true;
                                for (int i = 0; i < xml.AttributeCount; i++)
                                {
                                    if (i == 0)
                                    {
                                        xml.MoveToFirstAttribute();
                                    }
                                    else
                                    {
                                        xml.MoveToNextAttribute();
                                    }
                                    switch (xml.Name)
                                    {
                                    case "DIR": symDir = xml.Value;             break;

                                    case "ID": symId = xml.Value;             break;

                                    case "SAVE": symSave = bool.Parse(xml.Value); break;
                                    }
                                }
                                Servers[Servers.Count - 1].AddSym(symDir, symId, symSave);
                            }
                        }
                        else if (xml.Name == "LOCAL")
                        {
                            string locName = "", locPath = ""; bool locExpa = false;
                            for (int i = 0; i < xml.AttributeCount; i++)
                            {
                                if (i == 0)
                                {
                                    xml.MoveToFirstAttribute();
                                }
                                else
                                {
                                    xml.MoveToNextAttribute();
                                }
                                switch (xml.Name)
                                {
                                case "NAME": locName = xml.Value;             break;

                                case "PATH": locPath = xml.Value;             break;

                                case "EXPA": locExpa = bool.Parse(xml.Value); break;
                                }
                            }
                            Locals.Add(new Local(locName, locPath, locExpa));
                        }
                        else
                        {
                            data[xml.Name] = xml.ReadInnerXml();
                        }
                    }
                }
                xml.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error Loading Config File\n" + ex.Message, "PwrIDE", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 9
0
 //========================================================================
 public frmAddSym(SymServer Server)
 {
     InitializeComponent();
     this.Server  = Server;
     this.SymInst = null;
 }