public override void SetOption(OptionsBase option)
        {
            base.SetOption(option);
            ((EnvironmentOption)option).OnApplyChanges();
            this.RefreshControl();

            ModifiedChange();
        }
        public PKVesrionOptionPage(OptionsBase option)
        {
            InitializeComponent();
            this.controlledOption = option;

            VerCB.Items.Clear();

            VerCB.Items.Add(new PKVer("Manual select", string.Empty));
            //string s =  Environment.GetEnvironmentVariable("SPOCLIENT");
            //if (!string.IsNullOrEmpty(s))
            //{
            //    VerCB.Items.Add(new PKVer("Environment variable", s));
            //}

            using (RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\.NETMicroFrameworkPortingKit"))
            {
                if (key != null)
                {
                    foreach (string str in key.GetSubKeyNames())
                    {
                        using (RegistryKey key1 = key.OpenSubKey(str))
                        {
                            if (key1 != null)
                            {
                                VerCB.Items.Add(new PKVer(str, key1.GetValue("InstallRoot").ToString()));
                            }
                            
                        }
                    }
                }
            }            


            VerCB.SelectedIndex = 0;
            string s =  Environment.GetEnvironmentVariable("SPOCLIENT");

            if (s[s.Length - 1] != '\\') s += "\\";

            if (!string.IsNullOrEmpty(s))
            {
                PathTB.Text = s;

                PKVersionOption po = this.controlledOption as PKVersionOption;

                for (int i = 1; i < VerCB.Items.Count; i++)
                {
                    PKVer ver = VerCB.Items[i] as PKVer;
                    if (ver != null)
                    {
                        if (String.Compare(ver.Path, s, true) == 0)
                        {
                            VerCB.SelectedIndex = i;
                        }
                    }
                }
            }
        }
        public EnvironmentOptionsPage(OptionsBase option)
        {
            InitializeComponent();
            this.controlledOption = option;

            ToolCB.Items.Clear();

            ToolCB.Items.Add("GCC");
            ToolCB.Items.Add("GCCOP");
            ToolCB.Items.Add("MDK");
            ToolCB.Items.Add("RVDS");
            ToolCB.Items.Add("SHC");
            ToolCB.Items.Add("VS");

            ToolCB.SelectedIndex = 3;
            UpdatePath();
            this.Modified = false;
        }
 /// <summary>        
 /// Set Option, which will be managed by this control
 /// </summary>
 /// <param name="option"></param>
 public virtual void SetOption(OptionsBase ModifiedOption)
 {
     this.controlledOption = ModifiedOption;
 }
Example #5
0
 /// <summary>
 /// Set Option, which will be managed by this control
 /// </summary>
 /// <param name="option"></param>
 public virtual void SetOption(OptionsBase ModifiedOption)
 {
     this.controlledOption = ModifiedOption;
 }