Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pHost"></param>
        public Form_ManageApps(PluginUsedAppsUC pPluginMain)
        {
            InitializeComponent();

            //cHost = pHost;
            cPluginMain = pPluginMain;

            #region Datagrid header

            DataGridViewTextBoxColumn mApplicationNameCol = new DataGridViewTextBoxColumn();
            mApplicationNameCol.DataPropertyName = "applicationname";
            mApplicationNameCol.Name             = "applicationname";
            mApplicationNameCol.HeaderText       = "Application name";
            mApplicationNameCol.ReadOnly         = true;
            mApplicationNameCol.Visible          = true;
            mApplicationNameCol.Width            = 140;
            DGV_ApplicationPatterns.Columns.Add(mApplicationNameCol);

            DataGridViewTextBoxColumn mCompanyURLCol = new DataGridViewTextBoxColumn();
            mCompanyURLCol.DataPropertyName = "companyurl";
            mCompanyURLCol.Name             = "companyurl";
            mCompanyURLCol.HeaderText       = "Company URL";
            mCompanyURLCol.ReadOnly         = true;
            mCompanyURLCol.Visible          = true;
            mCompanyURLCol.Width            = 170;
            DGV_ApplicationPatterns.Columns.Add(mCompanyURLCol);

            DataGridViewTextBoxColumn mApplicationPatternCol = new DataGridViewTextBoxColumn();
            mApplicationPatternCol.DataPropertyName = "applicationpatternstring";
            mApplicationPatternCol.Name             = "applicationpatternstring";
            mApplicationPatternCol.HeaderText       = "Application pattern";
            mApplicationPatternCol.ReadOnly         = true;
            mApplicationPatternCol.Visible          = true;
            //      mApplicationPatternCol.Width = 280;
            mApplicationPatternCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            DGV_ApplicationPatterns.Columns.Add(mApplicationPatternCol);

            cApplicationPatterns = new BindingList <ApplicationPattern>();
            DGV_ApplicationPatterns.DataSource = cApplicationPatterns;


            #endregion

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

            try
            {
                cTask.readApplicationPatterns();
            }
            catch (FileNotFoundException lEx)
            {
                cPluginMain.PluginHost.LogMessage(String.Format("Form_ManageApps() : {0}", lEx.Message));
                return;
            }
            catch (Exception lEx)
            {
                MessageBox.Show(lEx.StackTrace, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                cPluginMain.PluginHost.LogMessage(String.Format("Form_ManageApps() : {0}", lEx.Message));
                return;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static TaskFacade getInstance()
 {
     return(cInstance ?? (cInstance = new TaskFacade()));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="pHost"></param>
        public Form_ManageApps(PluginUsedAppsUC pPluginMain)
        {
            InitializeComponent();

              //cHost = pHost;
              cPluginMain = pPluginMain;

              #region Datagrid header

              DataGridViewTextBoxColumn mApplicationNameCol = new DataGridViewTextBoxColumn();
              mApplicationNameCol.DataPropertyName = "applicationname";
              mApplicationNameCol.Name = "applicationname";
              mApplicationNameCol.HeaderText = "Application name";
              mApplicationNameCol.ReadOnly = true;
              mApplicationNameCol.Visible = true;
              mApplicationNameCol.Width = 140;
              DGV_ApplicationPatterns.Columns.Add(mApplicationNameCol);

              DataGridViewTextBoxColumn mCompanyURLCol = new DataGridViewTextBoxColumn();
              mCompanyURLCol.DataPropertyName = "companyurl";
              mCompanyURLCol.Name = "companyurl";
              mCompanyURLCol.HeaderText = "Company URL";
              mCompanyURLCol.ReadOnly = true;
              mCompanyURLCol.Visible = true;
              mCompanyURLCol.Width = 170;
              DGV_ApplicationPatterns.Columns.Add(mCompanyURLCol);

              DataGridViewTextBoxColumn mApplicationPatternCol = new DataGridViewTextBoxColumn();
              mApplicationPatternCol.DataPropertyName = "applicationpatternstring";
              mApplicationPatternCol.Name = "applicationpatternstring";
              mApplicationPatternCol.HeaderText = "Application pattern";
              mApplicationPatternCol.ReadOnly = true;
              mApplicationPatternCol.Visible = true;
              //      mApplicationPatternCol.Width = 280;
              mApplicationPatternCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
              DGV_ApplicationPatterns.Columns.Add(mApplicationPatternCol);

              cApplicationPatterns = new BindingList<ApplicationPattern>();
              DGV_ApplicationPatterns.DataSource = cApplicationPatterns;

              #endregion

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

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