예제 #1
0
        public Form_ManageSystems(PluginSystemsUC pPluginMain)
        {
            InitializeComponent();

            cPluginMain = pPluginMain;

            #region Datagrid headers

            DataGridViewTextBoxColumn mSystemNameCol = new DataGridViewTextBoxColumn();
            mSystemNameCol.DataPropertyName = "systemname";
            mSystemNameCol.Name             = "systemname";
            mSystemNameCol.HeaderText       = "System name";
            mSystemNameCol.ReadOnly         = true;
            mSystemNameCol.Visible          = true;
            mSystemNameCol.Width            = 140;
            DGV_Systems.Columns.Add(mSystemNameCol);

            DataGridViewTextBoxColumn mSystemPatternCol = new DataGridViewTextBoxColumn();
            mSystemPatternCol.DataPropertyName = "systempatternstring";
            mSystemPatternCol.Name             = "systempatternstring";
            mSystemPatternCol.HeaderText       = "System pattern";
            mSystemPatternCol.ReadOnly         = true;
            mSystemPatternCol.Visible          = true;
            mSystemPatternCol.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            DGV_Systems.Columns.Add(mSystemPatternCol);

            cSystemPatterns        = new BindingList <SystemPattern>();
            DGV_Systems.DataSource = cSystemPatterns;

            #endregion

            cTask = TaskFacade.getInstance();
            cTask.addObserver(this);

            try
            {
                cTask.readSystemPatterns();
            }
            catch (FileNotFoundException lEx)
            {
                cPluginMain.PluginHost.LogMessage(String.Format("Form_ManageSystems() : {0}", lEx.Message));
                return;
            }
            catch (Exception lEx)
            {
                MessageBox.Show(lEx.StackTrace, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                cPluginMain.PluginHost.LogMessage(String.Format("Form_ManageSystems() : {0}", lEx.Message));
                return;
            }
        }
예제 #2
0
        public Form_ManageSystems(PluginSystemsUC pPluginMain)
        {
            InitializeComponent();

              cPluginMain = pPluginMain;

              #region Datagrid headers

              DataGridViewTextBoxColumn mSystemNameCol = new DataGridViewTextBoxColumn();
              mSystemNameCol.DataPropertyName = "systemname";
              mSystemNameCol.Name = "systemname";
              mSystemNameCol.HeaderText = "System name";
              mSystemNameCol.ReadOnly = true;
              mSystemNameCol.Visible = true;
              mSystemNameCol.Width = 140;
              DGV_Systems.Columns.Add(mSystemNameCol);

              DataGridViewTextBoxColumn mSystemPatternCol = new DataGridViewTextBoxColumn();
              mSystemPatternCol.DataPropertyName = "systempatternstring";
              mSystemPatternCol.Name = "systempatternstring";
              mSystemPatternCol.HeaderText = "System pattern";
              mSystemPatternCol.ReadOnly = true;
              mSystemPatternCol.Visible = true;
              mSystemPatternCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
              DGV_Systems.Columns.Add(mSystemPatternCol);

              cSystemPatterns = new BindingList<SystemPattern>();
              DGV_Systems.DataSource = cSystemPatterns;

              #endregion

              cTask = TaskFacade.getInstance();
              cTask.addObserver(this);

              try
              {
            cTask.readSystemPatterns();
              }
              catch (FileNotFoundException lEx)
              {
            cPluginMain.PluginHost.LogMessage(String.Format("Form_ManageSystems() : {0}", lEx.Message));
            return;
              }
              catch (Exception lEx)
              {
            MessageBox.Show(lEx.StackTrace, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            cPluginMain.PluginHost.LogMessage(String.Format("Form_ManageSystems() : {0}", lEx.Message));
            return;
              }
        }
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static TaskFacade getInstance()
 {
     return(cInstance ?? (cInstance = new TaskFacade()));
 }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public static TaskFacade getInstance()
 {
     return cInstance ?? (cInstance = new TaskFacade());
 }