private UserControlCustom BuildPanel(InfraAdapter component, Label lblTitle, PictureBox pb, List <Point> points, Component cpn)
        {
            UserControlCustom p = new UserControlCustom();

            p.Width           = 100;
            p.Height          = 100;
            p.Top             = points[_intInfra.InfraFarm.Adapters.IndexOf(component)].Y - OFFSETY;
            p.Left            = points[_intInfra.InfraFarm.Adapters.IndexOf(component)].X - OFFSETX;
            p.BackgroundImage = component.Online ? Properties.Resources.component : Properties.Resources.componentOffline;
            p.Controls.Add(lblTitle);
            p.Controls.Add(pb);
            p.Controls.Add(cpn);
            p.Name = component.Name;

            return(p);
        }
Example #2
0
        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    m_disconnectTimer.Dispose();
                    m_frmkey.Dispose();
                    m_frmlpw.Dispose();
                    m_frmpw.Dispose();
                    m_infobox.Dispose();
                    m_menu.Dispose();
                    m_menu_connect.Dispose();
                    m_menu_disconnect.Dispose();
                    m_menu_edit.Dispose();
                    m_menu_error.Dispose();
                    m_menu_show.Dispose();
                    m_parent.Dispose();
                    m_status.Dispose();
                    m_vpn.Dispose();
                }

                m_vpn             = null;
                m_status          = null;
                m_parent          = null;
                m_menu_show       = null;
                m_menu_error      = null;
                m_menu_edit       = null;
                m_menu_disconnect = null;
                m_menu_connect    = null;
                m_menu            = null;
                m_infobox         = null;
                m_frmpw           = null;
                m_frmlpw          = null;
                m_frmkey          = null;
                m_disconnectTimer = null;

                disposed = true;
            }
        }
Example #3
0
        private void ActivatedActivityChanged(object o)
        {
            UserControlCustom selectedActivityView = (UserControlCustom)o;

            foreach (UserControlCustom item in _activityTiles)
            {
                item.IsActive = item.Name == selectedActivityView.Name;
                item.Refresh();
                if (item.IsActive)
                {
                    switch (item.GetType().ToString())
                    {
                    case "Droid.financial.ActivityPreviewPerso":
                        _intFnc.CurrentActivity = ((ActivityPreviewPerso)item).Activity;
                        break;

                    case "Droid.financial.ActivityPreviewPro":
                        _intFnc.CurrentActivity = ((ActivityPreviewPro)item).Activity;
                        break;
                    }
                }
            }
        }
Example #4
0
 /// <summary>
 /// loads update information, may show errors in dialog boxes
 /// </summary>
 /// <param name="silence">don't show message boxes on error</param>
 public Update(bool silence, UserControlCustom parent)
 {
     refresh(silence);
     m_parent = parent;
 }
Example #5
0
        /// <summary>
        /// Constructs a new object.
        /// Loads the configuration and prepares a connection.
        /// A userspace VPN connection will be used.
        /// </summary>
        /// <param name="bin">path to the openvpn executable</param>
        /// <param name="file">path to the configuration of this openvpn</param>
        /// <param name="dbglevel">the debug level for internal logs</param>
        /// <param name="smartCardSupport">enable smartCard support</param>
        /// <param name="parent">the parent of the menu</param>
        /// <seealso cref="init" />
        static public VPNConfig CreateUserspaceConnection(string bin, string file, int dbglevel, bool smartCardSupport, UserControlCustom parent)
        {
            VPNConfig vc = new VPNConfig();

            vc.m_file      = file;
            vc.m_bin       = bin;
            vc.m_parent    = parent;
            vc.m_dbglevel  = dbglevel;
            vc.m_isService = false;
            vc.m_smartCard = smartCardSupport;
            vc.init();
            return(vc);
        }