Exemplo n.º 1
0
        public void InitializeMainTab()
        {
            if (TabExists("login"))
            {
                ForceCloseTab("login");
            }

            LoginConsole loginConsole = new LoginConsole(instance);

            RadegastTab tab = AddTab("login", "Login", loginConsole);

            tab.AllowClose  = false;
            tab.AllowDetach = false;
            tab.AllowMerge  = false;
            tab.AllowHide   = false;

            loginConsole.RegisterTab(tab);
        }
Exemplo n.º 2
0
        private void InitializeMainTab()
        {
            LoginConsole loginConsole = new LoginConsole(instance);

            RadegastTab tab = AddTab("login", "Login", loginConsole);
            tab.AllowClose = false;
            tab.AllowDetach = false;
            tab.AllowMerge = false;
            tab.AllowHide = false;

            loginConsole.RegisterTab(tab);
        }
Exemplo n.º 3
0
        public void InitializeMainTab()
        {
            if (TabExists("login"))
            {
                ForceCloseTab("login");
            }

            LoginConsole loginConsole = new LoginConsole(instance);

            RadegastTab tab = AddTab("login", "Login", loginConsole);
            tab.AllowClose = false;
            tab.AllowDetach = false;
            tab.AllowMerge = false;
            tab.AllowHide = false;

            loginConsole.RegisterTab(tab);
        }
Exemplo n.º 4
0
        static public void SetRadegastLoginForm(RadegastInstance instance, LoginConsole console, LoginOptions options)
        {
            // var instance = TheRadegastInstance;
            if (console.IsDisposed) return;
            console.cbxUsername.Text = (String.Format("{0} {1}", options.FirstName, options.LastName)).Trim();

            switch (options.StartLocation)
            {
                case StartLocationType.Last:
                    //console.cbxLocation.Text = options.StartLocationCustom = "last";
                    console.cbxLocation.SelectedIndex = 1;
                    break;
                case StartLocationType.Home:
                    //console.cbxLocation.Text = options.StartLocationCustom = "home";
                    console.cbxLocation.SelectedIndex = 0;
                    break;
                default:
                    console.cbxLocation.SelectedIndex = -1;
                    console.cbxLocation.Text = options.StartLocationCustom;
                    break;
            }
            console.cbTOS.Checked = true;
            var G = options.Grid;
            string gridName = options.GridCustomLoginUri;
            int gridIx = -1;
            String LoginURI = null;
            G = GetGridIndex(instance, gridName, out gridIx) ?? G;
            if (gridIx == -1)
            {
                if (G != null && !String.IsNullOrEmpty(G.ID))
                {
                    LoginURI = G.LoginURI;
                    if (LoginURI != null) console.txtCustomLoginUri.Text = LoginURI;
                    console.cbxGrid.Text = G.Name ?? G.ID;
                    instance.Netcom.LoginOptions.Grid = G;
                }
                else { console.cbxGrid.Text = "Custom"; }
                if (LoginURI == null) console.txtCustomLoginUri.Text = options.GridCustomLoginUri;
            }
            else
            {
                console.txtCustomLoginUri.Text = G.LoginURI;
                console.cbxGrid.SelectedIndex = gridIx;
            }
        }