Esempio n. 1
0
        protected bool show_spo;                        // отображать или нет панель СПО

        /// <summary>
        /// Инициализирует новый экземпляр класса
        /// </summary>
        protected SgtApplication()
        {
            c_slim = new System.Threading.ReaderWriterLockSlim();

            works = new List <Work>();

            commutator = new Commutator();
            technology = new Technology();

            db_manager = new DataBaseManager();

            commutator.SaverTechData = technology.SaverTechnologyData;
            //commutator.onUpdated += new CommutatorEventHandler(technology.Calculate);

            technology.onComplete += new EventHandler(technology_onComplete);

            s_panel = new SpoPanel(this);
            d_panel = new DrillingPanel(this);

            sol_panel = new SolutionPanel(this);

            panels = new List <VPanel>();

            show_drilling = true;
            show_solution = true;
            show_spo      = true;
        }
Esempio n. 2
0
        /// <summary>
        /// Загрузить насройки панелей
        /// </summary>
        /// <param name="root">Корневой узел настроек всех панелей</param>
        protected void LoadPanels(XmlNode root)
        {
            try
            {
                if (root != null)
                {
                    if (root.HasChildNodes)
                    {
                        foreach (XmlNode child in root.ChildNodes)
                        {
                            switch (child.Name)
                            {
                            case "DrillingPanel":

                                DrillingPanel.Load(child);
                                break;

                            case "SolutionPanel":

                                SolutionPanel.Load(child);
                                break;

                            case "SpoPanel":

                                SpoPanel.Load(child);
                                break;

                            case "numericPanel":

                                try
                                {
                                    NumericPanel n_panel = new NumericPanel(this);
                                    n_panel.Load(child);

                                    panels.Add(n_panel);
                                }
                                catch { }
                                break;

                            case "fullPanel":

                                try
                                {
                                    FullPanel fullPanel = new FullPanel();
                                    fullPanel.Load(child);

                                    panels.Add(fullPanel);
                                }
                                catch { }
                                break;

                            default:
                                break;
                            }
                        }
                    }
                }
            }
            catch { }
        }
Esempio n. 3
0
        private TimeSpan tInterval = new TimeSpan(0, 0, 0, 15, 0); // время тишины для проигрывания файла

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Инициализирует новый экземпляр класса
        /// </summary>
        protected SgtApplication()
        {
            c_slim = new System.Threading.ReaderWriterLockSlim();

            works = new List<Work>();

            commutator = new Commutator();
            technology = new Technology();

            db_manager = new DataBaseManager();

            commutator.SaverTechData = technology.SaverTechnologyData;
            //commutator.onUpdated += new CommutatorEventHandler(technology.Calculate);

            technology.onComplete += new EventHandler(technology_onComplete);

            s_panel = new SpoPanel(this);
            d_panel = new DrillingPanel(this);

            sol_panel = new SolutionPanel(this);

            panels = new List<VPanel>();

            show_drilling = true;
            show_solution = true;
            show_spo = true;
        }